Skip to content

[ty] Full-scope bidirectional inference for unannotated container literals - #23761

Closed
ibraheemdev wants to merge 2 commits into
mainfrom
ibraheem/extended-bidi
Closed

[ty] Full-scope bidirectional inference for unannotated container literals#23761
ibraheemdev wants to merge 2 commits into
mainfrom
ibraheem/extended-bidi

Conversation

@ibraheemdev

@ibraheemdev ibraheemdev commented Mar 6, 2026

Copy link
Copy Markdown
Member

Implements full-scope bidirectional inference for collection literals that are not constrained at their definition. In particular, this PR considers empty, unannotated collection literals to be unconstrained, e.g., lst = [], and looks ahead in their containing scope for potentially constraining uses, which are:

  • Return statements involving the collection object, e.g., return lst.
  • Annotated assignments involving the collection object, e.g., x: list[int] = lst.
  • Bound-method calls on the collection object, e.g., lst.append(1).
  • Subscript assignments on the collection object, e.g., lst[0] = "hello".

The inferred type of the collection literal is the union of all constraints on the element type, collected from all constraining uses in the containing scope. Note that operations through reassignments, arbitrary function calls, augmented assignments, etc., are not currently tracked.

Note that because this PR only considers unconstrained collection literals, for which we previously inferred Unknown types, the ecosystem report consists primarily of new diagnostics. These are ideally removing false negatives, but likely introduces many false positives as well, because the heuristic implemented is not perfect. However, this approach is quite easily extended to unannotated collection literals that are not empty, which seems to remove a couple hundred ecosystem diagnostics, but I'd like to intentionally limit the scope of this change (and the performance/memory usage impact).

Part of astral-sh/ty#1473.

@ibraheemdev ibraheemdev added the ty Multi-file analysis & type inference label Mar 6, 2026
@astral-sh-bot

astral-sh-bot Bot commented Mar 6, 2026

Copy link
Copy Markdown

Typing conformance results

No changes detected ✅

Current numbers
The percentage of diagnostics emitted that were expected errors held steady at 89.36%. The percentage of expected errors that received a diagnostic held steady at 85.49%. The number of fully passing files held steady at 88/134.

@codspeed-hq

codspeed-hq Bot commented Mar 6, 2026

Copy link
Copy Markdown

Merging this PR will degrade performance by 7.44%

⚠️ Different runtime environments detected

Some benchmarks with significant performance changes were compared across different runtime environments,
which may affect the accuracy of the results.

Open the report in CodSpeed to investigate

❌ 3 regressed benchmarks
✅ 114 untouched benchmarks

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
WallTime sympy 66 s 74 s -10.72%
Simulation attrs 486.2 ms 522.2 ms -6.89%
Simulation hydra-zen 1.1 s 1.1 s -4.59%

Tip

Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.


Comparing ibraheem/extended-bidi (1b59f53) with main (6b742aa)

Open in CodSpeed

@ibraheemdev
ibraheemdev force-pushed the ibraheem/extended-bidi branch from 9859ff4 to ca3b993 Compare March 7, 2026 07:30
@astral-sh-bot

astral-sh-bot Bot commented Mar 7, 2026

Copy link
Copy Markdown

Memory usage report

Summary

Project Old New Diff Outcome
prefect 688.09MB 696.47MB +1.22% (8.38MB)
sphinx 256.67MB 262.68MB +2.34% (6.01MB)
trio 113.60MB 114.43MB +0.73% (847.14kB)
flake8 47.52MB 47.98MB +0.98% (475.50kB)

Significant changes

Click to expand detailed breakdown

prefect

Name Old New Diff Outcome
semantic_index 183.79MB 185.26MB +0.80% (1.47MB)
infer_definition_types 81.92MB 83.15MB +1.50% (1.23MB)
infer_expression_types_impl 52.72MB 53.91MB +2.26% (1.19MB)
StaticClassLiteral<'db>::try_mro_ 4.50MB 5.15MB +14.38% (662.53kB)
infer_statement_types_impl 197.67kB 775.28kB +292.21% (577.61kB)
Type<'db>::apply_specialization_::interned_arguments 3.17MB 3.50MB +10.39% (337.34kB)
FunctionType 9.58MB 9.87MB +3.06% (299.80kB)
Type<'db>::apply_specialization_ 3.20MB 3.49MB +9.01% (295.25kB)
Specialization 2.24MB 2.53MB +12.84% (294.59kB)
Type<'db>::member_lookup_with_policy_ 16.47MB 16.73MB +1.56% (263.23kB)
Type<'db>::class_member_with_policy_ 17.77MB 18.00MB +1.29% (234.69kB)
Type<'db>::try_call_dunder_get_ 11.17MB 11.39MB +1.98% (226.60kB)
infer_scope_types_impl 48.06MB 48.26MB +0.42% (208.54kB)
Type<'db>::class_member_with_policy_::interned_arguments 10.34MB 10.51MB +1.69% (178.45kB)
FunctionType<'db>::signature_ 4.29MB 4.45MB +3.84% (168.39kB)
... 55 more

sphinx

Name Old New Diff Outcome
infer_expression_types_impl 18.50MB 19.63MB +6.13% (1.13MB)
infer_definition_types 22.03MB 22.69MB +3.02% (681.52kB)
StaticClassLiteral<'db>::try_mro_ 1.98MB 2.55MB +28.37% (575.99kB)
infer_statement_types_impl 17.78kB 425.66kB +2294.40% (407.88kB)
semantic_index 61.49MB 61.89MB +0.64% (405.36kB)
Type<'db>::apply_specialization_::interned_arguments 1.49MB 1.78MB +19.09% (292.19kB)
FunctionType 3.25MB 3.53MB +8.51% (283.53kB)
Type<'db>::apply_specialization_ 1.47MB 1.73MB +17.54% (264.04kB)
Type<'db>::member_lookup_with_policy_ 6.89MB 7.15MB +3.73% (263.08kB)
Specialization 1.02MB 1.27MB +24.36% (255.58kB)
Type<'db>::class_member_with_policy_ 7.70MB 7.90MB +2.69% (211.90kB)
Type<'db>::try_call_dunder_get_ 4.92MB 5.11MB +4.04% (203.56kB)
Type<'db>::class_member_with_policy_::interned_arguments 4.06MB 4.22MB +3.81% (158.54kB)
FunctionType<'db>::signature_ 2.43MB 2.58MB +6.25% (155.66kB)
GenericAlias 435.38kB 558.70kB +28.33% (123.33kB)
... 53 more

trio

Name Old New Diff Outcome
infer_definition_types 7.24MB 7.43MB +2.60% (192.66kB)
semantic_index 29.98MB 30.11MB +0.44% (135.89kB)
infer_expression_types_impl 6.09MB 6.20MB +1.75% (109.02kB)
StaticClassLiteral<'db>::try_mro_ 775.89kB 831.02kB +7.11% (55.13kB)
Type<'db>::member_lookup_with_policy_ 1.87MB 1.90MB +1.58% (30.21kB)
Type<'db>::apply_specialization_::interned_arguments 594.30kB 622.50kB +4.75% (28.20kB)
FunctionType 1.51MB 1.53MB +1.72% (26.55kB)
infer_statement_types_impl 21.50kB 46.85kB +117.91% (25.35kB)
Type<'db>::apply_specialization_ 588.75kB 613.64kB +4.23% (24.89kB)
Specialization 432.28kB 456.89kB +5.69% (24.61kB)
Type<'db>::class_member_with_policy_ 1.95MB 1.97MB +1.23% (24.43kB)
Type<'db>::try_call_dunder_get_ 1.28MB 1.30MB +1.86% (24.36kB)
Type<'db>::class_member_with_policy_::interned_arguments 1.07MB 1.09MB +1.67% (18.38kB)
FunctionType<'db>::signature_ 1.09MB 1.11MB +1.34% (14.99kB)
infer_scope_types_impl 4.00MB 4.01MB +0.29% (11.71kB)
... 47 more

flake8

Name Old New Diff Outcome
infer_definition_types 1.71MB 1.77MB +3.92% (68.40kB)
infer_expression_types_impl 931.39kB 995.90kB +6.93% (64.51kB)
semantic_index 13.89MB 13.94MB +0.34% (47.88kB)
StaticClassLiteral<'db>::try_mro_ 311.04kB 350.52kB +12.69% (39.48kB)
infer_statement_types_impl 5.05kB 36.02kB +613.15% (30.97kB)
FunctionType 452.67kB 483.27kB +6.76% (30.59kB)
Type<'db>::apply_specialization_::interned_arguments 199.77kB 219.30kB +9.78% (19.53kB)
Type<'db>::apply_specialization_ 189.83kB 208.42kB +9.80% (18.59kB)
Specialization 158.83kB 177.03kB +11.46% (18.20kB)
FunctionType<'db>::signature_ 381.10kB 398.66kB +4.61% (17.56kB)
Type<'db>::member_lookup_with_policy_ 550.06kB 564.30kB +2.59% (14.25kB)
CallableType 178.55kB 191.47kB +7.24% (12.92kB)
Type<'db>::class_member_with_policy_ 575.71kB 588.63kB +2.24% (12.92kB)
Type<'db>::try_call_dunder_get_ 366.55kB 378.52kB +3.26% (11.96kB)
Type<'db>::class_member_with_policy_::interned_arguments 311.19kB 321.04kB +3.17% (9.85kB)
... 47 more

@ibraheemdev
ibraheemdev force-pushed the ibraheem/extended-bidi branch from ca3b993 to f8e6314 Compare March 19, 2026 14:16
@astral-sh-bot

astral-sh-bot Bot commented Mar 19, 2026

Copy link
Copy Markdown

ecosystem-analyzer results

Lint rule Added Removed Changed
invalid-argument-type 265 2 44
unresolved-attribute 121 0 75
invalid-assignment 67 2 22
invalid-return-type 45 0 11
unsupported-operator 37 0 11
not-subscriptable 46 0 0
no-matching-overload 38 1 0
not-iterable 10 0 13
unused-type-ignore-comment 0 16 0
call-top-callable 3 0 0
call-non-callable 2 0 0
invalid-key 1 0 0
invalid-raise 1 0 0
invalid-yield 0 0 1
Total 636 21 177

Showing a random sample of 276 of 834 changes. See the HTML report for the full diff.

