GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [ty] respect `__new__` and metaclass `__call__` return types by carljm · Pull Request #24357 · astral-sh/ruff

Conversation

@carljm

@carljm carljm commented Apr 2, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Summary

Closes astral-sh/ty#281.
Closes astral-sh/ty#2288.
Closes astral-sh/ty#2641.
Closes astral-sh/ty#2712.

After this PR in the conformance suite, we:

  • fully pass constructors_call_new.py
  • are one (unrelated) false positive away from fully passing constructors_call_metaclass.py
  • are one false negative away from fully passing constructors_call_type.py
  • are two reject-an-invalid-pattern false negatives away from fully passing constructors_call_init.py

Test Plan

Added many, many mdtests.

Ecosystem

  • Pandas-stubs and many other projects have clear improvements, where we are now inferring the correct types from constructor calls.
  • Lots of projects have diagnostic fallout that simply comes from inferring better/different types.
  • Some projects (e.g. sympy, hydpy) annotate __new__ as returning a concrete base class type, but still expect type checkers to infer construction of subclasses as an instance of that subclass, rather than the annotated base class. This causes lots of diagnostics on these projects. Our behavior here matches the spec and the behavior of pyright and pyrefly.
  • The new aiohttp diagnostic is a true positive.
  • bandersnatch has a metaclass __call__ that claims to return type, which is just wrong.
  • There are some errors in sympy around the Function type, which has a __new__ decorated with an untyped decorator; unlike pyright, we don't currently make the assumption that an untyped decorator passes through the decorated-function signature unchanged, so we don't see the return type and wrongly treat it as instance-returning. This is correct to our current treatment of untyped decorators.

Co-authored-by: Charlie Marsh [email protected]
Co-authored-by: Denys Zhak [email protected]

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

taminomara and MatthewCane reacted with heart emoji sharkdp, AlexWaygood, charliermarsh, jrheard, benedikt-bartscher, MatthewMckee4, taminomara, and Glyphack reacted with rocket emoji
All reactions
  • ❤️ 2 reactions
  • 🚀 8 reactions
@carljm carljm added the ty The ty type checker label Apr 2, 2026
@carljm carljm mentioned this pull request Apr 2, 2026
[ty] Respect __new__ and metaclass __call__ return types #22317
Closed
@astral-sh-bot

astral-sh-bot Bot commented Apr 2, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Typing conformance results improved 🎉

The percentage of diagnostics emitted that were expected errors increased from 86.92% to 87.72%. The percentage of expected errors that received a diagnostic increased from 82.66% to 82.85%. The number of fully passing files improved from 73/132 to 74/132.

Summary

How are test cases classified?

Each test case represents one expected error annotation or a group of annotations sharing a tag. Counts are per test case, not per diagnostic — multiple diagnostics on the same line count as one. Required annotations (E) are true positives when ty flags the expected location and false negatives when it does not. Optional annotations (E?) are true positives when flagged but true negatives (not false negatives) when not. Tagged annotations (E[tag]) require ty to flag exactly one of the tagged lines; tagged multi-annotations (E[tag+]) allow any number up to the tag count. Flagging unexpected locations counts as a false positive.

Metric Old New Diff Outcome
True Positives 877 879 +2 ⏫ (✅)
False Positives 132 123 -9 ⏬ (✅)
False Negatives 184 182 -2 ⏬ (✅)
Total Diagnostics 1063 1052 -11 ⏬
Precision 86.92% 87.72% +0.81% ⏫ (✅)
Recall 82.66% 82.85% +0.19% ⏫ (✅)
Passing Files 73/132 74/132 +1 ⏫ (✅)

Test file breakdown

4 files altered
File True Positives False Positives False Negatives Status
constructors_call_new.py 2 0 (-6) ✅ 0 ✅ Newly Passing 🎉
constructors_call_type.py 7 (+2) ✅ 0 1 (-2) ✅ 📈 Improving
constructors_call_init.py 3 0 (-2) ✅ 2 📈 Improving
constructors_call_metaclass.py 2 1 (-1) ✅ 0 📈 Improving
Total (all files) 879 (+2) ✅ 123 (-9) ✅ 182 (-2) ✅ 74/132

True positives added (2)

2 diagnostics
Test case Diff

constructors_call_type.py:30

+error[missing-argument] No arguments provided for required parameters `x`, `y` of bound method `__call__`

constructors_call_type.py:72

+error[missing-argument] No arguments provided for required parameters `x`, `y` of bound method `__call__`

False positives removed (9)

9 diagnostics
Test case Diff

constructors_call_init.py:91

-error[type-assertion-failure] Type `Class6[Unknown, Unknown]` does not match asserted type `Class6[int, str]`

constructors_call_init.py:99

-error[type-assertion-failure] Type `Class7[Unknown, Unknown]` does not match asserted type `Class7[str, int]`

constructors_call_metaclass.py:39

-error[type-assertion-failure] Type `Class2` does not match asserted type `int | Meta2`
-error[missing-argument] No argument provided for required parameter `x` of function `__new__`

constructors_call_new.py:117

-error[type-assertion-failure] Type `Class8[int]` does not match asserted type `Class8[list[int]]`

constructors_call_new.py:118

-error[type-assertion-failure] Type `Class8[str]` does not match asserted type `Class8[list[str]]`

constructors_call_new.py:49

-error[type-assertion-failure] Type `Class3` does not match asserted type `int`
-error[missing-argument] No argument provided for required parameter `x` of bound method `__init__`

constructors_call_new.py:64

-error[type-assertion-failure] Type `Class4` does not match asserted type `Class4 | Any`
-error[missing-argument] No argument provided for required parameter `x` of bound method `__init__`

constructors_call_new.py:76

-error[type-assertion-failure] Type `Class5` does not match asserted type `Never`
-error[missing-argument] No argument provided for required parameter `x` of bound method `__init__`

constructors_call_new.py:89

-error[type-assertion-failure] Type `Class6` does not match asserted type `int | Class6`
-error[missing-argument] No argument provided for required parameter `x` of bound method `__init__`

True positives changed (1)

1 diagnostic
Test case Diff

literals_literalstring.py:133

-error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Argument type `str` does not satisfy upper bound `LiteralString` of type variable `T`
-error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `LiteralString`, found `str`
+error[invalid-assignment] Object of type `Container[T@Container]` is not assignable to `Container[LiteralString]`
+error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Argument type `str` does not satisfy upper bound `LiteralString` of type variable `T`
+error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `LiteralString`, found `str`
sharkdp and Object905 reacted with heart emoji
All reactions
  • ❤️ 2 reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@astral-sh-bot

astral-sh-bot Bot commented Apr 2, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Memory usage report

Summary

Project Old New Diff Outcome
prefect 716.92MB 717.79MB +0.12% (889.55kB) ⏫
sphinx 264.63MB 264.96MB +0.13% (341.63kB) ⏫
trio 117.75MB 117.82MB +0.06% (73.54kB) ⏫
flake8 47.99MB 48.02MB +0.07% (31.95kB) ⏫

Significant changes

Click to expand detailed breakdown

prefect

Name Old New Diff Outcome
Type<'db>::class_member_with_policy_ 17.77MB 17.99MB +1.21% (220.02kB) ⏫
Type<'db>::member_lookup_with_policy_ 16.24MB 16.36MB +0.72% (120.31kB) ⏫
Type<'db>::class_member_with_policy_::interned_arguments 9.62MB 9.73MB +1.14% (112.02kB) ⏫
Type<'db>::member_lookup_with_policy_::interned_arguments 5.78MB 5.87MB +1.64% (96.89kB) ⏫
Type<'db>::apply_specialization_ 3.60MB 3.66MB +1.68% (62.03kB) ⏫
Type<'db>::try_call_dunder_get_ 10.78MB 10.82MB +0.36% (40.12kB) ⏫
Type<'db>::apply_specialization_::interned_arguments 2.89MB 2.93MB +1.29% (38.20kB) ⏫
StaticClassLiteral<'db>::try_mro_ 5.88MB 5.91MB +0.61% (36.45kB) ⏫
Specialization 2.50MB 2.53MB +1.34% (34.28kB) ⏫
infer_expression_types_impl 62.04MB 62.07MB +0.05% (30.63kB) ⏫
infer_scope_types_impl 54.31MB 54.28MB -0.05% (29.86kB) ⏫
FunctionType 8.72MB 8.75MB +0.32% (28.22kB) ⏫
CallableType 2.11MB 2.13MB +0.98% (21.23kB) ⏫
IntersectionType 2.31MB 2.29MB -0.75% (17.69kB) ⏫
is_redundant_with_impl 5.52MB 5.51MB -0.28% (15.90kB) ⏫
... 50 more

sphinx

Name Old New Diff Outcome
Type<'db>::class_member_with_policy_ 7.62MB 7.70MB +0.99% (77.66kB) ⏫
check_file_impl 4.92MB 4.96MB +0.88% (44.32kB) ⏫
Type<'db>::class_member_with_policy_::interned_arguments 4.01MB 4.05MB +0.93% (38.19kB) ⏫
Type<'db>::member_lookup_with_policy_::interned_arguments 2.65MB 2.68MB +1.36% (36.97kB) ⏫
Type<'db>::member_lookup_with_policy_ 6.51MB 6.54MB +0.55% (36.62kB) ⏫
infer_expression_types_impl 21.51MB 21.55MB +0.17% (36.41kB) ⏫
infer_definition_types 24.00MB 24.03MB +0.13% (30.77kB) ⏫
Specialization 1.01MB 1.03MB +1.52% (15.80kB) ⏫
Type<'db>::apply_specialization_ 1.64MB 1.65MB +0.93% (15.54kB) ⏫
StaticClassLiteral<'db>::try_mro_ 2.06MB 2.07MB +0.60% (12.60kB) ⏫
is_redundant_with_impl 1.78MB 1.77MB -0.60% (10.95kB) ⏫
is_redundant_with_impl::interned_arguments 2.02MB 2.01MB -0.44% (9.20kB) ⏫
Type<'db>::apply_specialization_::interned_arguments 1.45MB 1.46MB +0.61% (8.98kB) ⏫
infer_unpack_types 432.61kB 440.95kB +1.93% (8.34kB) ⏫
IntersectionType 880.59kB 872.38kB -0.93% (8.20kB) ⏫
... 42 more

trio

Name Old New Diff Outcome
Type<'db>::class_member_with_policy_ 2.00MB 2.04MB +2.03% (41.51kB) ⏫
Type<'db>::member_lookup_with_policy_ 1.81MB 1.83MB +1.11% (20.51kB) ⏫
Type<'db>::member_lookup_with_policy_::interned_arguments 909.80kB 930.21kB +2.24% (20.41kB) ⏫
Type<'db>::class_member_with_policy_::interned_arguments 1.11MB 1.12MB +1.72% (19.50kB) ⏫
infer_scope_types_impl 4.79MB 4.78MB -0.23% (11.23kB) ⏫
is_redundant_with_impl 471.83kB 464.54kB -1.54% (7.29kB) ⏫
is_redundant_with_impl::interned_arguments 534.88kB 528.09kB -1.27% (6.79kB) ⏫
IntersectionType 222.17kB 215.77kB -2.88% (6.40kB) ⏫
infer_expression_types_impl 7.09MB 7.09MB +0.08% (6.12kB) ⏫
UnionType 304.28kB 300.11kB -1.37% (4.17kB) ⏫
Specialization 462.36kB 464.83kB +0.53% (2.47kB) ⏫
check_file_impl 1.82MB 1.82MB +0.09% (1.75kB) ⏫
infer_expression_type_impl 1.32MB 1.32MB -0.13% (1.75kB) ⏫
Type<'db>::apply_specialization_ 727.89kB 729.46kB +0.22% (1.57kB) ⏫
Type<'db>::try_call_dunder_get_ 1.37MB 1.36MB -0.11% (1.52kB) ⏫
... 37 more

flake8

Name Old New Diff Outcome
Type<'db>::class_member_with_policy_ 568.68kB 580.04kB +2.00% (11.35kB) ⏫
Type<'db>::member_lookup_with_policy_ 487.55kB 493.38kB +1.20% (5.83kB) ⏫
Type<'db>::class_member_with_policy_::interned_arguments 306.41kB 311.80kB +1.76% (5.38kB) ⏫
Type<'db>::member_lookup_with_policy_::interned_arguments 228.41kB 233.70kB +2.31% (5.28kB) ⏫
is_redundant_with_impl 135.14kB 133.22kB -1.42% (1.92kB) ⏫
is_redundant_with_impl::interned_arguments 139.05kB 137.50kB -1.11% (1.55kB) ⏫
IntersectionType 68.56kB 67.09kB -2.15% (1.48kB) ⏫
Specialization 161.58kB 163.03kB +0.90% (1.45kB) ⏫
infer_expression_types_impl 1.07MB 1.08MB +0.11% (1.17kB) ⏫
infer_definition_types 1.87MB 1.88MB +0.06% (1.10kB) ⏫
Type<'db>::try_call_dunder_get_ 375.18kB 376.18kB +0.26% (1016.00B) ⏫
Type<'db>::apply_specialization_ 217.45kB 218.44kB +0.45% (1012.00B) ⏫
UnionType 101.25kB 100.27kB -0.97% (1008.00B) ⏫
Type<'db>::apply_specialization_::interned_arguments 203.75kB 204.61kB +0.42% (880.00B) ⏫
StaticClassLiteral<'db>::try_mro_ 322.72kB 323.29kB +0.18% (588.00B) ⏫
... 20 more
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@astral-sh-bot

astral-sh-bot Bot commented Apr 2, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

ecosystem-analyzer results

Lint rule Added Removed Changed
type-assertion-failure 58 1,406 563
unresolved-attribute 938 20 88
unsupported-operator 354 10 148
invalid-argument-type 288 60 86
call-non-callable 289 0 0
no-matching-overload 172 28 0
invalid-assignment 94 5 11
invalid-return-type 77 3 5
unused-type-ignore-comment 27 40 0
not-iterable 48 0 3
not-subscriptable 44 0 0
invalid-await 0 40 0
too-many-positional-arguments 18 1 0
missing-argument 3 7 0
redundant-cast 4 5 0
unused-ignore-comment 5 0 0
unknown-argument 2 0 0
assert-type-unspellable-subtype 0 0 1
invalid-yield 1 0 0
possibly-unresolved-reference 0 1 0
Total 2,422 1,626 905

Changes in flaky projects detected. Raw diff output excludes flaky projects; see the HTML report for details.

Showing a random sample of 325 of 4911 changes. See the HTML report for the full diff.

Raw diff sample (325 of 4911 changes)
antidote (https://github.com/Finistere/antidote)
- tests/lib/interface/test_function.py:89:61 warning[unused-type-ignore-comment] Unused blanket `type: ignore` directive
- tests/lib/interface/test_function.py:251:67 warning[unused-type-ignore-comment] Unused blanket `type: ignore` directive
- tests/lib/interface/test_function.py:305:29 warning[unused-type-ignore-comment] Unused blanket `type: ignore` directive
- tests/lib/interface/test_function.py:317:29 warning[unused-type-ignore-comment] Unused blanket `type: ignore` directive

artigraph (https://github.com/artigraph/artigraph)
+ tests/arti/test_fingerprints.py:32:12 error[unresolved-attribute] Object of type `int64` has no attribute `combine`
+ tests/arti/test_fingerprints.py:32:42 error[unresolved-attribute] Object of type `int64` has no attribute `combine`

bandersnatch (https://github.com/pypa/bandersnatch)
+ src/bandersnatch/filter.py:103:16 error[not-subscriptable] Cannot subscript object of type `type` with no `__class_getitem__` method
+ src/bandersnatch/tests/mock_config.py:15:5 error[unresolved-attribute] Object of type `type` has no attribute `clear`
+ src/bandersnatch/tests/test_configuration.py:116:26 error[not-subscriptable] Cannot subscript object of type `type` with no `__class_getitem__` method
+ src/bandersnatch/tests/test_configuration.py:136:26 error[not-subscriptable] Cannot subscript object of type `type` with no `__class_getitem__` method
+ src/bandersnatch/tests/test_configuration.py:227:9 error[not-subscriptable] Cannot subscript object of type `type` with no `__class_getitem__` method
+ src/bandersnatch/tests/test_configuration.py:254:9 error[not-subscriptable] Cannot subscript object of type `type` with no `__class_getitem__` method

bokeh (https://github.com/bokeh/bokeh)
- src/bokeh/models/mappers.py:380:26 error[invalid-argument-type] Argument to function `len` is incorrect: Expected `Sized`, found `(Unknown & ~None) | Nullable[Unknown] | list[Unknown]`
+ src/bokeh/models/mappers.py:380:26 error[invalid-argument-type] Argument to function `len` is incorrect: Expected `Sized`, found `(Unknown & ~None) | Nullable[Unknown]`
- src/bokeh/models/renderers/graph_renderer.py:74:25 error[unresolved-attribute] Attribute `data_source` is not defined on `Instance[Unknown]` in union `Unknown | Instance[Unknown]`
+ src/bokeh/models/renderers/graph_renderer.py:74:25 error[unresolved-attribute] Attribute `data_source` is not defined on `Instance[S@Instance]` in union `Unknown | Instance[S@Instance]`
+ src/bokeh/models/sources.py:266:16 error[invalid-return-type] Return type does not match returned value: expected `list[str]`, found `list[_T@list]`

dd-trace-py (https://github.com/DataDog/dd-trace-py)
- tests/appsec/appsec_utils.py:426:21 error[unresolved-attribute] Attribute `wait` is not defined on `Process` in union `Process | Popen[Unknown]`
+ tests/appsec/appsec_utils.py:426:21 error[unresolved-attribute] Attribute `wait` is not defined on `Process` in union `Process | Popen[AnyStr@Popen]`

egglog-python (https://github.com/egraphs-good/egglog-python)
+ python/egglog/egraph.py:793:29 error[invalid-argument-type] Argument to bound method `insert` is incorrect: Expected `RuntimeExpr | RuntimeClass`, found `type`

hydpy (https://github.com/hydpy-dev/hydpy)
+ hydpy/auxs/calibtools.py:710:16 error[invalid-return-type] Return type does not match returned value: expected `Elements`, found `Devices[Any]`
+ hydpy/core/devicetools.py:1545:21 error[unresolved-attribute] Unresolved attribute `model` on type `Device`
+ hydpy/core/devicetools.py:1548:21 error[unresolved-attribute] Object of type `Device` has no attribute `model`
+ hydpy/core/testtools.py:2381:9 error[call-non-callable] Object of type `Devices[Any]` is not callable
+ hydpy/core/testtools.py:2384:9 error[call-non-callable] Object of type `Devices[Any]` is not callable
+ hydpy/core/testtools.py:2385:9 error[call-non-callable] Object of type `Devices[Any]` is not callable
+ hydpy/core/testtools.py:2627:5 error[unresolved-attribute] Unresolved attribute `model` on type `Device`
+ hydpy/core/testtools.py:2790:5 error[unresolved-attribute] Unresolved attribute `model` on type `Device`

ibis (https://github.com/ibis-project/ibis)
- ibis/expr/api.py:600:29 error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown]`
+ ibis/expr/api.py:600:29 error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[str, DataType]`
+ ibis/util.py:110:16 error[invalid-return-type] Return type does not match returned value: expected `list[V@promote_list]`, found `list[_T@list]`

jax (https://github.com/google/jax)
+ jax/experimental/sparse/test_util.py:177:7 error[no-matching-overload] No overload of bound method `randint` matches arguments
+ jax/_src/pallas/mosaic/pipeline.py:413:22 error[not-iterable] Object of type `_T_co@zip` is not iterable
+ jax/_src/pallas/mosaic/pipeline.py:1137:9 error[invalid-argument-type] Argument is incorrect: Expected `Sequence[GridAxis]`, found `list[_S@map]`

kopf (https://github.com/nolar/kopf)
+ kopf/_cogs/clients/api.py:72:16 error[invalid-assignment] Object of type `_T@chain` is not assignable to `int | float | None`

meson (https://github.com/mesonbuild/meson)
+ mesonbuild/rewriter.py:929:28 error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Token[str]`, found `Token[TV_TokenTypes@Token]`

nox (https://github.com/wntrblm/nox)
+ nox/manifest.py:380:31 error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Func`, found `FunctionDecorator`

openlibrary (https://github.com/internetarchive/openlibrary)
+ openlibrary/plugins/worksearch/code.py:629:40 error[not-iterable] Object of type `_T_co@zip` is not iterable
+ openlibrary/plugins/worksearch/code.py:619:30 error[not-iterable] Object of type `_T_co@zip` is not iterable

pandas (https://github.com/pandas-dev/pandas)
+ pandas/core/indexes/period.py:701:52 error[unresolved-attribute] Attribute `asfreq` is not defined on `NaTType` in union `Period | NaTType`
+ pandas/tests/scalar/interval/test_interval.py:60:23 error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Argument type `Timestamp | NaTType` does not satisfy constraints (`int`, `int | float`, `Timestamp`, `Timedelta`) of type variable `_OrderableT`
+ pandas/tests/scalar/timestamp/methods/test_as_unit.py:30:29 error[unresolved-attribute] Attribute `_creso` is not defined on `NaTType` in union `Timestamp | NaTType`
+ pandas/tests/scalar/timestamp/methods/test_as_unit.py:34:16 error[unresolved-attribute] Attribute `_creso` is not defined on `NaTType` in union `Timestamp | NaTType`
+ pandas/tests/scalar/timestamp/methods/test_as_unit.py:60:16 error[unresolved-attribute] Attribute `_creso` is not defined on `NaTType` in union `Timestamp | NaTType`
+ pandas/tests/scalar/timestamp/methods/test_timestamp_method.py:28:35 error[unresolved-attribute] Attribute `timestamp` is not defined on `NaTType` in union `Timestamp | NaTType`
+ pandas/tests/tseries/offsets/test_custom_business_hour.py:277:17 error[unsupported-operator] Operator `-` is not supported between objects of type `Timestamp | NaTType` and `Nano`
- pandas/core/arrays/sparse/array.py:495:17 error[invalid-argument-type] Argument to function `_make_sparse` is incorrect: Expected `dtype[Any] | None`, found `None | dtype[Any] | ExtensionDtype`
+ pandas/core/arrays/sparse/array.py:495:17 error[invalid-argument-type] Argument to function `_make_sparse` is incorrect: Expected `dtype[Any] | None`, found `None | dtype[Any] | ExtensionDtype | dtype[float64]`
+ pandas/core/arrays/timedeltas.py:327:51 error[invalid-argument-type] Argument to function `generate_regular_range` is incorrect: Expected `Timestamp | Timedelta | None`, found `(Unknown & None) | Timedelta | NaTType`
+ pandas/core/indexes/datetimes.py:1623:24 error[unresolved-attribute] Attribute `unit` is not defined on `NaTType` in union `Timestamp | NaTType`
+ pandas/core/indexes/multi.py:4726:31 error[invalid-argument-type] Argument to bound method `append` is incorrect: Expected `tuple[Any, ...]`, found `list[Unknown]`
+ pandas/core/window/rolling.py:2023:17 error[invalid-assignment] Object of type `int | signedinteger[_64Bit]` is not assignable to attribute `_win_freq_i8` of type `int | None`
+ pandas/io/sas/sas_xport.py:349:30 error[invalid-argument-type] Method `__getitem__` of type `bound method dict[int, str].__getitem__(key: int, /) -> str` cannot be called with key of type `bytes` on object of type `dict[int, str]`
+ pandas/io/sas/sas_xport.py:351:50 error[unsupported-operator] Operator `<` is not supported between objects of type `int | bytes` and `Literal[2]`
+ pandas/plotting/_matplotlib/converter.py:309:16 error[unresolved-attribute] Attribute `ordinal` is not defined on `NaTType` in union `Period | NaTType`
+ pandas/tests/arithmetic/conftest.py:87:9 error[unresolved-attribute] Attribute `to_pytimedelta` is not defined on `NaTType` in union `Timedelta | NaTType`
- pandas/tests/arithmetic/test_object.py:117:18 error[unsupported-operator] Operator `+` is not supported between objects of type `Period | BaseOffset` and `Period`
+ pandas/tests/arithmetic/test_object.py:117:18 error[unsupported-operator] Operator `+` is not supported between objects of type `Period | BaseOffset | Unknown` and `Period | NaTType`
+ pandas/tests/arithmetic/test_period.py:870:23 error[unresolved-attribute] Attribute `freq` is not defined on `NaTType` in union `Period | NaTType`
+ pandas/tests/arrays/test_array.py:374:51 error[invalid-argument-type] Argument to bound method `_simple_new` is incorrect: Expected `dtype[datetime64[date | int | None]] | DatetimeTZDtype`, found `dtype[float64]`
+ pandas/tests/arrays/test_datetimes.py:242:49 error[unresolved-attribute] Attribute `unit` is not defined on `NaTType` in union `Timedelta | NaTType`
- pandas/tests/dtypes/cast/test_dict_compat.py:13:24 error[invalid-argument-type] Argument to function `dict_compat` is incorrect: Expected `dict[str | bytes | date | ... omitted 10 union elements, str | bytes | date | ... omitted 10 union elements]`, found `dict[Timestamp, int]`
+ pandas/tests/dtypes/cast/test_dict_compat.py:13:24 error[invalid-argument-type] Argument to function `dict_compat` is incorrect: Expected `dict[str | bytes | date | ... omitted 10 union elements, str | bytes | date | ... omitted 10 union elements]`, found `dict[Timestamp | NaTType, int]`
+ pandas/tests/frame/test_arithmetic.py:535:16 error[unresolved-attribute] Attribute `to_timedelta64` is not defined on `NaTType` in union `Timedelta | NaTType`
+ pandas/tests/indexes/interval/test_interval_range.py:271:67 error[unresolved-attribute] Attribute `to_pytimedelta` is not defined on `NaTType` in union `Timedelta | NaTType`
+ pandas/tests/indexing/test_loc.py:2943:21 error[unresolved-attribute] Attribute `to_period` is not defined on `NaTType` in union `Timestamp | NaTType`
+ pandas/tests/indexing/test_loc.py:2956:21 error[unresolved-attribute] Attribute `to_period` is not defined on `NaTType` in union `Timestamp | NaTType`
+ pandas/tests/io/parser/conftest.py:200:20 error[unresolved-attribute] Object of type `object` has no attribute `engine`
+ pandas/tests/plotting/test_datetimelike.py:529:24 error[unresolved-attribute] Attribute `ordinal` is not defined on `NaTType` in union `Period | NaTType`
+ pandas/tests/reshape/merge/test_merge_asof.py:675:60 error[invalid-argument-type] Argument to function `merge_asof` is incorrect: Expected `int | timedelta | None`, found `Timedelta | NaTType`
- pandas/tests/reshape/merge/test_multi.py:478:17 error[invalid-argument-type] Argument to bound method `from_tuples` is incorrect: Expected `Iterable[tuple[Hashable, ...]]`, found `list[list[Timestamp | str]]`
+ pandas/tests/reshape/merge/test_multi.py:478:17 error[invalid-argument-type] Argument to bound method `from_tuples` is incorrect: Expected `Iterable[tuple[Hashable, ...]]`, found `list[list[Timestamp | NaTType | str]]`
+ pandas/tests/scalar/period/test_arithmetic.py:274:20 error[unsupported-operator] Operator `-` is not supported between objects of type `Period | NaTType` and `YearEnd`
+ pandas/tests/scalar/period/test_arithmetic.py:305:20 error[unsupported-operator] Operator `-` is not supported between objects of type `Period | NaTType` and `Hour`
- pandas/tests/scalar/period/test_arithmetic.py:175:20 error[unsupported-operator] Operator `+` is not supported between objects of type `Day` and `Period`
+ pandas/tests/scalar/period/test_arithmetic.py:175:20 error[unsupported-operator] Operator `+` is not supported between objects of type `Day` and `Period | NaTType`
- pandas/tests/scalar/period/test_arithmetic.py:179:20 error[unsupported-operator] Operator `+` is not supported between objects of type `Hour` and `Period`
+ pandas/tests/scalar/period/test_arithmetic.py:179:20 error[unsupported-operator] Operator `+` is not supported between objects of type `Hour` and `Period | NaTType`
- pandas/tests/scalar/period/test_arithmetic.py:370:13 error[unsupported-operator] Operator `-` is not supported between objects of type `timedelta64[timedelta | int | None]` and `Period`
+ pandas/tests/scalar/period/test_arithmetic.py:370:13 error[unsupported-operator] Operator `-` is not supported between objects of type `timedelta64[None]` and `Period | NaTType`
- pandas/tests/scalar/period/test_arithmetic.py:434:13 error[unsupported-operator] Operator `<` is not supported between two objects of type `Period`
+ pandas/tests/scalar/period/test_arithmetic.py:434:13 error[unsupported-operator] Operator `<` is not supported between two objects of type `Period | NaTType`
- pandas/tests/scalar/period/test_arithmetic.py:452:17 error[unsupported-operator] Operator `>` is not supported between two objects of type `Period | int`
+ pandas/tests/scalar/period/test_arithmetic.py:452:17 error[unsupported-operator] Operator `>` is not supported between two objects of type `Period | NaTType | int`
+ pandas/tests/scalar/period/test_asfreq.py:114:16 error[unresolved-attribute] Attribute `asfreq` is not defined on `NaTType` in union `Period | NaTType`
+ pandas/tests/scalar/period/test_asfreq.py:240:16 error[unresolved-attribute] Attribute `asfreq` is not defined on `NaTType` in union `Period | NaTType`
+ pandas/tests/scalar/period/test_asfreq.py:336:16 error[unresolved-attribute] Attribute `asfreq` is not defined on `NaTType` in union `Period | NaTType`
+ pandas/tests/scalar/period/test_asfreq.py:428:16 error[unresolved-attribute] Attribute `asfreq` is not defined on `NaTType` in union `Period | NaTType`
+ pandas/tests/scalar/period/test_asfreq.py:480:16 error[unresolved-attribute] Attribute `asfreq` is not defined on `NaTType` in union `Period | NaTType`
+ pandas/tests/scalar/period/test_asfreq.py:499:20 error[unresolved-attribute] Attribute `asfreq` is not defined on `NaTType` in union `Period | NaTType`
+ pandas/tests/scalar/period/test_asfreq.py:506:16 error[unresolved-attribute] Attribute `asfreq` is not defined on `NaTType` in union `Period | NaTType`
+ pandas/tests/scalar/period/test_asfreq.py:557:16 error[unresolved-attribute] Attribute `asfreq` is not defined on `NaTType` in union `Period | NaTType`
+ pandas/tests/scalar/period/test_asfreq.py:558:16 error[unresolved-attribute] Attribute `asfreq` is not defined on `NaTType` in union `Period | NaTType`
+ pandas/tests/scalar/period/test_asfreq.py:665:16 error[unresolved-attribute] Attribute `asfreq` is not defined on `NaTType` in union `Period | NaTType`
+ pandas/tests/scalar/period/test_asfreq.py:757:38 error[unresolved-attribute] Attribute `ordinal` is not defined on `NaTType` in union `Period | NaTType`
+ pandas/tests/scalar/period/test_asfreq.py:760:22 error[unresolved-attribute] Attribute `asfreq` is not defined on `NaTType` in union `Period | NaTType`
+ pandas/tests/scalar/period/test_asfreq.py:795:19 error[unresolved-attribute] Attribute `asfreq` is not defined on `NaTType` in union `Period | NaTType`
+ pandas/tests/scalar/period/test_period.py:397:16 error[unresolved-attribute] Attribute `freq` is not defined on `NaTType` in union `Period | NaTType`
+ pandas/tests/scalar/period/test_period.py:694:16 error[unresolved-attribute] Attribute `to_timestamp` is not defined on `NaTType` in union `Period | NaTType`
+ pandas/tests/scalar/period/test_period.py:728:36 error[unresolved-attribute] Attribute `to_timestamp` is not defined on `NaTType` in union `Period | NaTType`
+ pandas/tests/scalar/period/test_period.py:1008:16 error[unresolved-attribute] Attribute `end_time` is not defined on `NaTType` in union `Period | NaTType`
- pandas/tests/scalar/period/test_period.py:1084:16 error[unresolved-attribute] Attribute `week` is not defined on `BaseOffset` in union `Period | BaseOffset`
- pandas/tests/scalar/timedelta/methods/test_as_unit.py:76:16 error[unresolved-attribute] Object of type `Timedelta` has no attribute `components`
+ pandas/tests/scalar/timedelta/methods/test_as_unit.py:76:16 error[unresolved-attribute] Object of type `Timedelta | NaTType` has no attribute `components`
+ pandas/tests/scalar/timedelta/methods/test_round.py:179:30 error[unresolved-attribute] Attribute `_creso` is not defined on `NaTType` in union `Timedelta | NaTType`
- pandas/tests/scalar/timedelta/test_arithmetic.py:492:18 error[unsupported-operator] Operator `//` is not supported between objects of type `Timedelta` and `timedelta64[timedelta | int | None]`
+ pandas/tests/scalar/timedelta/test_arithmetic.py:209:18 error[unsupported-operator] Operator `-` is not supported between objects of type `Timedelta | NaTType` and `Hour`
+ pandas/tests/scalar/timedelta/test_arithmetic.py:616:16 error[unsupported-operator] Operator `//` is not supported between two objects of type `Timedelta | NaTType`
+ pandas/tests/scalar/timedelta/test_arithmetic.py:754:42 error[unresolved-attribute] Attribute `to_timedelta64` is not defined on `NaTType` in union `Timedelta | NaTType`
+ pandas/tests/scalar/timedelta/test_arithmetic.py:797:18 error[unsupported-operator] Operator `%` is not supported between objects of type `Timedelta | NaTType` and `timedelta`
- pandas/tests/scalar/timedelta/test_arithmetic.py:183:18 error[unsupported-operator] Operator `-` is not supported between objects of type `Timedelta` and `timedelta64[timedelta | int | None]`
+ pandas/tests/scalar/timedelta/test_arithmetic.py:183:18 error[unsupported-operator] Operator `-` is not supported between objects of type `Timedelta | NaTType` and `timedelta64[timedelta | int | None]`
- pandas/tests/scalar/timedelta/test_arithmetic.py:485:18 error[unsupported-operator] Operator `/` is not supported between objects of type `Timedelta` and `timedelta64[timedelta | int | None]`
+ pandas/tests/scalar/timedelta/test_arithmetic.py:485:18 error[unsupported-operator] Operator `/` is not supported between objects of type `Timedelta | NaTType` and `timedelta64[int]`
- pandas/tests/scalar/timedelta/test_arithmetic.py:801:18 error[unsupported-operator] Operator `%` is not supported between objects of type `Timedelta` and `NaTType`
+ pandas/tests/scalar/timedelta/test_arithmetic.py:801:18 error[unsupported-operator] Operator `%` is not supported between objects of type `Timedelta | NaTType` and `NaTType`
- pandas/tests/scalar/timedelta/test_arithmetic.py:832:18 error[unsupported-operator] Operator `%` is not supported between objects of type `Timedelta` and `Literal[2]`
+ pandas/tests/scalar/timedelta/test_arithmetic.py:832:18 error[unsupported-operator] Operator `%` is not supported between objects of type `Timedelta | NaTType` and `Literal[2]`
- pandas/tests/scalar/timedelta/test_arithmetic.py:1236:13 error[unsupported-operator] Operator `//` is not supported between objects of type `Timedelta` and `Literal["1"] | ndarray[tuple[Any, ...], dtype[Any]]`
+ pandas/tests/scalar/timedelta/test_arithmetic.py:1236:13 error[unsupported-operator] Operator `//` is not supported between objects of type `Timedelta | NaTType` and `Literal["1"] | ndarray[tuple[Any, ...], dtype[Any]]`
+ pandas/tests/scalar/timedelta/test_constructors.py:788:12 error[unresolved-attribute] Attribute `unit` is not defined on `NaTType` in union `Timedelta | NaTType`
+ pandas/tests/scalar/timedelta/test_timedelta.py:386:20 error[invalid-argument-type] Argument to function `abs` is incorrect: Expected `SupportsAbs[Unknown]`, found `Timedelta | NaTType`
+ pandas/tests/scalar/timedelta/test_timedelta.py:662:16 error[unresolved-attribute] Attribute `resolution_string` is not defined on `NaTType` in union `Timedelta | NaTType`
- pandas/tests/scalar/timedelta/test_timedelta.py:424:15 error[unresolved-attribute] Object of type `Timedelta` has no attribute `components`
+ pandas/tests/scalar/timedelta/test_timedelta.py:424:15 error[unresolved-attribute] Object of type `Timedelta | NaTType` has no attribute `components`
+ pandas/tests/scalar/timestamp/methods/test_replace.py:209:30 error[invalid-argument-type] Argument to bound method `replace` is incorrect: Expected `int | None`, found `int | float`
+ pandas/tests/scalar/timestamp/test_constructors.py:473:16 error[unresolved-attribute] Attribute `unit` is not defined on `NaTType` in union `Timestamp | NaTType`
+ pandas/tests/scalar/timestamp/test_constructors.py:860:28 error[unresolved-attribute] Attribute `_creso` is not defined on `NaTType` in union `Timestamp | NaTType`
- pandas/tests/scalar/timestamp/test_constructors.py:706:23 error[invalid-argument-type] Argument to function `__new__` is incorrect: Expected `integer[Any] | int | float | ... omitted 3 union elements`, found `Period`
+ pandas/tests/scalar/timestamp/test_constructors.py:706:23 error[invalid-argument-type] Argument to function `__new__` is incorrect: Expected `integer[Any] | int | float | ... omitted 3 union elements`, found `Period | NaTType`
+ pandas/tests/scalar/timestamp/test_timestamp.py:158:51 error[invalid-argument-type] Argument to function `normalize` is incorrect: Expected `str`, found `str | int | float`
+ pandas/tests/scalar/timestamp/test_timestamp.py:832:30 error[unresolved-attribute] Attribute `unit` is not defined on `NaTType` in union `Timedelta | NaTType`
+ pandas/tests/scalar/timestamp/test_timestamp.py:845:49 error[unresolved-attribute] Attribute `_creso` is not defined on `NaTType` in union `Timedelta | NaTType`
+ pandas/tests/tseries/offsets/test_fiscal.py:589:24 error[invalid-argument-type] Argument to bound method `rollback` is incorrect: Expected `datetime`, found `Timestamp | NaTType`
+ pandas/tests/tslibs/test_timedeltas.py:24:10 error[unresolved-attribute] Attribute `to_pytimedelta` is not defined on `NaTType` in union `Timedelta | NaTType`
+ pandas/tseries/holiday.py:261:9 error[invalid-assignment] Object of type `Timestamp | NaTType | None` is not assignable to attribute `start_date` of type `Timestamp | None`

pandas-stubs (https://github.com/pandas-dev/pandas-stubs)
- tests/series/float/test_dtypes.py:87:9 error[type-assertion-failure] Type `Series[Any]` does not match asserted type `Series[int | float]`
+ tests/arrays/test_datetime_array.py:186:9 error[type-assertion-failure] Type `Unknown` does not match asserted type `DatetimeArray`
- tests/arrays/test_string_.py:94:26 error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Argument type `Index[Any]` does not satisfy upper bound `StringArray` of type variable `Self`
+ tests/arrays/test_string_.py:94:26 error[invalid-argument-type] Argument to function `__new__` is incorrect: Argument type `Index[int]` does not satisfy upper bound `NumpyExtensionArray` of type variable `Self`
- tests/arrays/test_string_.py:95:26 error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `ndarray[tuple[Any, ...], dtype[object_]] | StringArray`, found `Series[Any]`
+ tests/indexes/bool/test_add.py:24:23 error[unsupported-operator] Operator `+` is not supported between objects of type `Index[bool]` and `complex`
+ tests/indexes/bool/test_add.py:36:23 error[unsupported-operator] Operator `+` is not supported between objects of type `Index[bool]` and `list[bool]`
- tests/indexes/bool/test_add.py:57:11 error[type-assertion-failure] Type `Index[Any]` does not match asserted type `Index[int | float | complex]`
+ tests/indexes/bool/test_add.py:57:11 error[type-assertion-failure] Type `Index[Unknown]` does not match asserted type `Index[int | float | complex]`
- tests/indexes/bool/test_add.py:84:11 error[type-assertion-failure] Type `Index[Any]` does not match asserted type `Index[bool]`
+ tests/indexes/bool/test_add.py:84:11 error[type-assertion-failure] Type `Index[Unknown]` does not match asserted type `Index[bool]`
- tests/indexes/bool/test_sub.py:26:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Index[int | float]`
+ tests/indexes/bool/test_sub.py:26:11 error[type-assertion-failure] Type `Index[int]` does not match asserted type `Index[int | float]`
- tests/indexes/bool/test_sub.py:63:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Index[int | float]`
+ tests/indexes/bool/test_sub.py:63:11 error[type-assertion-failure] Type `Index[int]` does not match asserted type `Index[int | float]`
+ tests/indexes/complex/test_add.py:44:23 error[unsupported-operator] Operator `+` is not supported between objects of type `list[int | float]` and `Index[int | float | complex]`
- tests/indexes/complex/test_sub.py:43:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Index[int | float | complex]`
- tests/indexes/complex/test_sub.py:56:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Index[int | float | complex]`
- tests/indexes/float/test_add.py:29:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Index[int | float]`
- tests/indexes/float/test_add.py:86:11 error[type-assertion-failure] Type `Index[Any]` does not match asserted type `Index[int | float]`
+ tests/indexes/float/test_add.py:86:11 error[type-assertion-failure] Type `Index[Unknown]` does not match asserted type `Index[int | float]`
- tests/indexes/float/test_dtypes.py:76:9 error[type-assertion-failure] Type `Index[Any]` does not match asserted type `Index[int | float]`
- tests/indexes/float/test_dtypes.py:78:9 error[type-assertion-failure] Type `Index[Any]` does not match asserted type `Index[int | float]`
- tests/indexes/float/test_dtypes.py:88:9 error[type-assertion-failure] Type `Index[Any]` does not match asserted type `Index[int | float]`
- tests/indexes/float/test_dtypes.py:96:9 error[type-assertion-failure] Type `Index[Any]` does not match asserted type `Index[int | float]`
- tests/indexes/float/test_floordiv.py:129:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Index[int | float]`
- tests/indexes/float/test_floordiv.py:130:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Index[int | float]`
+ tests/indexes/float/test_floordiv.py:124:15 error[unsupported-operator] Operator `//` is not supported between objects of type `Index[int | float]` and `Index[int | float | complex]`
- tests/indexes/float/test_sub.py:41:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Index[int | float]`
- tests/indexes/int/test_add.py:27:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Index[int]`
- tests/indexes/int/test_floordiv.py:129:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Index[int | float]`
+ tests/indexes/int/test_floordiv.py:124:15 error[unsupported-operator] Operator `//` is not supported between objects of type `Index[int]` and `DatetimeIndex`
- tests/indexes/int/test_sub.py:21:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Index[int]`
- tests/indexes/int/test_sub.py:22:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Index[int]`
- tests/indexes/int/test_sub.py:43:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Index[int | float]`
- tests/indexes/int/test_sub.py:82:11 error[type-assertion-failure] Type `Index[Any]` does not match asserted type `Index[int]`
- tests/indexes/int/test_truediv.py:140:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Index[int | float]`
+ tests/indexes/str/test_mul.py:139:15 error[unsupported-operator] Operator `*` is not supported between objects of type `DatetimeIndex` and `Index[str]`
- tests/indexes/test_indexes.py:589:9 error[type-assertion-failure] Type `Unknown` does not match asserted type `IntervalIndex[Interval[Timestamp]]`
- tests/indexes/test_indexes.py:1726:9 error[type-assertion-failure] Type `Index[Any]` does not match asserted type `Index[int]`
- tests/scalars/test_scalars.py:1499:11 error[type-assertion-failure] Type `Series[Any]` does not match asserted type `Series[Timestamp]`
+ tests/series/bool/test_add.py:32:23 error[no-matching-overload] No overload of bound method `add` matches arguments
+ tests/series/bool/test_add.py:33:23 error[no-matching-overload] No overload of bound method `add` matches arguments
+ tests/series/bool/test_add.py:48:23 error[unsupported-operator] Operator `+` is not supported between objects of type `Series[bool]` and `list[bool]`
- tests/series/bool/test_add.py:153:11 error[type-assertion-failure] Type `Series[Any]` does not match asserted type `Series[int | float | complex]`
+ tests/series/bool/test_add.py:153:11 error[type-assertion-failure] Type `Series[Unknown]` does not match asserted type `Series[int | float | complex]`
- tests/series/bool/test_mul.py:204:9 error[type-assertion-failure] Type `Series[Any]` does not match asserted type `Series[int | float | complex]`
+ tests/series/bool/test_mul.py:204:9 error[type-assertion-failure] Type `Series[Unknown]` does not match asserted type `Series[int | float | complex]`
- tests/series/bool/test_sub.py:43:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[int]`
- tests/series/bool/test_sub.py:38:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[int | float]`
+ tests/series/bool/test_sub.py:38:11 error[type-assertion-failure] Type `Series[int]` does not match asserted type `Series[int | float]`
- tests/series/bool/test_truediv.py:22:18 error[type-assertion-failure] Type `Series[Any]` does not match asserted type `Series[bool]`
- tests/series/bool/test_truediv.py:202:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[int | float]`
- tests/series/bool/test_truediv.py:214:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[int | float]`
- tests/series/bool/test_truediv.py:267:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[int | float]`
- tests/series/complex/test_add.py:176:11 error[type-assertion-failure] Type `Series[Any]` does not match asserted type `Series[int | float | complex]`
+ tests/series/complex/test_add.py:176:11 error[type-assertion-failure] Type `Series[Unknown]` does not match asserted type `Series[int | float | complex]`
- tests/series/complex/test_add.py:178:11 error[type-assertion-failure] Type `Series[Any]` does not match asserted type `Series[int | float | complex]`
+ tests/series/complex/test_add.py:178:11 error[type-assertion-failure] Type `Series[Unknown]` does not match asserted type `Series[int | float | complex]`
+ tests/series/complex/test_mul.py:233:9 error[no-matching-overload] No overload of bound method `rmul` matches arguments
- tests/series/complex/test_mul.py:198:11 error[type-assertion-failure] Type `Series[Any]` does not match asserted type `Series[int | float | complex]`
+ tests/series/complex/test_mul.py:198:11 error[type-assertion-failure] Type `Series[Unknown]` does not match asserted type `Series[int | float | complex]`
- tests/series/complex/test_mul.py:199:11 error[type-assertion-failure] Type `Series[Any]` does not match asserted type `Series[int | float | complex]`
+ tests/series/complex/test_mul.py:199:11 error[type-assertion-failure] Type `Series[Unknown]` does not match asserted type `Series[int | float | complex]`
- tests/series/complex/test_mul.py:263:11 error[type-assertion-failure] Type `Series[Any]` does not match asserted type `Series[int | float | complex]`
+ tests/series/complex/test_mul.py:263:11 error[type-assertion-failure] Type `Series[Unknown]` does not match asserted type `Series[int | float | complex]`
- tests/series/complex/test_mul.py:277:9 error[type-assertion-failure] Type `Series[Any]` does not match asserted type `Series[int | float | complex]`
+ tests/series/complex/test_mul.py:277:9 error[type-assertion-failure] Type `Series[Unknown]` does not match asserted type `Series[int | float | complex]`
- tests/series/complex/test_sub.py:142:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[int | float | complex]`
+ tests/series/complex/test_sub.py:142:11 error[type-assertion-failure] Type `Index[int | float]` does not match asserted type `Series[int | float | complex]`
- tests/series/complex/test_truediv.py:300:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[int | float | complex]`
+ tests/series/float/test_add.py:32:23 error[no-matching-overload] No overload of bound method `add` matches arguments
- tests/series/float/test_add.py:56:11 error[type-assertion-failure] Type `Series[Any]` does not match asserted type `Series[int | float | complex]`
+ tests/series/float/test_add.py:56:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[int | float | complex]`
- tests/series/float/test_add.py:61:11 error[type-assertion-failure] Type `Series[Any]` does not match asserted type `Series[int | float | complex]`
+ tests/series/float/test_add.py:61:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[int | float | complex]`
- tests/series/float/test_add.py:80:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[int | float]`
+ tests/series/float/test_add.py:80:11 error[type-assertion-failure] Type `Series[Unknown]` does not match asserted type `Series[int | float]`
- tests/series/float/test_add.py:116:11 error[type-assertion-failure] Type `Series[Any]` does not match asserted type `Series[int | float]`
+ tests/series/float/test_add.py:116:11 error[type-assertion-failure] Type `Series[Unknown]` does not match asserted type `Series[int | float]`
- tests/series/float/test_add.py:117:11 error[type-assertion-failure] Type `Series[Any]` does not match asserted type `Series[int | float]`
+ tests/series/float/test_add.py:117:11 error[type-assertion-failure] Type `Series[Unknown]` does not match asserted type `Series[int | float]`
- tests/series/float/test_add.py:162:11 error[type-assertion-failure] Type `Series[Any]` does not match asserted type `Series[int | float]`
+ tests/series/float/test_add.py:162:11 error[type-assertion-failure] Type `Series[Unknown]` does not match asserted type `Series[int | float]`
- tests/series/float/test_mul.py:190:11 error[type-assertion-failure] Type `Index[Unknown]` does not match asserted type `Series[Timedelta]`
+ tests/series/float/test_mul.py:190:11 error[type-assertion-failure] Type `TimedeltaIndex` does not match asserted type `Series[Timedelta]`
- tests/series/float/test_sub.py:21:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[int | float]`
- tests/series/float/test_sub.py:117:11 error[type-assertion-failure] Type `Series[Any]` does not match asserted type `Series[int | float]`
- tests/series/float/test_sub.py:119:11 error[type-assertion-failure] Type `Series[Any]` does not match asserted type `Series[int | float | complex]`
- tests/series/float/test_truediv.py:299:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[int | float]`
+ tests/series/float/test_truediv.py:299:11 error[type-assertion-failure] Type `Index[int | float]` does not match asserted type `Series[int | float]`
- tests/series/float/test_truediv.py:346:9 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[int | float | complex]`
+ tests/series/float/test_truediv.py:346:9 error[type-assertion-failure] Type `Series[int | float]` does not match asserted type `Series[int | float | complex]`
- tests/series/int/test_add.py:27:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[int]`
- tests/series/int/test_add.py:31:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[int]`
- tests/series/int/test_add.py:48:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[int]`
- tests/series/int/test_add.py:79:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[int]`
+ tests/series/int/test_add.py:79:11 error[type-assertion-failure] Type `Series[Unknown]` does not match asserted type `Series[int]`
- tests/series/int/test_add.py:155:11 error[type-assertion-failure] Type `Series[Any]` does not match asserted type `Series[int]`
+ tests/series/int/test_add.py:155:11 error[type-assertion-failure] Type `Series[Unknown]` does not match asserted type `Series[int]`
- tests/series/int/test_add.py:161:11 error[type-assertion-failure] Type `Series[Any]` does not match asserted type `Series[int]`
+ tests/series/int/test_add.py:161:11 error[type-assertion-failure] Type `Series[Unknown]` does not match asserted type `Series[int]`
- tests/series/int/test_floordiv.py:186:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[int | float]`
- tests/series/int/test_floordiv.py:207:9 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[Timedelta]`
- tests/series/int/test_floordiv.py:223:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[int]`
+ tests/series/int/test_floordiv.py:198:9 error[no-matching-overload] No overload of bound method `floordiv` matches arguments
+ tests/series/int/test_floordiv.py:204:9 error[no-matching-overload] No overload of bound method `rfloordiv` matches arguments
+ tests/series/int/test_mul.py:197:9 error[no-matching-overload] No overload of bound method `mul` matches arguments
- tests/series/int/test_mul.py:195:11 error[type-assertion-failure] Type `Series[Any]` does not match asserted type `Series[int | float | complex]`
+ tests/series/int/test_mul.py:195:11 error[type-assertion-failure] Type `Series[Unknown]` does not match asserted type `Series[int | float | complex]`
- tests/series/int/test_mul.py:202:11 error[type-assertion-failure] Type `Series[Any]` does not match asserted type `Series[int | float]`
+ tests/series/int/test_mul.py:202:11 error[type-assertion-failure] Type `Series[Unknown]` does not match asserted type `Series[int | float]`
- tests/series/int/test_mul.py:230:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[int | float]`
+ tests/series/int/test_mul.py:230:11 error[type-assertion-failure] Type `Series[Unknown]` does not match asserted type `Series[int | float]`
- tests/series/int/test_sub.py:26:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[int]`
- tests/series/int/test_sub.py:163:11 error[type-assertion-failure] Type `Series[Any]` does not match asserted type `Series[int | float]`
- tests/series/int/test_truediv.py:374:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[int | float]`
- tests/series/int/test_truediv.py:297:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[int | float | complex]`
+ tests/series/int/test_truediv.py:297:11 error[type-assertion-failure] Type `Series[int | float]` does not match asserted type `Series[int | float | complex]`
+ tests/series/str/test_add.py:59:27 error[unsupported-operator] Operator `+` is not supported between objects of type `Series[str]` and `tuple[str, ...]`
- tests/series/str/test_add.py:71:11 error[type-assertion-failure] Type `Series[Any]` does not match asserted type `Series[str]`
+ tests/series/str/test_add.py:71:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[str]`
- tests/series/str/test_add.py:102:9 error[type-assertion-failure] Type `Unknown` does not match asserted type `Never`
+ tests/series/str/test_add.py:102:9 error[type-assertion-failure] Type `Series[Unknown]` does not match asserted type `Never`
- tests/series/test_agg.py:34:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `int | float`
- tests/series/test_agg.py:90:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Timedelta`
+ tests/series/test_floordiv.py:226:9 error[no-matching-overload] No overload of bound method `rfloordiv` matches arguments
- tests/series/test_properties.py:40:9 error[type-assertion-failure] Type `Unknown` does not match asserted type `TimestampProperties`
- tests/series/test_series.py:247:11 error[type-assertion-failure] Type `Series[Any]` does not match asserted type `Series[int]`
- tests/series/test_series.py:248:11 error[type-assertion-failure] Type `Series[Any]` does not match asserted type `Series[int]`
- tests/series/test_series.py:328:11 error[type-assertion-failure] Type `Series[Any]` does not match asserted type `Series[int | float]`
- tests/series/test_series.py:335:9 error[type-assertion-failure] Type `Series[Any]` does not match asserted type `Series[int | float]`
- tests/series/test_series.py:487:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `int | float`
- tests/series/test_series.py:592:9 error[type-assertion-failure] Type `Series[Any]` does not match asserted type `Series[int]`
- tests/series/test_series.py:672:9 error[type-assertion-failure] Type `Series[Any]` does not match asserted type `Series[int]`
- tests/series/test_series.py:677:9 error[type-assertion-failure] Type `Series[Any]` does not match asserted type `Series[int]`
- tests/series/test_series.py:863:9 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[int | float]`
- tests/series/test_series.py:963:5 error[type-assertion-failure] Type `tuple[str | bytes | date | ... omitted 9 union elements, Series[Any]]` does not match asserted type `tuple[str | bytes | date | ... omitted 9 union elements, Series[int]]`
- tests/series/test_series.py:993:5 error[type-assertion-failure] Type `Iterator[tuple[Period, Series[Any]]]` does not match asserted type `Iterator[tuple[Period, Series[int]]]`
- tests/series/test_series.py:995:5 error[type-assertion-failure] Type `tuple[Period, Series[Any]]` does not match asserted type `tuple[Period, Series[int]]`
- tests/series/test_series.py:1051:5 error[type-assertion-failure] Type `Iterator[tuple[Any, Series[Any]]]` does not match asserted type `Iterator[tuple[Any, Series[int]]]`
- tests/series/test_series.py:1828:11 error[type-assertion-failure] Type `Series[Any]` does not match asserted type `Series[int | float]`
- tests/series/test_series.py:1840:11 error[type-assertion-failure] Type `Series[Any] | str | bytes | ... omitted 10 union elements` does not match asserted type `Series[int] | str | bytes | ... omitted 10 union elements`
- tests/series/test_series.py:2418:11 error[type-assertion-failure] Type `Any | None` does not match asserted type `str | None`
- tests/series/test_series.py:2420:11 error[type-assertion-failure] Type `Any` does not match asserted type `str | bool`
+ tests/series/test_series.py:2420:11 error[type-assertion-failure] Type `str | Literal[True]` does not match asserted type `str | bool`
+ tests/series/test_sub.py:144:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[Any]`
+ tests/series/test_sub.py:148:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[Any]`
+ tests/series/test_sub.py:150:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[Any]`
- tests/series/test_truediv.py:240:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[Any]`
+ tests/series/test_truediv.py:240:11 error[type-assertion-failure] Type `Index[int | float]` does not match asserted type `Series[Any]`
- tests/series/timedelta/test_add.py:148:11 error[type-assertion-failure] Type `Series[Any]` does not match asserted type `Series[Timestamp]`
- tests/series/timedelta/test_sub.py:74:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[Timestamp]`
+ tests/series/timedelta/test_sub.py:99:9 error[no-matching-overload] No overload of bound method `sub` matches arguments
- tests/series/timedelta/test_truediv.py:277:9 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[Timedelta]`
+ tests/series/timedelta/test_truediv.py:363:9 error[no-matching-overload] No overload of bound method `rtruediv` matches arguments
- tests/series/timedelta/test_truediv.py:358:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[int | float]`
+ tests/series/timedelta/test_truediv.py:358:11 error[type-assertion-failure] Type `Series[Timedelta]` does not match asserted type `Series[int | float]`
- tests/series/timestamp/test_add.py:170:11 error[type-assertion-failure] Type `Series[Any]` does not match asserted type `Series[Timestamp]`
- tests/series/timestamp/test_add.py:178:11 error[type-assertion-failure] Type `Series[Any]` does not match asserted type `Series[Timestamp]`
+ tests/series/timestamp/test_add.py:36:14 error[unsupported-operator] Operator `+` is not supported between objects of type `datetime` and `Series[Timestamp]`
+ tests/series/timestamp/test_add.py:44:9 error[no-matching-overload] No overload of bound method `radd` matches arguments
+ tests/series/timestamp/test_add.py:98:14 error[unsupported-operator] Operator `+` is not supported between objects of type `Series[Timestamp]` and `list[datetime]`
+ tests/series/timestamp/test_add.py:100:14 error[unsupported-operator] Operator `+` is not supported between objects of type `Series[Timestamp]` and `list[timedelta]`
- tests/series/timestamp/test_sub.py:27:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[Timedelta]`
+ tests/series/timestamp/test_sub.py:157:13 error[unsupported-operator] Operator `-` is not supported between objects of type `Series[Timedelta]` and `Series[Timestamp]`
- tests/test_pandas.py:457:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `ndarray[tuple[int], dtype[numpy.bool[builtins.bool]]]`
- tests/test_pandas.py:1016:11 error[type-assertion-failure] Type `DatetimeIndex` does not match asserted type `ndarray[tuple[int], dtype[floating[Any]]]`
- tests/test_pandas.py:1049:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[Any]`
- tests/test_string_accessors.py:23:11 error[type-assertion-failure] Type `Series[Any]` does not match asserted type `Series[str]`
- tests/test_timefuncs.py:333:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[int]`
- tests/test_timefuncs.py:337:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[int]`
- tests/test_timefuncs.py:367:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[int]`
- tests/test_timefuncs.py:390:9 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[Period]`
- tests/test_timefuncs.py:540:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[int]`
- tests/test_timefuncs.py:559:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[int]`
- tests/test_timefuncs.py:602:11 error[type-assertion-failure] Type `Unknown` does not match asserted type `Literal["s", "ms", "us", "ns"]`
- tests/test_timefuncs.py:604:9 error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[Timestamp]`
- tests/test_timefuncs.py:1059:9 error[type-assertion-failure] Type `Unknown` does not match asserted type `ndarray[tuple[int], dtype[Any]]`
- tests/test_timefuncs.py:1750:11 error[type-assertion-failure] Type `Series[Any]` does not match asserted type `Series[Timestamp]`

pip (https://github.com/pypa/pip)
- src/pip/_vendor/urllib3/packages/backports/makefile.py:50:5 error[invalid-assignment] Cannot assign to read-only property `mode` on object of type `TextIOWrapper[_WrappedBuffer]`: Attempted assignment to `TextIOWrapper[_WrappedBuffer].mode` here
+ src/pip/_vendor/urllib3/packages/backports/makefile.py:50:5 error[invalid-assignment] Cannot assign to read-only property `mode` on object of type `TextIOWrapper[_BufferT_co@TextIOWrapper]`: Attempted assignment to `TextIOWrapper[_BufferT_co@TextIOWrapper].mode` here

pwndbg (https://github.com/pwndbg/pwndbg)
+ pwndbg/color/disasm.py:92:64 error[unsupported-operator] Operator `+` is not supported between objects of type `Literal["SYS_"]` and `str | None`

pywin32 (https://github.com/mhammond/pywin32)
+ Pythonwin/pywin/scintilla/view.py:520:20 error[unresolved-attribute] Object of type `_S@map` has no attribute `startswith`
+ Pythonwin/pywin/scintilla/view.py:558:13 error[invalid-argument-type] Argument to bound method `sort` is incorrect: Argument type `_S@map` does not satisfy upper bound `SupportsDunderLT[Any] | SupportsDunderGT[Any]` of type variable `SupportsRichComparisonT`

rotki (https://github.com/rotki/rotki)
+ rotkehlchen/externalapis/cryptocompare.py:418:48 error[not-subscriptable] Cannot subscript object of type `_T@enumerate` with no `__getitem__` method

scikit-learn (https://github.com/scikit-learn/scikit-learn)
+ sklearn/linear_model/_logistic.py:452:38 error[unsupported-operator] Operator `*` is not supported between objects of type `_T@enumerate` and `Unknown | float`
+ sklearn/preprocessing/tests/test_encoders.py:899:45 error[not-iterable] Object of type `_T_co@zip` is not iterable

scipy (https://github.com/scipy/scipy)
+ scipy/integrate/_ivp/tests/test_ivp.py:227:14 error[no-matching-overload] No overload of function `linspace` matches arguments
+ scipy/io/matlab/tests/test_mio5_utils.py:170:5 error[invalid-assignment] Invalid subscript assignment with key of type `Literal["byte_count"]` and value of type `Literal[0]` on object of type `ndarray[tuple[int], dtype[float64]]`

spack (https://github.com/spack/spack)
- lib/spack/spack/cmd/compiler.py:112:16 error[invalid-argument-type] Argument to function `colify` is incorrect: Expected `list[Any]`, found `reversed[str]`
+ lib/spack/spack/cmd/compiler.py:112:16 error[invalid-argument-type] Argument to function `colify` is incorrect: Expected `list[Any]`, found `Iterator[str]`
+ lib/spack/spack/spec.py:4066:30 error[unresolved-attribute] Object of type `_T@enumerate` has no attribute `depflag`

static-frame (https://github.com/static-frame/static-frame)
+ static_frame/core/frame.py:4478:31 warning[unused-type-ignore-comment] Unused blanket `type: ignore` directive
+ static_frame/core/rank.py:90:43 error[invalid-assignment] Object of type `ndarray[tuple[int], dtype[float64]]` is not assignable to `ndarray[tuple[Any], dtype[signedinteger[_64Bit]]]`

strawberry (https://github.com/strawberry-graphql/strawberry)
+ strawberry/schema/types/scalar.py:52:34 error[invalid-argument-type] Argument to function `_make_scalar_definition` is incorrect: Expected `GraphQLScalarType`, found `GraphQLNamedType`

sympy (https://github.com/sympy/sympy)
+ sympy/calculus/tests/test_accumulationbounds.py:340:12 error[unresolved-attribute] Object of type `Expr` has no attribute `union`
+ sympy/calculus/tests/test_accumulationbounds.py:342:31 error[unresolved-attribute] Object of type `Expr` has no attribute `union`
+ sympy/calculus/tests/test_util.py:149:12 error[unresolved-attribute] Object of type `Expr` has no attribute `union`
- sympy/core/operations.py:319:65 error[unresolved-attribute] Attribute `exp` is not defined on `Mul`, `Add` in union `Unknown | Mul | Add`
+ sympy/core/operations.py:319:65 error[unresolved-attribute] Attribute `exp` is not defined on `Expr` in union `Unknown | Expr`
+ sympy/core/tests/test_eval.py:95:16 error[call-non-callable] Object of type `_S@map` is not callable
+ sympy/core/tests/test_multidimensional.py:25:49 error[call-non-callable] Object of type `_S@map` is not callable
+ sympy/core/tests/test_relational.py:165:12 error[unresolved-attribute] Attribute `as_poly` is not defined on `BooleanFalse`, `BooleanTrue` in union `Equality | BooleanFalse | BooleanTrue`
- sympy/core/tests/test_relational.py:167:36 error[unresolved-attribute] Object of type `GreaterThan` has no attribute `as_poly`
+ sympy/core/tests/test_relational.py:167:36 error[unresolved-attribute] Attribute `as_poly` is not defined on `BooleanTrue`, `BooleanFalse` in union `Unknown | BooleanTrue | BooleanFalse`
+ sympy/functions/elementary/trigonometric.py:338:21 error[unresolved-attribute] Object of type `Expr` has no attribute `intersection`
+ sympy/integrals/transforms.py:640:24 error[unresolved-attribute] Object of type `Expr` has no attribute `exp`
+ sympy/matrices/expressions/kronecker.py:188:25 error[unresolved-attribute] Object of type `Basic` has no attribute `shape`
+ sympy/matrices/expressions/tests/test_matexpr.py:156:12 error[unresolved-attribute] Object of type `MatrixExpr` has no attribute `base`
+ sympy/physics/tests/test_secondquant.py:33:48 error[call-non-callable] Object of type `_S@map` is not callable
+ sympy/physics/tests/test_secondquant.py:38:26 error[call-non-callable] Object of type `_S@map` is not callable
+ sympy/physics/tests/test_secondquant.py:39:16 error[call-non-callable] Object of type `_S@map` is not callable
+ sympy/physics/tests/test_secondquant.py:42:35 error[call-non-callable] Object of type `_S@map` is not callable
+ sympy/physics/tests/test_secondquant.py:66:12 error[call-non-callable] Object of type `_S@map` is not callable
+ sympy/polys/domains/fractionfield.py:40:37 error[invalid-assignment] Object of type `FracField[Er@FractionField] | FracField[Er@FracField]` is not assignable to `FracField[Er@FractionField]`: Incompatible value of type `FracField[Er@FractionField] | FracField[Er@FracField]`
+ sympy/simplify/hyperexpand.py:1061:23 error[unsupported-operator] Operator `-` is not supported between objects of type `_T@list` and `Literal[1]`
+ sympy/simplify/hyperexpand.py:1270:14 error[unsupported-operator] Operator `-` is not supported between objects of type `_T@list` and `Literal[1]`
- sympy/solvers/ode/ode.py:1658:31 error[unresolved-attribute] Attribute `rhs` is not defined on `list[Equality]` in union `Unknown | list[Equality]`
+ sympy/solvers/ode/ode.py:1658:31 error[unresolved-attribute] Attribute `rhs` is not defined on `list[Equality | BooleanFalse | BooleanTrue]` in union `Unknown | list[Equality | BooleanFalse | BooleanTrue]`
+ sympy/solvers/ode/subscheck.py:221:18 error[unresolved-attribute] Attribute `rhs` is not defined on `BooleanFalse`, `BooleanTrue` in union `Equality | BooleanFalse | BooleanTrue | Unknown`
+ sympy/solvers/ode/subscheck.py:225:19 error[unresolved-attribute] Attribute `lhs` is not defined on `BooleanFalse`, `BooleanTrue` in union `Equality | BooleanFalse | BooleanTrue | Unknown`
+ sympy/solvers/ode/tests/test_subscheck.py:40:29 error[unresolved-attribute] Attribute `lhs` is not defined on `BooleanFalse`, `BooleanTrue` in union `Equality | BooleanFalse | BooleanTrue`
+ sympy/solvers/pde.py:452:25 error[unresolved-attribute] Attribute `rhs` is not defined on `BooleanFalse`, `BooleanTrue` in union `Equality | BooleanFalse | BooleanTrue`
+ sympy/solvers/tests/test_pde.py:28:15 error[call-non-callable] Object of type `_S@map` is not callable
+ sympy/solvers/tests/test_pde.py:54:12 error[call-non-callable] Object of type `_S@map` is not callable
+ sympy/solvers/tests/test_pde.py:68:30 error[call-non-callable] Object of type `_S@map` is not callable
+ sympy/solvers/tests/test_pde.py:73:56 error[call-non-callable] Object of type `_S@map` is not callable
+ sympy/solvers/tests/test_pde.py:119:25 error[call-non-callable] Object of type `_S@map` is not callable
+ sympy/solvers/tests/test_pde.py:217:9 error[call-non-callable] Object of type `_S@map` is not callable
+ sympy/solvers/tests/test_simplex.py:225:19 error[unresolved-attribute] Attribute `lhs` is not defined on `BooleanFalse`, `BooleanTrue` in union `Equality | BooleanFalse | BooleanTrue`
+ sympy/solvers/tests/test_solvers.py:1594:41 error[call-non-callable] Object of type `_S@map` is not callable
+ sympy/solvers/tests/test_solvers.py:1598:28 error[call-non-callable] Object of type `_S@map` is not callable
+ sympy/solvers/tests/test_solvers.py:1604:36 error[call-non-callable] Object of type `_S@map` is not callable
+ sympy/solvers/tests/test_solvers.py:1604:66 error[call-non-callable] Object of type `_S@map` is not callable
+ sympy/solvers/tests/test_solvers.py:1609:12 error[call-non-callable] Object of type `_S@map` is not callable
+ sympy/solvers/tests/test_solvers.py:1622:49 error[call-non-callable] Object of type `_S@map` is not callable
+ sympy/solvers/tests/test_solvers.py:1630:14 error[call-non-callable] Object of type `_S@map` is not callable
+ sympy/solvers/tests/test_solveset.py:3534:26 error[unresolved-attribute] Attribute `rhs` is not defined on `BooleanFalse`, `BooleanTrue` in union `Equality | BooleanFalse | BooleanTrue`
+ sympy/stats/crv.py:425:24 error[unresolved-attribute] Attribute `rhs` is not defined on `BooleanFalse`, `BooleanTrue` in union `(Unknown & ~Unequality) | Equality | BooleanFalse | BooleanTrue`
+ sympy/stats/crv.py:422:20 error[unresolved-attribute] Attribute `lhs` is not defined on `BooleanFalse`, `BooleanTrue` in union `(Unknown & ~Unequality) | Equality | BooleanFalse | BooleanTrue`
- sympy/tensor/array/tests/test_arrayop.py:144:35 error[unresolved-attribute] Object of type `conjugate` has no attribute `tomatrix`
- sympy/utilities/tests/test_matchpy_connector.py:121:18 error[invalid-argument-type] Argument to bound method `add` is incorrect: Expected `Expr`, found `Equality`
+ sympy/utilities/tests/test_matchpy_connector.py:121:18 error[invalid-argument-type] Argument to bound method `add` is incorrect: Expected `Expr`, found `Equality | BooleanFalse | BooleanTrue`
- sympy/utilities/tests/test_matchpy_connector.py:133:9 error[invalid-argument-type] Argument to bound method `add` is incorrect: Expected `Expr`, found `Equality`
+ sympy/utilities/tests/test_matchpy_connector.py:133:9 error[invalid-argument-type] Argument to bound method `add` is incorrect: Expected `Expr`, found `Equality | BooleanFalse | BooleanTrue`
- sympy/utilities/tests/test_wester.py:896:12 error[unsupported-operator] Operator `/` is not supported between objects of type `Equality` and `Literal[2]`
+ sympy/utilities/tests/test_wester.py:896:12 error[unsupported-operator] Operator `/` is not supported between objects of type `Equality | BooleanFalse | BooleanTrue` and `Literal[2]`
- sympy/vector/tests/test_vector.py:378:12 error[unresolved-attribute] Object of type `Mul` has no attribute `measure_number`
+ sympy/vector/tests/test_vector.py:378:12 error[unresolved-attribute] Object of type `Expr` has no attribute `measure_number`
- sympy/vector/tests/test_vector.py:385:12 error[unresolved-attribute] Object of type `Mul` has no attribute `measure_number`
+ sympy/vector/tests/test_vector.py:385:12 error[unresolved-attribute] Object of type `Expr` has no attribute `measure_number`

xarray (https://github.com/pydata/xarray)
- asv_bench/benchmarks/dataset_io.py:133:22 error[invalid-argument-type] Argument to bound method `isel` is incorrect: Expected `bool`, found `Unknown | DataArray | slice[Any, Any, Any]`
+ asv_bench/benchmarks/dataset_io.py:133:22 error[invalid-argument-type] Argument to bound method `isel` is incorrect: Expected `bool`, found `Unknown | DataArray | slice[int, int, Any]`
- asv_bench/benchmarks/indexing.py:100:22 error[invalid-argument-type] Argument to bound method `isel` is incorrect: Expected `Mapping[Any, Any] | None`, found `int | slice[Any, Any, Any]`
+ asv_bench/benchmarks/indexing.py:100:22 error[invalid-argument-type] Argument to bound method `isel` is incorrect: Expected `Mapping[Any, Any] | None`, found `int | slice[int, int, Any] | slice[Any, Any, int] | slice[int, int, int] | slice[Any, int, int]`
+ xarray/core/datatree.py:1564:16 error[invalid-return-type] Return type does not match returned value: expected `set[str]`, found `set[_T@set]`
+ xarray/tests/test_namedarray.py:398:22 error[invalid-assignment] Object of type `NamedArray[Unknown, dtype[float64]]` is not assignable to `NamedArray[Any, dtype[floating[_32Bit]]]`

zulip (https://github.com/zulip/zulip)
+ zerver/tests/test_decorators.py:286:9 error[unresolved-attribute] Unresolved attribute `host` on type `_MutableHttpRequest`

Full report with detailed diff (timing results)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@carljm @charliermarsh @denyszhak
[ty] respect __new__ and metaclass __call__ return types
864b54b
Co-authored-by: Charlie Marsh <[email protected]>
Co-authored-by: Denys Zhak <[email protected]>
@astral-sh-bot

astral-sh-bot Bot commented Apr 2, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

Formatter (stable)

✅ ecosystem check detected no format changes.

Formatter (preview)

✅ ecosystem check detected no format changes.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@carljm
carljm force-pushed the cjm/metaclass branch from cf10e70 to 864b54b Compare April 2, 2026 09:13
@carljm
carljm marked this pull request as ready for review April 2, 2026 10:05
@carljm
carljm requested review from AlexWaygood, dcreager, ibraheemdev and sharkdp as code owners April 2, 2026 10:05
@astral-sh-bot astral-sh-bot Bot assigned dcreager Apr 2, 2026
charliermarsh
charliermarsh reviewed Apr 2, 2026
View reviewed changes
Comment thread crates/ty_python_semantic/resources/mdtest/external/sqlmodel.md Resolved

Uh oh!

There was an error while loading. Please reload this page.

charliermarsh
charliermarsh approved these changes Apr 2, 2026
View reviewed changes

@charliermarsh charliermarsh left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's obviously a lot here to review closely but based on what I know from having worked on this feature previously, this looks like an improvement over the prior state of the PR with a lot of thoughtful consideration to the various cases (many of the behaviors for which we hashed out on the prior PR). I prefer to bias towards getting this merged :)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

carljm reacted with heart emoji
All reactions
  • ❤️ 1 reaction
Comment thread crates/ty_python_semantic/src/types/call/bind/constructor.rs
pub(super) constructor_context: ConstructorContext<'db>,
/// The next downstream constructor method, if any, to be (conditionally) checked after this
/// one.
pub(super) downstream_constructor: Option<Box<Bindings<'db>>>,

@charliermarsh charliermarsh Apr 2, 2026

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I naively expected this to be Option<Box<ConstructorBinding>>.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@carljm carljm Apr 2, 2026

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I did too :) The trick there is that basically what you strip away by going from a Bindings to a ConstructorBindings is the union and intersection layers, so that ends up not allowing representation of union/intersection cases correctly.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread crates/ty_python_semantic/src/types/call/bind/constructor.rs Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread crates/ty_python_semantic/src/types/call/bind/constructor.rs Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread crates/ty_python_semantic/src/types/call/bind/constructor.rs
/// constructed class; default constructor behavior."
///
/// This must be called only after downstream constructor bindings have been type-checked,
/// because instance-returning constructor paths may incorporate downstream specializations.

@charliermarsh charliermarsh Apr 2, 2026

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't need to block this PR, but... I feel like the state transition of "Have we checked downstream constructor bindings?" could be modeled in the type system? E.g., we could have separate types for the pre-checked and post-checked states. Checking the types could take self (rather than &mut self) and return the transformed type. These assumptions come up several times throughout the class so it may help to make mistakes here "impossible".

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

carljm reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

@charliermarsh charliermarsh Apr 2, 2026

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reading on, I get that this might be difficult given all the levels of nesting here (e.g., that may also need to propagate up to separate types for CallableItem...?).

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

carljm reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

@carljm carljm Apr 2, 2026

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, this is definitely something I don't love about our entire call-binding system, and how it gets extended in this PR -- it's entirely based around an implicit state machine of in-place-mutated objects. But I don't think that's something that can/should be addressed in this PR; I think it would require a full re-work of how we handle call bindings.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@charliermarsh

charliermarsh commented Apr 2, 2026

Copy link
Copy Markdown
Member

Also, easy to overlook but: no CodSpeed regression! Nice job.

carljm reacted with heart emoji AlexWaygood reacted with rocket emoji
All reactions
  • ❤️ 1 reaction
  • 🚀 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

carljm added 5 commits April 2, 2026 08:27
@carljm
Merge branch 'main' into cjm/metaclass
9770adf
* main:
  Add a "release-gate" step to the release workflow (#24365)
  Disallow starred expressions as values of starred expressions (#24280)
  [`pyupgrade`] Ignore strings with string-only escapes (`UP012`) (#16058)
  [ty] Improve consistency and quality of diagnostics relating to invalid type forms (#24325)
  [flake8-type-checking] Clarify import cycle wording for TC001/TC002/TC003 (#24322)
  [`flake8-errmsg`] Avoid shadowing existing `msg` in fix for `EM101` (#24363)
  `RUF072`: skip formfeeds on dedent (#24308)
  Replace unmaintained `unic-ucd-category` crate with `icu_properties` (#24344)
  [ty] Replace markdown hard line breaks in snapshot tests (#24361)
  [ty] Move snapshot for code action test with trailing whitespace to external file (#24359)
@carljm
review comments
71325c8
@carljm
Merge branch 'main' into cjm/metaclass
f113382
* main:
  [ty] Improve robustness of various type-qualifier-related checks (#24251)
  Only run the release-gate on workflow dispatch (#24366)
  [ty] Use `infer_type_expression` for parsing parameter annotations and return-type annotations (#24353)
@carljm
Merge branch 'main' into cjm/metaclass
aa80b86
* main:
  Document adding fixes in CONTRIBUTING.md (#24393)
  Sort formatter diagnostics in snapshots (#24375)
  [`pyupgrade`] Fix panic caused by handling of octals in `UP012` (#24390)
  Upgrade to nix v0.31.2 (#24385)
  Strip form feeds from indent passed to `dedent_to` (#24381)
  add recent move of the `deferred` submodule to `.git-blame-ignore-revs` (#24379)
  [ty] Fix extra_items TypedDict tests (#24367)
  [ty] Use `infer_type_expression` for validating PEP-613 type aliases (#24370)
  [`flake8-simplify`] Make the fix for `collapsible-if` (`SIM102`) safe in `preview` (#24371)
  [ty] Validate TypedDict fields when subclassing (#24338)
  [ty] pass type context to sequence literals in binary operations (#24197)
  Add release environment to notify-dependents job (#24372)
  Bump 0.15.9 (#24369)
  [ty] Move the `deferred` submodule inside `infer/builder` (#24368)
  [ty] Infer the `extra_items` keyword argument to class-based TypedDicts as an annotation expression (#24362)
  [ty] Validate type qualifiers in functional TypedDict fields and the `extra_items` keyword to functional TypedDicts (#24360)
@carljm
upgrade sqlmodel
1e75784
@carljm
carljm merged commit 2f839db into main Apr 3, 2026
52 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@carljm
carljm deleted the cjm/metaclass branch April 3, 2026 16:10
@carljm carljm mentioned this pull request Apr 3, 2026
Infers wrong type from numpy's np.interp astral-sh/ty#1429
Open
@m1racoli m1racoli mentioned this pull request Apr 7, 2026
ObjectStoragePath incorrectly typed as UPath in ty 0.0.29 apache/airflow#64861
Closed
1 of 2 tasks
@RunnersNum40 RunnersNum40 mentioned this pull request Apr 8, 2026
Change Module.__new__ return self type rather than Module patrick-kidger/equinox#1207
Merged
@MeGaGiGaGon MeGaGiGaGon mentioned this pull request Apr 21, 2026
Class type variables solved to Unknown if a generic class has a constructor method that is generic over different type variables astral-sh/ty#2554
Closed
This was referenced May 13, 2026
A class with async constructor (__new__ + __init__) reported as not awaitable astral-sh/ty#1254
Closed
generic union constructor call with __new__ adds spurious Unknown specializations to output union astral-sh/ty#2913
Closed
This was referenced May 13, 2026
False positive invalid-return-type with explicitly subscripted generic constructor astral-sh/ty#3265
Open
Problem inferring nested generic classes with defaults astral-sh/ty#2182
Closed
@charliermarsh charliermarsh mentioned this pull request Aug 4, 2026
[ty] Validate constructor calls on unbounded type variables #27449
Merged
charliermarsh added a commit that referenced this pull request Aug 5, 2026
@charliermarsh
[ty] Validate constructor calls on unbounded type variables (#27449)
ea933ff
## Summary

This PR validates `type[T]` against `T`'s upper-bound, but leaves bare
`type` permissive:

```py
from collections.abc import Callable

def permissive(cls: type) -> None:
    cls(1)  # still accepted

def unbounded[T](cls: type[T]) -> T:
    zero_argument: Callable[[], T] = cls
    one_argument: Callable[[int], T] = cls  # error: [invalid-assignment]
    return cls(1)  # error: [too-many-positional-arguments]

def object_bound[T: object](cls: type[T]) -> T:
    return cls(1)  # error: [too-many-positional-arguments]
```

I believe this is both consistent with the [constructor typing
specification](https://typing.python.org/en/latest/spec/constructors.html#constructor-calls-for-type-t)
and gets us passing the relevant conformance tests.

The background is that in #24357, we brought constructor handling much
closer to the typing specification by respecting `__new__` and metaclass
`__call__` return types, but `constructors_call_type.py` still had one
false negative (calling an unbounded `type[T]` with arguments).

We then put up #23514 which addressed that case by overriding the
permissive typeshed signature for `type.__call__`, making bare `type`,
`type[object]`, and unbounded `type[T]` all use `object`'s zero-argument
constructor. That created substantial ecosystem fallout and added
conformance false-positives. @carljm suggested that, if we eventually
want stricter `type[object]`, we should instead distinguish it from bare
`type` instead of globally replacing `type.__call__`.
@ap-- ap-- mentioned this pull request Nov 23, 2026
Provide a better way to allow static type-narrowing for the UPath constructor fsspec/universal_pathlib#446
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@charliermarsh charliermarsh charliermarsh approved these changes
@AlexWaygood AlexWaygood Awaiting requested review from AlexWaygood
@sharkdp sharkdp Awaiting requested review from sharkdp
@dcreager dcreager Awaiting requested review from dcreager
@ibraheemdev ibraheemdev Awaiting requested review from ibraheemdev

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@dcreager dcreager

Labels

ty The ty type checker

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Ty cannot infer type with zip(tuple, tuple): reveals Unknown pairwise loses type of items. Respect signature of metaclass's __call__ respect return type of __new__

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@carljm @charliermarsh @dcreager
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.