Raw diff sample (276 of 834 changes)
aioredis (https://github.com/aio-libs/aioredis)
+ aioredis/connection.py:966:16 error[invalid-return-type] Return type does not match returned value: expected `list[bytes]`, found `list[bytes | memoryview[int]]`

aiortc (https://github.com/aiortc/aiortc)
+ src/aiortc/rtcpeerconnection.py:79:12 error[invalid-return-type] Return type does not match returned value: expected `list[RTCRtpCodecParameters]`, found `list[RTCRtpCodecParameters | RTCRtpCodecCapability]`

apprise (https://github.com/caronc/apprise)
+ apprise/cli.py:1091:30 error[not-iterable] Object of type `list[NotifyBase] | str | int | list[Unknown] | Unknown` may not be iterable
+ apprise/cli.py:1104:24 error[unresolved-attribute] Attribute `tags` is not defined on `str` in union `NotifyBase | str | Unknown`
+ apprise/config/base.py:825:21 error[not-subscriptable] Cannot subscript object of type `int` with no `__getitem__` method
+ apprise/config/base.py:830:32 error[invalid-argument-type] Method `__getitem__` of type `Overload[(key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> LiteralString, (key: SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> str]` cannot be called with key of type `Literal["schema"]` on object of type `str`
+ apprise/config/base.py:830:53 error[invalid-argument-type] Argument expression after ** must be a mapping type: Found `Unknown | int | str`
+ apprise/config/base.py:835:40 error[not-subscriptable] Cannot subscript object of type `int` with no `__getitem__` method
+ apprise/config/base.py:1365:53 error[invalid-argument-type] Argument expression after ** must be a mapping type: Found `Unknown | int`
+ apprise/persistent_store.py:1577:40 error[invalid-argument-type] Argument to bound method `list.append` is incorrect: Expected `dict[str, str | bool]`, found `dict[str, int | str | bytes | PathLike[str] | PathLike[bytes]]`
- apprise/persistent_store.py:1669:16 error[unsupported-operator] Operator `in` is not supported between objects of type `str` and `None | dict[Unknown, Unknown]`
+ apprise/persistent_store.py:1669:16 error[unsupported-operator] Operator `in` is not supported between objects of type `str` and `None | dict[Unknown, Unknown] | dict[Any, CacheObject]`
- apprise/persistent_store.py:1712:16 error[unresolved-attribute] Attribute `keys` is not defined on `None` in union `None | dict[Unknown, Unknown]`
+ apprise/persistent_store.py:1712:16 error[unresolved-attribute] Attribute `keys` is not defined on `None` in union `None | dict[Unknown, Unknown] | dict[Any, CacheObject]`
- apprise/persistent_store.py:1712:16 error[invalid-return-type] Return type does not match returned value: expected `set[str]`, found `dict_keys[Unknown, Unknown]`
+ apprise/persistent_store.py:1712:16 error[invalid-return-type] Return type does not match returned value: expected `set[str]`, found `dict_keys[Unknown, Unknown] | dict_keys[Any, CacheObject]`
+ apprise/plugins/mailgun.py:502:38 error[invalid-argument-type] Argument to function `formataddr` is incorrect: Expected `tuple[str | None, str]`, found `tuple[Unknown | bool, Unknown] | tuple[bool, Unknown | str]`
- apprise/plugins/mastodon.py:423:22 error[unsupported-operator] Operator `+` is not supported between objects of type `list[Unknown]` and `set[Unknown] | list[Unknown] | set[Divergent]`
+ apprise/plugins/mastodon.py:423:22 error[unsupported-operator] Operator `+` is not supported between objects of type `list[str | Any]` and `set[Unknown] | list[Unknown] | set[Divergent]`
- apprise/plugins/mastodon.py:647:30 error[unsupported-operator] Operator `+` is not supported between objects of type `list[Unknown]` and `set[Unknown] | list[Unknown] | set[Divergent]`
+ apprise/plugins/mastodon.py:647:30 error[unsupported-operator] Operator `+` is not supported between objects of type `list[str | Any]` and `set[Unknown] | list[Unknown] | set[Divergent]`
- apprise/plugins/mattermost.py:519:47 error[invalid-argument-type] Argument to bound method `NotifyMattermost._channel_lookup` is incorrect: Expected `str`, found `Unknown | None`
+ apprise/plugins/mattermost.py:519:47 error[invalid-argument-type] Argument to bound method `NotifyMattermost._channel_lookup` is incorrect: Expected `str`, found `str | Any | None`
+ apprise/plugins/postmark.py:484:29 error[invalid-argument-type] Argument to function `formataddr` is incorrect: Expected `tuple[str | None, str]`, found `tuple[Unknown | bool, Unknown]`
+ apprise/plugins/resend.py:308:25 error[invalid-argument-type] Argument to function `formataddr` is incorrect: Expected `tuple[str | None, str]`, found `tuple[Unknown | bool, Unknown]`
+ apprise/plugins/resend.py:462:21 error[invalid-argument-type] Argument to function `formataddr` is incorrect: Expected `tuple[str | None, str]`, found `tuple[Unknown | bool, Unknown]`
+ apprise/plugins/ses.py:432:21 error[invalid-argument-type] Argument to function `formataddr` is incorrect: Expected `tuple[str | None, str]`, found `tuple[Unknown | bool, Unknown]`
+ apprise/plugins/ses.py:477:37 error[invalid-argument-type] Argument to function `formataddr` is incorrect: Expected `tuple[str | None, str]`, found `tuple[Unknown | bool, Unknown | str]`
+ apprise/plugins/smtp2go.py:405:25 error[invalid-argument-type] Argument to function `formataddr` is incorrect: Expected `tuple[str | None, str]`, found `tuple[Unknown | bool, Unknown]`
- apprise/plugins/twitter.py:575:24 error[invalid-argument-type] Argument to function `len` is incorrect: Expected `Sized`, found `list[Unknown] | None`
+ apprise/plugins/twitter.py:575:24 error[invalid-argument-type] Argument to function `len` is incorrect: Expected `Sized`, found `list[str | Any] | None`
- tests/test_plugin_twitter.py:485:5 error[unresolved-attribute] Attribute `append` is not defined on `None` in union `list[Unknown] | None`
+ tests/test_plugin_twitter.py:485:5 error[unresolved-attribute] Attribute `append` is not defined on `None` in union `list[str | Any] | None`

attrs (https://github.com/python-attrs/attrs)
+ src/attr/_make.py:2359:68 error[unresolved-attribute] Attribute `name` is not defined on `Attribute` in union `Attribute | Unknown`

cloud-init (https://github.com/canonical/cloud-init)
+ cloudinit/config/modules.py:381:34 error[invalid-argument-type] Argument to bound method `Modules._run_modules` is incorrect: Expected `list[ModuleDetails]`, found `list[list[ModuleType | str | list[str]] | ModuleDetails]`
+ cloudinit/net/cmdline.py:217:29 error[unresolved-attribute] Attribute `get` is not defined on `list[Unknown]` in union `list[Unknown] | Unknown`
+ cloudinit/net/cmdline.py:221:13 error[invalid-argument-type] Method `__getitem__` of type `Overload[(i: SupportsIndex, /) -> Unknown, (s: slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> list[Unknown]]` cannot be called with key of type `Literal["subnets"]` on object of type `list[Unknown]`
+ cloudinit/config/cc_mounts.py:420:12 error[invalid-return-type] Return type does not match returned value: expected `list[list[str]]`, found `list[list[Unknown] | list[str | None] | list[str]]`
- cloudinit/distros/parsers/hosts.py:37:38 error[not-iterable] Object of type `None | Unknown | list[Unknown]` may not be iterable
+ cloudinit/distros/parsers/hosts.py:37:38 error[not-iterable] Object of type `None | Unknown | list[Divergent]` may not be iterable
- cloudinit/distros/parsers/hosts.py:71:38 error[not-iterable] Object of type `None | Unknown | list[Unknown]` may not be iterable
+ cloudinit/distros/parsers/hosts.py:71:38 error[not-iterable] Object of type `None | Unknown | list[Divergent]` may not be iterable
- cloudinit/distros/parsers/resolv_conf.py:60:38 error[not-iterable] Object of type `None | Unknown | list[Unknown]` may not be iterable
+ cloudinit/distros/parsers/resolv_conf.py:60:38 error[not-iterable] Object of type `None | Unknown | list[Divergent]` may not be iterable
- cloudinit/distros/parsers/resolv_conf.py:132:9 error[unresolved-attribute] Attribute `append` is not defined on `None` in union `None | Unknown | list[Unknown]`
+ cloudinit/distros/parsers/resolv_conf.py:132:9 error[unresolved-attribute] Attribute `append` is not defined on `None` in union `None | Unknown | list[Divergent]`
+ cloudinit/netinfo.py:162:13 error[unresolved-attribute] Attribute `append` is not defined on `str`, `bool` in union `list[Unknown] | str | bool`
+ cloudinit/netinfo.py:209:17 error[unresolved-attribute] Attribute `append` is not defined on `str`, `bool` in union `list[Unknown] | str | bool`
+ cloudinit/netinfo.py:213:17 error[not-subscriptable] Cannot subscript object of type `bool` with no `__getitem__` method
+ cloudinit/netinfo.py:218:21 error[unresolved-attribute] Attribute `append` is not defined on `str`, `bool` in union `list[Unknown] | str | bool`
+ cloudinit/netinfo.py:229:21 error[invalid-assignment] Cannot assign to a subscript on an object of type `str`
+ cloudinit/netinfo.py:231:21 error[not-subscriptable] Cannot subscript object of type `bool` with no `__getitem__` method
+ cloudinit/netinfo.py:260:17 error[unresolved-attribute] Attribute `append` is not defined on `str`, `bool` in union `list[Unknown] | str | bool`
+ cloudinit/netinfo.py:266:17 error[invalid-assignment] Cannot assign to a subscript on an object of type `str`
+ cloudinit/netinfo.py:266:17 error[not-subscriptable] Cannot subscript object of type `bool` with no `__getitem__` method
+ cloudinit/netinfo.py:268:17 error[not-subscriptable] Cannot subscript object of type `bool` with no `__getitem__` method
+ cloudinit/netinfo.py:270:17 error[not-subscriptable] Cannot subscript object of type `bool` with no `__getitem__` method
+ cloudinit/netinfo.py:277:21 error[unresolved-attribute] Attribute `append` is not defined on `str`, `bool` in union `list[Unknown] | str | bool`
+ cloudinit/netinfo.py:282:17 error[invalid-assignment] Cannot assign to a subscript on an object of type `str`
+ cloudinit/netinfo.py:286:21 error[not-subscriptable] Cannot subscript object of type `bool` with no `__getitem__` method
+ cloudinit/netinfo.py:288:21 error[invalid-assignment] Cannot assign to a subscript on an object of type `str`
+ cloudinit/sources/DataSourceAzure.py:797:13 error[invalid-assignment] Cannot assign to a subscript on an object of type `bytes`
+ cloudinit/sources/DataSourceAzure.py:797:13 error[invalid-assignment] Cannot assign to a subscript on an object of type `str`
+ cloudinit/sources/DataSourceAzure.py:803:13 error[invalid-assignment] Invalid subscript assignment with key of type `Literal["ssh_pwauth"]` and value of type `bool` on object of type `dict[str, bytes]`
+ cloudinit/sources/DataSourceAzure.py:803:13 error[invalid-assignment] Invalid subscript assignment with key of type `Literal["ssh_pwauth"]` and value of type `bool` on object of type `dict[str, dict[str, dict[str, str]]]`
+ cloudinit/sources/DataSourceAzure.py:864:25 error[invalid-assignment] Invalid subscript assignment with key of type `Literal["public-keys"]` and value of type `list[str] & ~AlwaysFalsy` on object of type `dict[str, dict[str, dict[str, str]]]`
- cloudinit/sources/DataSourceNoCloud.py:244:12 error[unresolved-attribute] Attribute `startswith` is not defined on `None` in union `None | Unknown`
+ cloudinit/sources/DataSourceNoCloud.py:244:12 error[unresolved-attribute] Attribute `startswith` is not defined on `None` in union `None | str`
+ cloudinit/sources/DataSourceScaleway.py:338:21 error[unsupported-operator] Operator `+=` is not supported between objects of type `tuple[str]` and `list[dict[str, bool | str]]`

colour (https://github.com/colour-science/colour)
+ colour/io/tm2714.py:1639:42 error[invalid-argument-type] Argument to function `as_float_array` is incorrect: Expected `_Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | ... omitted 5 union elements`, found `list[str | None]`

comtypes (https://github.com/enthought/comtypes)
+ comtypes/tools/codegenerator/comments.py:29:21 error[unsupported-operator] Operator `|=` is not supported between objects of type `None` and `Literal[2]`
+ comtypes/tools/codegenerator/comments.py:29:21 error[unsupported-operator] Operator `|=` is not supported between objects of type `str` and `Literal[2]`
+ comtypes/tools/codegenerator/comments.py:42:44 error[no-matching-overload] No overload of bound method `str.join` matches arguments
+ comtypes/tools/codegenerator/comments.py:46:51 error[unsupported-operator] Operator `+` is not supported between objects of type `list[str]` and `int | list[str] | str | None`
+ comtypes/tools/codegenerator/comments.py:53:49 error[unsupported-operator] Operator `+` is not supported between objects of type `list[str]` and `int | list[str] | str | None`

core (https://github.com/home-assistant/core)
+ homeassistant/components/airvisual/__init__.py:157:51 error[invalid-argument-type] Argument to bound method `ConfigEntries.async_update_entry` is incorrect: Expected `bool | UndefinedType`, found `Any | dict[str, bool] | dict[str, Any]`
+ homeassistant/components/airvisual/__init__.py:157:51 error[invalid-argument-type] Argument to bound method `ConfigEntries.async_update_entry` is incorrect: Expected `bool | UndefinedType`, found `Any | dict[str, bool] | dict[str, Any]`
+ homeassistant/components/airvisual/__init__.py:157:51 error[invalid-argument-type] Argument to bound method `ConfigEntries.async_update_entry` is incorrect: Expected `int | UndefinedType`, found `Any | dict[str, bool] | dict[str, Any]`
+ homeassistant/components/airvisual/__init__.py:157:51 error[invalid-argument-type] Argument to bound method `ConfigEntries.async_update_entry` is incorrect: Expected `str | UndefinedType`, found `Any | dict[str, bool] | dict[str, Any]`
- homeassistant/components/asuswrt/bridge.py:440:16 error[invalid-return-type] Return type does not match returned value: expected `list[str]`, found `list[Unknown] | dict[str, Any]`
+ homeassistant/components/asuswrt/bridge.py:440:16 error[invalid-return-type] Return type does not match returned value: expected `list[str]`, found `list[str] | dict[str, Any]`
+ homeassistant/components/cloud/client.py:259:41 error[invalid-argument-type] Argument is incorrect: Expected `datetime`, found `None`
+ homeassistant/components/gtfs/sensor.py:428:8 error[unsupported-operator] Operator `<` is not supported between two objects of type `Unknown | str | None | bool`
+ homeassistant/components/simplisafe/__init__.py:291:55 error[invalid-argument-type] Argument to bound method `ConfigEntries.async_update_entry` is incorrect: Expected `bool | UndefinedType`, found `Any | dict[str, Any]`
+ homeassistant/components/vizio/media_player.py:84:13 error[invalid-argument-type] Argument to bound method `ConfigEntries.async_update_entry` is incorrect: Expected `str | UndefinedType`, found `dict[str, Any]`
+ homeassistant/runner.py:242:9 error[invalid-argument-type] Argument to bound method `Logger.error` is incorrect: Expected `bool`, found `tuple[type[@Todo], Any, Any]`

dd-trace-py (https://github.com/DataDog/dd-trace-py)
+ scripts/validate_wheel.py:97:20 error[unsupported-operator] Operator `in` is not supported between objects of type `Literal["="]` and `(str & ~AlwaysFalsy) | (int & ~AlwaysFalsy)`
+ scripts/validate_wheel.py:98:43 error[unresolved-attribute] Attribute `split` is not defined on `int & ~AlwaysFalsy` in union `(str & ~AlwaysFalsy) | (int & ~AlwaysFalsy)`
+ ddtrace/contrib/internal/botocore/patch.py:92:16 error[invalid-return-type] Return type does not match returned value: expected `dict[str, set[str]]`, found `dict[str, set[object] | set[str]]`
- ddtrace/contrib/internal/celery/utils.py:69:30 error[invalid-argument-type] Argument to function `set_flattened_tags` is incorrect: Expected `Iterator[tuple[str, Any]]`, found `list[Unknown]`
+ ddtrace/contrib/internal/celery/utils.py:69:30 error[invalid-argument-type] Argument to function `set_flattened_tags` is incorrect: Expected `Iterator[tuple[str, Any]]`, found `list[tuple[str, Any | None]]`
+ ddtrace/internal/remoteconfig/client.py:664:13 error[invalid-assignment] Object of type `list[dict[str, str | int | None | list[dict[str, str | None]]]]` is not assignable to attribute `cached_target_files` of type `list[dict[str, ConfigMetadata]]`
+ ddtrace/vendor/ply/yacc.py:3159:42 error[invalid-argument-type] Argument to function `getsourcefile` is incorrect: Expected `ModuleType | type[Any] | ((...) -> Any) | ... omitted 3 union elements`, found `ModuleType | None`
- ddtrace/vendor/ply/yacc.py:601:29 error[invalid-assignment] Object of type `Unknown` is not assignable to attribute `lexer` on type `(Unknown & ~AlwaysFalsy & ~<Protocol with members 'lexer'>) | (YaccSymbol & ~AlwaysFalsy & ~<Protocol with members 'lexer'>)`
+ ddtrace/vendor/ply/yacc.py:601:29 error[invalid-assignment] Object of type `Unknown` is not assignable to attribute `lexer` on type `(Unknown & ~AlwaysFalsy & ~<Protocol with members 'lexer'>) | (YaccSymbol & ~AlwaysFalsy & ~<Protocol with members 'lexer'>) | Divergent`
- ddtrace/vendor/ply/yacc.py:614:42 error[unresolved-attribute] Attribute `lineno` is not defined on `None`, `YaccSymbol` in union `None | (Unknown & ~AlwaysFalsy) | YaccSymbol`
+ ddtrace/vendor/ply/yacc.py:614:42 error[unresolved-attribute] Attribute `lineno` is not defined on `None`, `YaccSymbol` in union `None | (Unknown & ~AlwaysFalsy) | YaccSymbol | Divergent`
- ddtrace/vendor/ply/yacc.py:620:83 error[unresolved-attribute] Attribute `type` is not defined on `YaccSymbol & ~AlwaysFalsy` in union `(Unknown & ~AlwaysFalsy) | (YaccSymbol & ~AlwaysFalsy)`
+ ddtrace/vendor/ply/yacc.py:620:83 error[unresolved-attribute] Attribute `type` is not defined on `YaccSymbol & ~AlwaysFalsy` in union `(Unknown & ~AlwaysFalsy) | (YaccSymbol & ~AlwaysFalsy) | Divergent`
- ddtrace/vendor/ply/yacc.py:765:25 error[unresolved-attribute] Attribute `type` is not defined on `YaccSymbol` in union `(Unknown & ~AlwaysFalsy) | YaccSymbol`
+ ddtrace/vendor/ply/yacc.py:765:25 error[unresolved-attribute] Attribute `type` is not defined on `YaccSymbol` in union `(Unknown & ~AlwaysFalsy) | YaccSymbol | Divergent`
- ddtrace/vendor/ply/yacc.py:907:29 error[invalid-assignment] Object of type `Unknown` is not assignable to attribute `lexer` on type `(Unknown & ~AlwaysFalsy & ~<Protocol with members 'lexer'>) | (YaccSymbol & ~AlwaysFalsy & ~<Protocol with members 'lexer'>)`
+ ddtrace/vendor/ply/yacc.py:907:29 error[invalid-assignment] Object of type `Unknown` is not assignable to attribute `lexer` on type `(Unknown & ~AlwaysFalsy & ~<Protocol with members 'lexer'>) | (YaccSymbol & ~AlwaysFalsy & ~<Protocol with members 'lexer'>) | Divergent`
- ddtrace/vendor/ply/yacc.py:924:105 error[unresolved-attribute] Attribute `type` is not defined on `YaccSymbol & ~AlwaysFalsy` in union `(Unknown & ~AlwaysFalsy) | (YaccSymbol & ~AlwaysFalsy)`
+ ddtrace/vendor/ply/yacc.py:924:105 error[unresolved-attribute] Attribute `type` is not defined on `YaccSymbol & ~AlwaysFalsy` in union `(Unknown & ~AlwaysFalsy) | (YaccSymbol & ~AlwaysFalsy) | Divergent`
- ddtrace/vendor/ply/yacc.py:983:25 error[invalid-assignment] Object of type `Unknown` is not assignable to attribute `lexpos` on type `None | (Unknown & ~AlwaysFalsy) | YaccSymbol`
+ ddtrace/vendor/ply/yacc.py:983:25 error[invalid-assignment] Object of type `Divergent` is not assignable to attribute `lexpos` on type `None | (Unknown & ~AlwaysFalsy) | YaccSymbol | Divergent`
- ddtrace/vendor/ply/yacc.py:1071:25 error[unresolved-attribute] Attribute `type` is not defined on `YaccSymbol` in union `(Unknown & ~AlwaysFalsy) | YaccSymbol`
+ ddtrace/vendor/ply/yacc.py:1071:25 error[unresolved-attribute] Attribute `type` is not defined on `YaccSymbol` in union `(Unknown & ~AlwaysFalsy) | YaccSymbol | Divergent`
- ddtrace/vendor/ply/yacc.py:1199:29 error[invalid-assignment] Object of type `Unknown` is not assignable to attribute `lexer` on type `(Unknown & ~AlwaysFalsy & ~<Protocol with members 'lexer'>) | (YaccSymbol & ~AlwaysFalsy & ~<Protocol with members 'lexer'>)`
+ ddtrace/vendor/ply/yacc.py:1199:29 error[invalid-assignment] Object of type `Unknown` is not assignable to attribute `lexer` on type `(Unknown & ~AlwaysFalsy & ~<Protocol with members 'lexer'>) | (YaccSymbol & ~AlwaysFalsy & ~<Protocol with members 'lexer'>) | Divergent`
- ddtrace/vendor/ply/yacc.py:2831:22 error[not-iterable] Object of type `Unknown | None | list[Unknown]` may not be iterable
+ ddtrace/vendor/ply/yacc.py:2831:22 error[not-iterable] Object of type `Unknown | None | list[MiniProduction]` may not be iterable
+ ddtrace/vendor/psutil/setup.py:306:9 error[invalid-argument-type] Argument to `Extension.__init__` is incorrect: Expected `list[tuple[str, str | None]] | None`, found `list[tuple[str, int] | tuple[str, str] | tuple[str, Unknown] | tuple[str, None]]`
+ ddtrace/vendor/psutil/setup.py:330:9 error[invalid-argument-type] Argument to `Extension.__init__` is incorrect: Expected `list[tuple[str, str | None]] | None`, found `list[tuple[str, int] | tuple[str, str] | tuple[str, Unknown] | tuple[str, None]]`
+ ddtrace/vendor/psutil/setup.py:354:9 error[invalid-argument-type] Argument to `Extension.__init__` is incorrect: Expected `list[tuple[str, str | None]] | None`, found `list[tuple[str, int] | tuple[str, str] | tuple[str, Unknown] | tuple[str, None]]`
+ ddtrace/vendor/psutil/setup.py:373:9 error[invalid-argument-type] Argument to `Extension.__init__` is incorrect: Expected `list[tuple[str, str | None]] | None`, found `list[tuple[str, int] | tuple[str, str] | tuple[str, Unknown] | tuple[str, None]]`
+ ddtrace/vendor/psutil/setup.py:373:9 error[invalid-argument-type] Argument to `Extension.__init__` is incorrect: Expected `list[tuple[str, str | None]] | None`, found `list[tuple[str, int] | tuple[str, str] | tuple[str, Unknown] | tuple[str, None]]`
+ ddtrace/vendor/psutil/setup.py:392:9 error[invalid-argument-type] Argument to `Extension.__init__` is incorrect: Expected `list[tuple[str, str | None]] | None`, found `list[tuple[str, int] | tuple[str, str] | tuple[str, Unknown] | tuple[str, None]]`
+ ddtrace/vendor/psutil/setup.py:409:9 error[invalid-argument-type] Argument to `Extension.__init__` is incorrect: Expected `list[tuple[str, str | None]] | None`, found `list[tuple[str, int] | tuple[str, str] | tuple[str, Unknown] | tuple[str, None]]`
+ ddtrace/vendor/psutil/setup.py:422:9 error[invalid-argument-type] Argument to `Extension.__init__` is incorrect: Expected `list[tuple[str, str | None]] | None`, found `list[tuple[str, int] | tuple[str, str] | tuple[str, Unknown] | tuple[str, None]]`
+ ddtrace/vendor/psutil/setup.py:641:13 error[invalid-argument-type] Argument to `Extension.__init__` is incorrect: Expected `list[tuple[str, str | None]] | None`, found `list[tuple[str, int] | tuple[str, str] | tuple[str, Unknown] | tuple[str, None]]`
- scripts/diff.py:162:12 error[invalid-return-type] Return type does not match returned value: expected `list[tuple[int, int]]`, found `tuple[list[Unknown], list[Unknown], list[Unknown], list[Unknown]]`
+ scripts/diff.py:162:12 error[invalid-return-type] Return type does not match returned value: expected `list[tuple[int, int]]`, found `tuple[list[tuple[list[Unknown], Unknown]], list[tuple[list[Unknown], Unknown]], list[tuple[list[Unknown], Unknown]], list[tuple[list[Unknown], Unknown]]]`
+ tests/appsec/appsec/test_remoteconfiguration.py:327:26 error[unresolved-attribute] Object of type `object` has no attribute `metadata`
+ tests/appsec/iast/aspects/test_template_string_aspect.py:1149:53 error[invalid-argument-type] Argument to function `template_string_aspect` is incorrect: Expected `list[Any]`, found `str | tuple[Unknown, str, None, str]`
+ tests/internal/test_tracer_flare.py:239:16 error[unsupported-operator] Operator `in` is not supported between objects of type `Literal["ZeroDivisionError"]` and `str | int | float | None`
+ tests/telemetry/test_telemetry.py:441:17 error[not-subscriptable] Cannot subscript object of type `None` with no `__getitem__` method
+ tests/telemetry/test_telemetry.py:442:42 error[not-subscriptable] Cannot subscript object of type `None` with no `__getitem__` method
+ tests/tracer/test_propagation.py:1674:1 error[no-matching-overload] No overload of bound method `MutableMapping.update` matches arguments
+ tests/tracer/test_propagation.py:1675:1 error[no-matching-overload] No overload of bound method `MutableMapping.update` matches arguments
+ tests/tracer/test_propagation.py:1679:1 error[no-matching-overload] No overload of bound method `MutableMapping.update` matches arguments
+ tests/tracer/test_propagation.py:1692:1 error[no-matching-overload] No overload of bound method `MutableMapping.update` matches arguments

discord.py (https://github.com/Rapptz/discord.py)
+ discord/app_commands/installs.py:113:16 error[invalid-return-type] Return type does not match returned value: expected `list[Literal[0, 1]]`, found `list[int]`
+ discord/app_commands/installs.py:213:16 error[invalid-return-type] Return type does not match returned value: expected `list[Literal[0, 1, 2]]`, found `list[int]`
+ discord/ext/commands/core.py:835:16 error[invalid-return-type] Return type does not match returned value: expected `list[Group[Any, (...), Any]]`, found `list[GroupMixin[Any]]`
+ discord/ext/commands/core.py:2018:36 error[invalid-argument-type] Argument is incorrect: Expected `ContextT@check_any`, found `Context[BotT@predicate]`
+ discord/http.py:242:9 error[invalid-assignment] Invalid subscript assignment with key of type `Literal["replied_user"]` and value of type `bool` on object of type `list[dict[str, Any]]`
+ discord/http.py:242:9 error[invalid-assignment] Invalid subscript assignment with key of type `Literal["replied_user"]` and value of type `bool` on object of type `list[str | int]`

ibis (https://github.com/ibis-project/ibis)
+ ibis/backends/clickhouse/tests/conftest.py:95:9 error[unresolved-attribute] Object of type `Mapping[_KT@Mapping, _VT_co@Mapping]` has no attribute `setdefault`
- ibis/backends/sql/datatypes.py:272:26 error[invalid-argument-type] Argument is incorrect: Expected `bool`, found `dict[Unknown, Unknown]`
+ ibis/backends/sql/datatypes.py:272:26 error[invalid-argument-type] Argument is incorrect: Expected `bool`, found `dict[Unknown | str, DataType]`
+ ibis/examples/gen_registry.py:291:9 error[invalid-argument-type] Argument to function `add_movielens_example` is incorrect: Expected `dict[str, dict[str, str] | None]`, found `dict[str, dict[str, str]]`
+ ibis/examples/gen_registry.py:345:13 error[invalid-argument-type] Argument to class `partial` is incorrect: Expected `dict[str, dict[str, str] | None]`, found `dict[str, dict[str, str]]`
+ ibis/expr/types/relations.py:514:12 error[invalid-return-type] Return type does not match returned value: expected `Mapping[str, ibis.expr.types.generic.Value]`, found `dict[Unknown, ibis.expr.operations.core.Value[Unknown, Any]]`

jax (https://github.com/google/jax)
+ jax/_src/pallas/mpmd.py:59:10 error[invalid-return-type] Return type does not match returned value: expected `Mapping[str, int]`, found `dict[object, int]`
+ jax/_src/pallas/mpmd.py:361:50 error[invalid-argument-type] Argument to function `freeze` is incorrect: Expected `Ref`, found `Unknown | Array`
+ jax/experimental/jax2tf/tests/sharding_test.py:203:28 error[invalid-argument-type] Argument to function `jit` is incorrect: Expected `str | None`, found `P | None`
- jax/experimental/jax2tf/tests/sharding_test.py:406:13 error[invalid-assignment] Object of type `JitWrapped` is not assignable to `def f_jax(x) -> Unknown`
+ jax/experimental/jax2tf/tests/sharding_test.py:406:28 error[invalid-argument-type] Argument to function `jit` is incorrect: Expected `bool`, found `NamedSharding | None`
+ jax/experimental/jax2tf/tests/sharding_test.py:406:28 error[invalid-argument-type] Argument to function `jit` is incorrect: Expected `int | Sequence[int] | None`, found `NamedSharding | None`

koda-validate (https://github.com/keithasaurus/koda-validate)
+ koda_validate/_internal.py:243:37 error[invalid-argument-type] Argument is incorrect: Expected `list[Invalid]`, found `list[object]`

manticore (https://github.com/trailofbits/manticore)
+ manticore/core/state.py:519:16 error[invalid-return-type] Return type does not match returned value: expected `list[int]`, found `list[Unknown | bytes | int]`

materialize (https://github.com/MaterializeInc/materialize)
+ misc/python/materialize/parallel_workload/parallel_workload.py:373:79 error[unresolved-attribute] Attribute `last_log` is not defined on `None` in union `Executor | None`
+ misc/python/materialize/workload_replay/stats.py:336:18 error[invalid-argument-type] Argument to function `upload_plots` is incorrect: Expected `list[str]`, found `list[Path]`

meson (https://github.com/mesonbuild/meson)
- mesonbuild/scripts/symbolextractor.py:247:20 error[invalid-return-type] Return type does not match returned value: expected `tuple[list[str], str]`, found `tuple[list[Unknown], None]`
+ mesonbuild/scripts/symbolextractor.py:247:20 error[invalid-return-type] Return type does not match returned value: expected `tuple[list[str], str]`, found `tuple[list[str], None]`

mitmproxy (https://github.com/mitmproxy/mitmproxy)
+ mitmproxy/utils/debug.py:74:19 error[call-non-callable] Object of type `object` is not callable
- test/mitmproxy/proxy/tutils.py:262:41 error[unresolved-attribute] Attribute `name` is not defined on `Command`, `Event` in union `Command | Event | Unknown`
+ test/mitmproxy/proxy/tutils.py:262:41 error[unresolved-attribute] Object of type `Command | Event` has no attribute `name`

mypy (https://github.com/python/mypy)
- mypy/checkpattern.py:335:13 error[invalid-argument-type] Argument to bound method `PatternChecker.contract_starred_pattern_types` is incorrect: Expected `list[Type]`, found `list[Type] | list[Unknown] | list[AnyType]`
+ mypy/checkpattern.py:335:13 error[invalid-argument-type] Argument to bound method `PatternChecker.contract_starred_pattern_types` is incorrect: Expected `list[Type]`, found `list[Type] | list[AnyType] | list[Unknown]`
+ mypyc/irbuild/statement.py:760:16 error[invalid-return-type] Return type does not match returned value: expected `() -> None`, found `() -> Value`

openlibrary (https://github.com/internetarchive/openlibrary)
+ openlibrary/coverstore/archive.py:436:26 error[unresolved-attribute] Attribute `close` is not defined on `None` in union `None | Unknown`
+ openlibrary/coverstore/archive.py:463:17 error[unresolved-attribute] Attribute `close` is not defined on `None` in union `None | Unknown`

optuna (https://github.com/optuna/optuna)
+ optuna/samplers/_grid.py:125:31 error[invalid-argument-type] Argument to bound method `RandomState.shuffle` is incorrect: Expected `_Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | ... omitted 5 union elements`, found `list[tuple[str | int | float | None, ...]]`
+ optuna/study/_dataframe.py:83:12 error[invalid-return-type] Return type does not match returned value: expected `tuple[list[dict[tuple[str, str], Any]], list[tuple[str, str]]]`, found `tuple[list[dict[tuple[str, Any] | tuple[str, int | str], object] | dict[tuple[str, str], Any]], list[tuple[str, str]]]`

paasta (https://github.com/yelp/paasta)
+ paasta_tools/cli/cmds/spark_run.py:706:12 error[invalid-return-type] Return type does not match returned value: expected `dict[str, str]`, found `dict[str, str | None | Any]`
- paasta_tools/cli/utils.py:419:12 error[invalid-return-type] Return type does not match returned value: expected `tuple[list[str], str]`, found `tuple[list[str] | list[Unknown], None | str]`
+ paasta_tools/cli/utils.py:419:12 error[invalid-return-type] Return type does not match returned value: expected `tuple[list[str], str]`, found `tuple[list[str], None | str]`
+ paasta_tools/setup_kubernetes_job.py:250:12 error[invalid-return-type] Return type does not match returned value: expected `list[tuple[bool, KubernetesDeploymentConfig]]`, found `list[tuple[bool, KubernetesDeploymentConfig] | tuple[bool, None]]`
+ paasta_tools/setup_prometheus_adapter_config.py:983:12 error[invalid-return-type] Return type does not match returned value: expected `PrometheusAdapterConfig`, found `dict[str, list[PrometheusAdapterRule | UnspecializedTypeVar]]`

pandas (https://github.com/pandas-dev/pandas)
- pandas/core/indexes/multi.py:4853:31 error[invalid-argument-type] Argument to bound method `list.append` is incorrect: Expected `tuple[Any, ...]`, found `list[Unknown]`
+ pandas/core/indexes/multi.py:4853:31 error[invalid-argument-type] Argument to bound method `list.append` is incorrect: Expected `tuple[Any, ...]`, found `list[object]`
+ pandas/io/parsers/python_parser.py:1330:58 error[invalid-argument-type] Argument to bound method `PythonParser._remove_skipped_rows` is incorrect: Expected `list[list[str | bytes | date | ... omitted 10 union elements]]`, found `list[list[str] | list[str | bytes | date | ... omitted 10 union elements]] | list[list[str | bytes | date | ... omitted 10 union elements]]`
+ pandas/io/pytables.py:2410:44 error[invalid-argument-type] Argument to constructor `Index.__new__` is incorrect: Expected `bool`, found `Unknown | None`
+ pandas/io/pytables.py:2430:44 error[invalid-argument-type] Argument to constructor `Index.__new__` is incorrect: Expected `bool`, found `Unknown | None`
+ pandas/plotting/_matplotlib/core.py:447:16 error[invalid-return-type] Return type does not match returned value: expected `builtins.bool | list[tuple[int, ...]]`, found `list[tuple[Unknown, ...] | tuple[Unknown | int | slice[Any, Any, Any] | ndarray[tuple[Any, ...], dtype[numpy.bool[builtins.bool]]]] | tuple[int, ...]]`
+ pandas/tests/io/test_sql.py:868:45 error[invalid-argument-type] Argument to function `create_and_load_types_sqlite3` is incorrect: Expected `list[dict[Unknown, Unknown]]`, found `list[tuple[Unknown, ...]]`
+ pandas/tests/io/test_stata.py:1001:9 error[invalid-assignment] Invalid subscript assignment with key of type `Literal[2]` and value of type `datetime` on object of type `list[NaTType]`
+ pandas/tests/io/test_stata.py:1005:9 error[invalid-assignment] Invalid subscript assignment with key of type `Literal[2]` and value of type `datetime` on object of type `list[NaTType]`
+ pandas/tests/io/test_stata.py:1008:9 error[invalid-assignment] Invalid subscript assignment with key of type `Literal[2]` and value of type `datetime` on object of type `list[NaTType]`

pip (https://github.com/pypa/pip)
+ src/pip/_internal/operations/check.py:103:12 error[invalid-return-type] Return type does not match returned value: expected `tuple[dict[NormalizedName, list[tuple[NormalizedName, Requirement]]], dict[NormalizedName, list[tuple[NormalizedName, Version, Requirement]]]]`, found `tuple[dict[NormalizedName, list[tuple[NormalizedName, Requirement] | Buffer] | list[tuple[NormalizedName, Requirement]]], dict[NormalizedName, list[tuple[NormalizedName, Version, Requirement] | Buffer] | list[tuple[NormalizedName, Version, Requirement]]]]`
+ src/pip/_internal/vcs/versioncontrol.py:229:16 error[invalid-argument-type] Method `__getitem__` of type `bound method dict[str, VersionControl].__getitem__(key: str, /) -> VersionControl` cannot be called with key of type `Sized` on object of type `dict[str, VersionControl]`
+ src/pip/_vendor/distlib/util.py:1481:51 error[invalid-argument-type] Argument to bound method `SSLContext.wrap_socket` is incorrect: Expected `SSLSession | None`, found `str`
+ src/pip/_vendor/distlib/util.py:1481:51 error[invalid-argument-type] Argument to bound method `SSLContext.wrap_socket` is incorrect: Expected `bool`, found `str`

prefect (https://github.com/PrefectHQ/prefect)
+ src/integrations/prefect-dbt/prefect_dbt/cloud/jobs.py:1224:13 error[invalid-assignment] Object of type `list[Any | list[str]]` is not assignable to attribute `steps_override` of type `list[str] | None`
+ src/integrations/prefect-github/prefect_github/mutations.py:310:48 error[invalid-argument-type] Argument to function `_subset_return_fields` is incorrect: Expected `dict[tuple[Unknown, ...], tuple[Unknown, ...]]`, found `dict[Unknown | str, Unknown]`
+ src/integrations/prefect-github/prefect_github/mutations.py:475:48 error[invalid-argument-type] Argument to function `_subset_return_fields` is incorrect: Expected `dict[tuple[Unknown, ...], tuple[Unknown, ...]]`, found `dict[Unknown | str, Unknown]`
+ src/integrations/prefect-github/prefect_github/mutations.py:610:48 error[invalid-argument-type] Argument to function `_subset_return_fields` is incorrect: Expected `dict[tuple[Unknown, ...], tuple[Unknown, ...]]`, found `dict[Unknown | str, Unknown]`
- src/integrations/prefect-kubernetes/prefect_kubernetes/jobs.py:512:16 error[invalid-return-type] Return type does not match returned value: expected `dict[str, Any]`, found `None | dict[Unknown, Unknown]`
+ src/integrations/prefect-kubernetes/prefect_kubernetes/jobs.py:512:16 error[invalid-return-type] Return type does not match returned value: expected `dict[str, Any]`, found `None | dict[Unknown, str | None]`
- src/prefect/cli/flow_run.py:236:43 error[invalid-argument-type] Argument is incorrect: Expected `FlowRunFilterState | None`, found `dict[Unknown, Unknown] & ~AlwaysFalsy`
+ src/prefect/cli/flow_run.py:236:43 error[invalid-argument-type] Argument is incorrect: Expected `FlowRunFilterState | None`, found `dict[str, dict[str, list[str]]] & ~AlwaysFalsy`

pwndbg (https://github.com/pwndbg/pwndbg)
+ pwndbg/commands/kmod.py:95:66 error[invalid-argument-type] Argument to bound method `Process.add_symbol_file` is incorrect: Expected `int | None`, found `str | int`
- pwndbg/dbg_mod/gdb/__init__.py:1873:21 error[unsupported-operator] Operator `-` is not supported between two objects of type `None | Unknown`
+ pwndbg/dbg_mod/gdb/__init__.py:1873:21 error[unsupported-operator] Operator `-` is not supported between two objects of type `None | int`

pycryptodome (https://github.com/Legrandin/pycryptodome)
+ lib/Crypto/IO/_PBES.py:189:55 error[invalid-argument-type] Argument to function `new` is incorrect: Expected `bytes | bytearray | memoryview[int] | None`, found `int`
+ lib/Crypto/IO/_PBES.py:189:55 error[invalid-argument-type] Argument to function `new` is incorrect: Expected `bytes | bytearray | memoryview[int] | None`, found `int`
+ lib/Crypto/IO/_PBES.py:189:55 error[invalid-argument-type] Argument to function `new` is incorrect: Expected `dict[Unknown, Unknown]`, found `int`
+ lib/Crypto/IO/_PBES.py:189:55 error[invalid-argument-type] Argument to function `new` is incorrect: Expected `dict[Unknown, Unknown]`, found `int`
- lib/Crypto/SelfTest/Hash/test_KMAC.py:328:28 error[invalid-argument-type] Argument to function `new` is incorrect: Expected `bytes | bytearray | memoryview[int]`, found `str | Unknown`
+ lib/Crypto/SelfTest/Hash/test_KMAC.py:328:28 error[invalid-argument-type] Argument to function `new` is incorrect: Expected `bytes | bytearray | memoryview[int]`, found `str | Divergent`
- lib/Crypto/SelfTest/Hash/test_KMAC.py:328:28 error[invalid-argument-type] Argument to function `new` is incorrect: Expected `bytes | bytearray | memoryview[int]`, found `str | Unknown`
+ lib/Crypto/SelfTest/Hash/test_KMAC.py:328:39 error[invalid-argument-type] Argument to function `new` is incorrect: Expected `bytes | bytearray | memoryview[int]`, found `str | Divergent`
- lib/Crypto/SelfTest/Hash/test_KMAC.py:328:39 error[invalid-argument-type] Argument to function `new` is incorrect: Expected `bytes | bytearray | memoryview[int]`, found `str | Unknown`
+ lib/Crypto/SelfTest/Hash/test_KMAC.py:328:48 error[invalid-argument-type] Argument to function `new` is incorrect: Expected `bytes | bytearray | memoryview[int]`, found `str | Divergent`
- lib/Crypto/SelfTest/Hash/test_KMAC.py:328:48 error[invalid-argument-type] Argument to function `new` is incorrect: Expected `bytes | bytearray | memoryview[int]`, found `str | Unknown`
- lib/Crypto/SelfTest/Hash/test_KMAC.py:328:48 error[invalid-argument-type] Argument to function `new` is incorrect: Expected `bytes | bytearray | memoryview[int]`, found `str | Unknown`
+ lib/Crypto/SelfTest/Hash/test_TupleHash.py:267:35 error[unresolved-attribute] Attribute `replace` is not defined on `None` in union `str | None | Unknown`
- lib/Crypto/SelfTest/Hash/test_TupleHash.py:277:30 error[invalid-argument-type] Argument to function `new` is incorrect: Expected `int`, found `str | Unknown`
+ lib/Crypto/SelfTest/Hash/test_TupleHash.py:277:30 error[invalid-argument-type] Argument to function `new` is incorrect: Expected `int`, found `str | None | Unknown`
+ lib/Crypto/SelfTest/Hash/test_TupleHash.py:284:25 error[not-iterable] Object of type `tuple[str, str] | tuple[str, str, str] | None | Unknown` may not be iterable
+ lib/Crypto/SelfTest/Protocol/test_KDF.py:414:26 error[not-subscriptable] Cannot subscript object of type `TestVector` with no `__getitem__` method
+ lib/Crypto/SelfTest/Protocol/test_KDF.py:419:33 error[not-subscriptable] Cannot subscript object of type `TestVector` with no `__getitem__` method
- lib/Crypto/SelfTest/Protocol/test_KDF.py:428:33 error[unresolved-attribute] Attribute `P` is not defined on `tuple[str, str, int, int, int, str]` in union `tuple[str, str, int, int, int, str] | Unknown`
+ lib/Crypto/SelfTest/Protocol/test_KDF.py:428:33 error[unresolved-attribute] Object of type `tuple[str, str, int, int, int, str] | TestVector` has no attribute `P`
- lib/Crypto/SelfTest/Protocol/test_KDF.py:428:39 error[unresolved-attribute] Attribute `S` is not defined on `tuple[str, str, int, int, int, str]` in union `tuple[str, str, int, int, int, str] | Unknown`
+ lib/Crypto/SelfTest/Protocol/test_KDF.py:428:39 error[unresolved-attribute] Object of type `tuple[str, str, int, int, int, str] | TestVector` has no attribute `S`
+ lib/Crypto/SelfTest/PublicKey/test_ElGamal.py:159:40 error[invalid-argument-type] Argument to function `bytes_to_long` is incorrect: Expected `bytes`, found `Unknown | int | list[Unknown]`
- lib/Crypto/SelfTest/Signature/test_dss.py:616:9 error[invalid-assignment] Object of type `dict[Unknown, Unknown]` is not assignable to attribute `keys` of type `list[tuple[str, str, str, str, str, str]]`
+ lib/Crypto/SelfTest/Signature/test_dss.py:616:9 error[invalid-assignment] Object of type `dict[Divergent, TestKey]` is not assignable to attribute `keys` of type `list[tuple[str, str, str, str, str, str]]`
+ lib/Crypto/SelfTest/Signature/test_eddsa.py:412:44 error[invalid-argument-type] Argument to function `import_private_key` is incorrect: Expected `bytes`, found `bytes | None | <module 'Crypto.Hash.SHA512'> | <module 'Crypto.Hash.SHAKE256'>`
+ lib/Crypto/SelfTest/Signature/test_eddsa.py:416:41 error[invalid-argument-type] Argument to bound method `EdDSASigScheme.sign` is incorrect: Expected `bytes | Hash | XOF`, found `bytes | None | <module 'Crypto.Hash.SHA512'> | <module 'Crypto.Hash.SHAKE256'>`
+ lib/Crypto/SelfTest/Signature/test_eddsa.py:419:27 error[unresolved-attribute] Attribute `new` is not defined on `bytes` in union `bytes | <module 'Crypto.Hash.SHA512'> | <module 'Crypto.Hash.SHAKE256'>`
+ lib/Crypto/SelfTest/Signature/test_eddsa.py:432:27 error[unresolved-attribute] Attribute `new` is not defined on `bytes` in union `bytes | <module 'Crypto.Hash.SHA512'> | <module 'Crypto.Hash.SHAKE256'>`
+ lib/Crypto/SelfTest/Signature/test_eddsa.py:432:39 error[invalid-argument-type] Argument to function `new` is incorrect: Expected `bytes | bytearray | memoryview[int] | None`, found `bytes | None | <module 'Crypto.Hash.SHA512'> | <module 'Crypto.Hash.SHAKE256'>`
+ lib/Crypto/SelfTest/Signature/test_eddsa.py:433:33 error[invalid-argument-type] Argument to bound method `EdDSASigScheme.verify` is incorrect: Expected `bytes | Hash | XOF`, found `SHA512Hash | SHAKE256_XOF`

pydantic (https://github.com/pydantic/pydantic)
- pydantic/v1/schema.py:651:9 error[invalid-assignment] Invalid subscript assignment with key of type `Literal["additionalProperties"]` and value of type `Literal[False]` on object of type `dict[str, str | dict[Unknown, Unknown]]`
+ pydantic/v1/schema.py:651:9 error[invalid-assignment] Invalid subscript assignment with key of type `Literal["additionalProperties"]` and value of type `Literal[False]` on object of type `dict[str, str | dict[str, dict[str, Any]]]`

pytest (https://github.com/pytest-dev/pytest)
+ src/_pytest/mark/structures.py:450:37 error[invalid-argument-type] Argument to function `normalize_mark_list` is incorrect: Expected `Iterable[Mark | MarkDecorator]`, found `list[object] | (Any & Top[list[Unknown]]) | list[Any]`

pywin32 (https://github.com/mhammond/pywin32)
+ com/win32com/client/genpy.py:221:16 error[not-subscriptable] Cannot subscript object of type `None` with no `__getitem__` method
+ com/win32com/client/genpy.py:222:23 error[not-subscriptable] Cannot subscript object of type `None` with no `__getitem__` method
+ com/win32comext/adsi/demos/scp.py:531:19 error[invalid-argument-type] Method `__getitem__` of type `bound method dict[LiteralString, (po) -> Unknown].__getitem__(key: LiteralString, /) -> ((po) -> Unknown)` cannot be called with key of type `str` on object of type `dict[LiteralString, (po) -> Unknown]`
+ win32/scripts/pywin32_postinstall.py:227:21 error[invalid-argument-type] Argument to function `RegisterClasses` is incorrect: Expected `() -> None`, found `Any | None`
+ win32/scripts/pywin32_postinstall.py:227:21 error[invalid-argument-type] Argument to function `RegisterClasses` is incorrect: Expected `bool`, found `Any | None`

rotki (https://github.com/rotki/rotki)
- rotkehlchen/db/settings.py:594:75 warning[unused-type-ignore-comment] Unused blanket `type: ignore` directive
+ rotkehlchen/data_import/utils.py:75:21 error[unresolved-attribute] Attribute `append` is not defined on `bool` in union `Unknown | list[Unknown] | bool`
+ rotkehlchen/exchanges/kucoin.py:326:28 error[invalid-return-type] Return type does not match returned value: expected `list[SwapEvent] | list[AssetMovement]`, found `list[SwapEvent | AssetMovement]`

scikit-learn (https://github.com/scikit-learn/scikit-learn)
- sklearn/ensemble/_forest.py:906:20 error[unresolved-attribute] Attribute `take` is not defined on `list[Unknown]` in union `list[Unknown] | Divergent`
+ sklearn/ensemble/_forest.py:906:20 error[unresolved-attribute] Attribute `take` is not defined on `list[ndarray[tuple[Any, ...], dtype[Unknown]]]` in union `list[ndarray[tuple[Any, ...], dtype[Unknown]]] | Divergent`
- sklearn/neighbors/_classification.py:299:57 error[unresolved-attribute] Attribute `dtype` is not defined on `list[Unknown]` in union `Unknown | list[Unknown]`
+ sklearn/neighbors/_classification.py:299:57 error[unresolved-attribute] Attribute `dtype` is not defined on `list[ndarray[tuple[Any, ...], dtype[Unknown]]]` in union `ndarray[tuple[Any, ...], dtype[Unknown]] | Any | list[ndarray[tuple[Any, ...], dtype[Unknown]]]`
- sklearn/neighbors/_classification.py:402:44 error[unresolved-attribute] Attribute `size` is not defined on `list[Unknown]` in union `Unknown | list[Unknown]`
+ sklearn/neighbors/_classification.py:402:44 error[unresolved-attribute] Attribute `size` is not defined on `list[ndarray[tuple[Any, ...], dtype[Unknown]]]` in union `ndarray[tuple[Any, ...], dtype[Unknown]] | list[ndarray[tuple[Any, ...], dtype[Unknown]]]`
- sklearn/neighbors/_classification.py:848:44 error[unresolved-attribute] Attribute `size` is not defined on `list[Unknown]` in union `Unknown | list[Unknown]`
+ sklearn/neighbors/_classification.py:848:44 error[unresolved-attribute] Attribute `size` is not defined on `list[ndarray[tuple[Any, ...], dtype[Unknown]]]` in union `ndarray[tuple[Any, ...], dtype[Unknown]] | list[ndarray[tuple[Any, ...], dtype[Unknown]]]`
- sklearn/preprocessing/tests/test_data.py:1653:25 error[invalid-argument-type] Method `__getitem__` of type `Overload[(i: SupportsIndex, /) -> Unknown, (s: slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> list[Unknown]]` cannot be called with key of type `tuple[slice[None, None, None], slice[Literal[1], None, None]]` on object of type `list[Unknown]`
+ sklearn/preprocessing/tests/test_data.py:1653:25 error[invalid-argument-type] Method `__getitem__` of type `Overload[(i: SupportsIndex, /) -> list[int] | Unknown, (s: slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> list[list[int] | Unknown]]` cannot be called with key of type `tuple[slice[None, None, None], slice[Literal[1], None, None]]` on object of type `list[list[int] | Unknown]`

scipy (https://github.com/scipy/scipy)
+ doc/source/array_api_capabilities_table.py:92:33 error[invalid-argument-type] Argument to function `_make_reST_table` is incorrect: Expected `list[str]`, found `list[list[str] | str]`
+ doc/source/array_api_capabilities_table.py:140:40 error[invalid-argument-type] Argument to function `_make_reST_table` is incorrect: Expected `list[str]`, found `list[list[Unknown]]`
+ scipy/sparse/_index.py:429:21 error[unresolved-attribute] Attribute `shape` is not defined on `slice[Any, Any, Any]`, `int` in union `Unknown | slice[Any, Any, Any] | int | ndarray[tuple[int], dtype[signedinteger[_64Bit]]]`
+ scipy/special/tests/test_support_alternative_backends.py:192:20 error[unresolved-attribute] Attribute `rechunk` is not defined on `int` in union `Unknown | int`

scrapy (https://github.com/scrapy/scrapy)
+ tests/test_addons.py:83:31 error[unresolved-attribute] Object of type `type` has no attribute `number`
- tests/test_downloadermiddleware_cookies.py:737:58 error[invalid-argument-type] Argument to `Request.__init__` is incorrect: Expected `dict[str, str] | list[VerboseCookie] | None`, found `list[dict[str | Unknown, str | Unknown]]`
+ tests/test_downloadermiddleware_cookies.py:737:58 error[invalid-argument-type] Argument to `Request.__init__` is incorrect: Expected `dict[str, str] | list[VerboseCookie] | None`, found `list[dict[str, str | Unknown]]`

sockeye (https://github.com/awslabs/sockeye)
+ sockeye/data_io.py:723:9 error[invalid-argument-type] Argument is incorrect: Expected `list[tuple[int | float | None, int | float | None]] | None`, found `list[tuple[None, None] | tuple[int | float, int | float]]`

spack (https://github.com/spack/spack)
+ lib/spack/spack/cmd/repo.py:426:39 error[invalid-argument-type] Argument to function `len` is incorrect: Expected `Sized`, found `str | None`
+ lib/spack/spack/cmd/repo.py:431:35 error[invalid-argument-type] Argument to function `cescape` is incorrect: Expected `str`, found `str | None`
+ lib/spack/spack/cmd/__init__.py:543:48 error[unresolved-attribute] Attribute `prefix` is not defined on `None` in union `Unknown | None`
- lib/spack/spack/cmd/__init__.py:525:20 error[invalid-argument-type] Argument to function `colify` is incorrect: Expected `list[Any]`, found `GeneratorType[Unknown, None, None]`
+ lib/spack/spack/cmd/__init__.py:525:20 error[invalid-argument-type] Argument to function `colify` is incorrect: Expected `list[Any]`, found `GeneratorType[Unknown | str, None, None]`
+ lib/spack/spack/solver/asp.py:194:53 error[invalid-argument-type] Argument is incorrect: Expected `OptimizationKind`, found `int`

sphinx (https://github.com/sphinx-doc/sphinx)
+ sphinx/domains/c/_symbol.py:469:26 error[unresolved-attribute] Attribute `get_newest_id` is not defined on `None` in union `ASTDeclaration | None`
+ sphinx/domains/cpp/_symbol.py:782:20 error[unresolved-attribute] Attribute `objectType` is not defined on `None` in union `ASTDeclaration | None`
+ sphinx/domains/cpp/_symbol.py:785:26 error[unresolved-attribute] Attribute `get_newest_id` is not defined on `None` in union `ASTDeclaration | None`
- sphinx/domains/python/_annotations.py:187:20 error[invalid-return-type] Return type does not match returned value: expected `list[Node]`, found `list[Unknown] | list[desc_sig_punctuation]`
+ sphinx/domains/python/_annotations.py:187:20 error[invalid-return-type] Return type does not match returned value: expected `list[Node]`, found `list[Node | Unknown] | list[desc_sig_punctuation]`
+ sphinx/ext/autodoc/_dynamic/_member_finder.py:577:16 error[invalid-return-type] Return type does not match returned value: expected `_AutodocObjType | None`, found `str`

starlette (https://github.com/encode/starlette)
- tests/test_formparsers.py:668:25 warning[unused-type-ignore-comment] Unused blanket `type: ignore` directive
- tests/test_formparsers.py:715:21 warning[unused-type-ignore-comment] Unused blanket `type: ignore` directive

static-frame (https://github.com/static-frame/static-frame)
- static_frame/core/memory_measure.py:241:23 error[invalid-yield] Yield type `tuple[str, list[Unknown]]` does not match annotated yield type `tuple[tuple[str, ...], list[int]]`
+ static_frame/core/memory_measure.py:241:23 error[invalid-yield] Yield type `tuple[str, list[int]]` does not match annotated yield type `tuple[tuple[str, ...], list[int]]`

strawberry (https://github.com/strawberry-graphql/strawberry)
+ strawberry/federation/schema.py:232:16 error[invalid-return-type] Return type does not match returned value: expected `list[FederationAny]`, found `list[object]`
+ strawberry/printer/printer.py:146:18 error[no-matching-overload] No overload of bound method `str.join` matches arguments

sympy (https://github.com/sympy/sympy)
+ sympy/combinatorics/generators.py:239:22 error[invalid-argument-type] Argument to bound method `list.extend` is incorrect: Expected `Iterable[Unknown]`, found `MutableDenseMatrix`
+ sympy/combinatorics/pc_groups.py:353:36 error[unresolved-attribute] Attribute `array_form` is not defined on `tuple[()]` in union `Unknown | tuple[()]`
+ sympy/parsing/latex/__init__.py:129:39 error[invalid-argument-type] Method `__getitem__` of type `bound method dict[str, str].__getitem__(key: str, /) -> str` cannot be called with key of type `None` on object of type `dict[str, str]`
+ sympy/parsing/latex/__init__.py:134:29 error[invalid-argument-type] Method `__getitem__` of type `bound method dict[str, str].__getitem__(key: str, /) -> str` cannot be called with key of type `None` on object of type `dict[str, str]`
+ sympy/parsing/latex/__init__.py:135:30 error[unsupported-operator] Operator `>` is not supported between objects of type `int | None` and `Literal[0]`
+ sympy/categories/diagram_drawing.py:1138:13 error[invalid-argument-type] Method `__getitem__` of type `Overload[(i: SupportsIndex, /) -> list[Unknown], (s: slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> list[list[Unknown]]]` cannot be called with key of type `None` on object of type `list[list[Unknown]]`
+ sympy/core/exprtools.py:745:29 error[invalid-argument-type] Method `__getitem__` of type `bound method dict[Number, One | NegativeOne].__getitem__(key: Number, /) -> One | NegativeOne` cannot be called with key of type `Basic` on object of type `dict[Number, One | NegativeOne]`
+ sympy/core/function.py:2292:33 error[no-matching-overload] No overload of bound method `Expr.subs` matches arguments
+ sympy/core/mod.py:201:25 error[invalid-argument-type] Argument to constructor `Add.__new__` is incorrect: Expected `Expr | int | float | complex`, found `Unknown | Basic`
+ sympy/core/mul.py:1482:16 error[unresolved-attribute] Attribute `is_Integer` is not defined on `int` in union `Expr | int`
+ sympy/core/mul.py:1483:35 error[unresolved-attribute] Object of type `Expr | int` has no attribute `p`
+ sympy/core/mul.py:1483:42 error[unresolved-attribute] Object of type `Expr | int` has no attribute `p`
+ sympy/core/mul.py:1496:41 error[unresolved-attribute] Attribute `is_even` is not defined on `int` in union `Expr | int`
+ sympy/core/mul.py:1496:64 error[unresolved-attribute] Object of type `Expr` has no attribute `p`
+ sympy/functions/elementary/exponential.py:379:42 error[invalid-argument-type] Argument to constructor `Add.__new__` is incorrect: Expected `Expr | int | float | complex`, found `Basic | Unknown`
+ sympy/functions/elementary/piecewise.py:363:25 error[invalid-argument-type] Argument to bound method `list.append` is incorrect: Expected `tuple[Unknown, Boolean]`, found `tuple[Unknown, Literal[True]]`
+ sympy/integrals/tests/test_meijerint.py:364:53 error[invalid-argument-type] Argument is incorrect: Expected `dict[Basic, Basic | int | float] | None`, found `dict[Unknown, int | float]`
+ sympy/physics/quantum/hilbert.py:377:63 error[unresolved-attribute] Attribute `exp` is not defined on `Basic`, `None` in union `Unknown | Basic | None`
+ sympy/plotting/pygletplot/color_scheme.py:262:51 error[not-subscriptable] Cannot subscript object of type `None` with no `__getitem__` method
+ sympy/polys/domains/domain.py:1037:16 error[invalid-return-type] Return type does not match returned value: expected `list[Er@Domain]`, found `list[list[Er@Domain] | Er@Domain]`
+ sympy/printing/julia.py:170:16 error[unresolved-attribute] Attribute `base` is not defined on `Expr` in union `Unknown | Expr`
+ sympy/printing/octave.py:187:16 error[unresolved-attribute] Attribute `base` is not defined on `Expr` in union `Unknown | Expr`
+ sympy/printing/pretty/pretty.py:713:28 error[unresolved-attribute] Object of type `str` has no attribute `width`
+ sympy/printing/pretty/pretty.py:726:24 error[unresolved-attribute] Object of type `str` has no attribute `width`
+ sympy/printing/pretty/pretty.py:1036:35 error[invalid-argument-type] Argument to function `prettyForm.__mul__` is incorrect: Expected `prettyForm`, found `prettyForm | str`
+ sympy/printing/pretty/pretty.py:1410:21 error[unresolved-attribute] Attribute `width` is not defined on `str` in union `str | prettyForm`
+ sympy/printing/pretty/pretty.py:1421:24 error[unresolved-attribute] Attribute `width` is not defined on `str` in union `str | prettyForm`
+ sympy/simplify/fu.py:165:28 error[invalid-argument-type] Argument to constructor `Mul.__new__` is incorrect: Expected `Expr | int | float | complex`, found `tuple[Unknown, Unknown | Expr]`
+ sympy/simplify/simplify.py:1102:43 error[invalid-argument-type] Argument to constructor `Mul.__new__` is incorrect: Expected `Expr | int | float | complex`, found `Unknown | Basic`
+ sympy/solvers/ode/hypergeometric.py:199:26 error[unsupported-operator] Operator `+` is not supported between objects of type `Literal[1]` and `Basic`
+ sympy/solvers/ode/hypergeometric.py:202:22 error[unsupported-operator] Operator `+` is not supported between objects of type `Basic` and `Literal[1]`
+ sympy/solvers/solvers.py:3401:22 error[invalid-argument-type] Argument to constructor `Mul.__new__` is incorrect: Expected `Expr | int | float | complex`, found `Unknown | Basic`
+ sympy/tensor/tensor.py:410:20 error[unresolved-attribute] Attribute `comm` is not defined on `int` in union `Unknown | int`
+ sympy/utilities/codegen.py:1380:29 error[invalid-argument-type] Argument to bound method `list.append` is incorrect: Expected `InOutArgument`, found `InputArgument`
+ sympy/utilities/codegen.py:1819:29 error[invalid-argument-type] Argument to bound method `list.append` is incorrect: Expected `InOutArgument`, found `InputArgument`
- sympy/vector/basisdependent.py:225:9 error[invalid-assignment] Object of type `dict[Unknown, Unknown]` is not assignable to attribute `_components` on type `Expr & ~Mul`
+ sympy/vector/basisdependent.py:225:9 error[invalid-assignment] Object of type `dict[Unknown, Divergent]` is not assignable to attribute `_components` on type `Expr & ~Mul`

vision (https://github.com/pytorch/vision)
+ test/test_image.py:593:26 error[unresolved-attribute] Attribute `cpu` is not defined on `list[Unknown]` in union `Unknown | list[Unknown]`
+ test/test_image.py:593:42 error[unresolved-attribute] Attribute `cpu` is not defined on `list[Unknown]` in union `Unknown | list[Unknown]`

xarray (https://github.com/pydata/xarray)
+ xarray/core/variable.py:755:35 error[invalid-argument-type] Argument to `OuterIndexer.__init__` is incorrect: Expected `tuple[int | integer[Any] | slice[Any, Any, Any] | ndarray[Any, dtype[generic[Any]]], ...]`, found `tuple[(Unknown & int) | (Unknown & Top[integer[Any]]) | (Unknown & slice[object, object, object]) | ... omitted 5 union elements, ...]`
+ xarray/tests/test_interp.py:959:63 error[invalid-argument-type] Argument expression after ** must be a mapping with `str` key type: Found `Hashable`

zulip (https://github.com/zulip/zulip)
+ zerver/lib/display_recipient.py:77:12 error[invalid-return-type] Return type does not match returned value: expected `dict[int, UserDisplayRecipient]`, found `dict[int, dict[str, Any] | UserDisplayRecipient]`
+ zerver/lib/streams.py:1159:70 error[unresolved-attribute] Object of type `Stream` has no attribute `realm_id`
+ zerver/lib/streams.py:1170:34 error[unresolved-attribute] Object of type `Stream` has no attribute `realm_id`
+ zerver/lib/test_classes.py:2108:30 error[unresolved-attribute] Object of type `RealmEmoji` has no attribute `realm_id`
+ zerver/lib/user_groups.py:743:18 error[unresolved-attribute] Object of type `object` has no attribute `name`
+ zerver/lib/user_groups.py:746:25 error[unresolved-attribute] Object of type `object` has no attribute `description`
+ zerver/lib/user_groups.py:749:29 error[unresolved-attribute] Object of type `object` has no attribute `is_system_group`
+ zerver/lib/user_groups.py:768:25 error[unresolved-attribute] Object of type `object` has no attribute `deactivated`
+ zerver/lib/user_groups.py:772:12 error[unresolved-attribute] Object of type `object` has no attribute `is_system_group`
- zerver/lib/user_groups.py:730:48 error[unresolved-attribute] Attribute `id` is not defined on `NamedUserGroup` in union `NamedUserGroup | Unknown`
+ zerver/lib/user_groups.py:730:48 error[unresolved-attribute] Object of type `object` has no attribute `id`
- zerver/lib/user_groups.py:731:50 error[unresolved-attribute] Attribute `id` is not defined on `NamedUserGroup` in union `NamedUserGroup | Unknown`
+ zerver/lib/user_groups.py:731:50 error[unresolved-attribute] Object of type `object` has no attribute `id`
- zerver/lib/user_groups.py:757:17 error[unresolved-attribute] Attribute `can_leave_group_id` is not defined on `NamedUserGroup` in union `NamedUserGroup | Unknown`
+ zerver/lib/user_groups.py:757:17 error[unresolved-attribute] Object of type `object` has no attribute `can_leave_group_id`
- zerver/lib/user_groups.py:760:17 error[unresolved-attribute] Attribute `can_manage_group_id` is not defined on `NamedUserGroup` in union `NamedUserGroup | Unknown`
+ zerver/lib/user_groups.py:760:17 error[unresolved-attribute] Object of type `object` has no attribute `can_manage_group_id`

Full report with detailed diff (timing results)

ibraheemdev added a commit that referenced this pull request Mar 19, 2026
@ibraheemdev
ibraheemdev force-pushed the ibraheem/extended-bidi branch 2 times, most recently from 22b0dae to db3943a Compare March 24, 2026 17:16
@ibraheemdev
ibraheemdev force-pushed the ibraheem/extended-bidi branch 3 times, most recently from ec85b01 to 755e2ec Compare April 15, 2026 23:19
@ibraheemdev
ibraheemdev changed the base branch from main to ibraheem/callable-tcx April 15, 2026 23:19
@ibraheemdev
ibraheemdev force-pushed the ibraheem/extended-bidi branch 5 times, most recently from 441b537 to b4ed0f2 Compare April 16, 2026 03:07
@ibraheemdev
ibraheemdev force-pushed the ibraheem/callable-tcx branch from d846470 to 61ab8ef Compare April 18, 2026 06:28
@ibraheemdev
ibraheemdev force-pushed the ibraheem/extended-bidi branch from dd39cd9 to e8205a9 Compare April 18, 2026 06:28
@astral-sh-bot

astral-sh-bot Bot commented Apr 18, 2026

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.

@ibraheemdev
ibraheemdev force-pushed the ibraheem/callable-tcx branch 3 times, most recently from 959bd84 to 3aaf9ed Compare April 23, 2026 19:30
ibraheemdev added a commit that referenced this pull request Apr 23, 2026
Improves #22633 to infer the use
of lambda parameters in a lambda body with type context, e.g.,
```py
x: Callable[[str], str] = lambda x: reveal_type(x)  # revealed: str
reveal_type(x)  # revealed: (x: str) -> str
```

Unlike other definitions, lambda parameter types cannot be determined
purely syntactically in semantic indexing. Instead, they depend on the
inferred type of the lambda to access its parameter types.
Unfortunately, this makes lambda inference cyclic, as the body of the
lambda depends on the outer lambda type, and there is no obvious way of
splitting out inference of the lambda parameter types from its return
type.

To avoid initiating cycles on the entire scope containing the lambda,
this PR introduces a new inference query — statement-level inference.
Statements are a minimal unit of code that encapsulate any internal type
context. This makes them very useful to infer a given sub-expression
"naturally" without having to provide any external type context. There
are other places where we currently rely on scope-level inference for
this purpose (e.g., see `infer_complete_scope_types`, the current
implementation of #23761, and the
discussion in astral-sh/ty#3124). Note that
statement-level inference is not perfectly fine-grained, e.g., the test
expression of an `if` statement does not require external type context
and is independent from its body, so statement-level inference may lead
to unnecessarily large cycles, but having the unit of code being
generalized to an AST structure allows us to avoid the need for such
special cases, but this can always change in the future.

Additionally, many statements are simply wrappers around definitions or
standalone expressions, so we can avoid extra salsa allocations in the
common case.
Base automatically changed from ibraheem/callable-tcx to main April 23, 2026 20:06
KotlinIsland pushed a commit to KotlinIsland/basedpython that referenced this pull request May 1, 2026
…ever` (#24056)

This showed up in astral-sh/ruff#23761 with
`Divergent | Any`.
@ibraheemdev
ibraheemdev force-pushed the ibraheem/extended-bidi branch 5 times, most recently from bfd688b to 463d458 Compare May 8, 2026 00:53
@ibraheemdev
ibraheemdev force-pushed the ibraheem/extended-bidi branch 8 times, most recently from caa4f91 to a21c419 Compare May 20, 2026 01:09
@ibraheemdev
ibraheemdev force-pushed the ibraheem/extended-bidi branch from 3af7181 to 8ec4ff6 Compare May 20, 2026 15:36
@ibraheemdev
ibraheemdev force-pushed the ibraheem/extended-bidi branch from 3921df8 to 1b59f53 Compare May 20, 2026 18:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ty Multi-file analysis & type inference

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant