Skip to content

[ty] Narrow keyword arguments when unpacking dictionary instances#23436

Merged
ibraheemdev merged 2 commits intomainfrom
ibraheem/dict-unpack-narrowing
Mar 17, 2026
Merged

[ty] Narrow keyword arguments when unpacking dictionary instances#23436
ibraheemdev merged 2 commits intomainfrom
ibraheem/dict-unpack-narrowing

Conversation

@ibraheemdev
Copy link
Member

Extends #22882 to use narrowed keys when inferring splatted dictionary expressions.

Resolves astral-sh/ty#1248.

@ibraheemdev ibraheemdev added ty Multi-file analysis & type inference ecosystem-analyzer labels Feb 20, 2026
@astral-sh-bot
Copy link

astral-sh-bot bot commented Feb 20, 2026

Typing conformance results

No changes detected ✅

Current numbers
The percentage of diagnostics emitted that were expected errors held steady at 85.29%. The percentage of expected errors that received a diagnostic held steady at 78.13%. The number of fully passing files held steady at 64/132.

@astral-sh-bot
Copy link

astral-sh-bot bot commented Feb 20, 2026

Memory usage report

Summary

Project Old New Diff Outcome
prefect 698.34MB 700.38MB +0.29% (2.04MB)
sphinx 263.59MB 264.31MB +0.27% (742.18kB)
trio 116.18MB 116.53MB +0.30% (360.09kB)
flake8 48.02MB 48.22MB +0.41% (203.01kB)

Significant changes

Click to expand detailed breakdown

prefect

Name Old New Diff Outcome
semantic_index 171.75MB 173.31MB +0.91% (1.56MB)
infer_definition_types 89.95MB 90.11MB +0.18% (170.30kB)
CallableType 1.60MB 1.67MB +4.51% (73.76kB)
Type<'db>::member_lookup_with_policy_ 16.10MB 16.14MB +0.22% (36.96kB)
is_redundant_with_impl 5.58MB 5.61MB +0.55% (31.35kB)
is_redundant_with_impl::interned_arguments 5.37MB 5.40MB +0.43% (23.72kB)
IntersectionType 2.31MB 2.33MB +0.82% (19.38kB)
Type<'db>::member_lookup_with_policy_::interned_arguments 5.66MB 5.68MB +0.31% (18.08kB)
Type<'db>::apply_specialization_::interned_arguments 2.88MB 2.90MB +0.51% (15.08kB)
infer_expression_types_impl 55.86MB 55.87MB +0.02% (12.41kB)
Type<'db>::apply_specialization_ 3.61MB 3.62MB +0.32% (11.74kB)
UnionType 3.47MB 3.48MB +0.27% (9.64kB)
Type<'db>::class_member_with_policy_::interned_arguments 9.41MB 9.42MB +0.10% (9.55kB)
Type<'db>::class_member_with_policy_ 17.57MB 17.58MB +0.05% (8.70kB)
infer_scope_types_impl 52.98MB 52.98MB +0.02% (8.34kB)
... 23 more

sphinx

Name Old New Diff Outcome
semantic_index 61.79MB 62.38MB +0.96% (605.16kB)
infer_definition_types 24.51MB 24.54MB +0.14% (35.62kB)
CallableType 923.96kB 946.67kB +2.46% (22.71kB)
Type<'db>::member_lookup_with_policy_ 6.50MB 6.52MB +0.20% (13.56kB)
is_redundant_with_impl 1.81MB 1.82MB +0.51% (9.40kB)
is_redundant_with_impl::interned_arguments 2.08MB 2.09MB +0.35% (7.48kB)
Type<'db>::member_lookup_with_policy_::interned_arguments 2.64MB 2.65MB +0.26% (7.11kB)
IntersectionType 895.93kB 902.96kB +0.78% (7.03kB)
infer_expression_types_impl 19.93MB 19.93MB +0.03% (6.56kB)
Type<'db>::apply_specialization_::interned_arguments 1.45MB 1.45MB +0.25% (3.75kB)
Type<'db>::class_member_with_policy_::interned_arguments 4.01MB 4.01MB +0.09% (3.66kB)
Type<'db>::class_member_with_policy_ 7.63MB 7.64MB +0.04% (3.06kB)
Type<'db>::apply_specialization_ 1.66MB 1.66MB +0.15% (2.62kB)
UnionType 1.24MB 1.24MB +0.18% (2.28kB)
ProtocolInterface 112.45kB 114.64kB +1.95% (2.19kB)
... 10 more

trio

Name Old New Diff Outcome
semantic_index 30.04MB 30.37MB +1.11% (342.70kB)
infer_definition_types 7.53MB 7.54MB +0.07% (5.59kB)
Type<'db>::member_lookup_with_policy_ 1.82MB 1.83MB +0.10% (1.81kB)
Type<'db>::try_call_dunder_get_ 1.37MB 1.37MB +0.10% (1.37kB)
is_redundant_with_impl 475.85kB 477.15kB +0.27% (1.30kB)
CallableType 489.79kB 490.98kB +0.24% (1.20kB)
Type<'db>::class_member_with_policy_ 2.00MB 2.00MB +0.06% (1.16kB)
Type<'db>::class_member_with_policy_::interned_arguments 1.11MB 1.11MB +0.07% (832.00B)
Type<'db>::member_lookup_with_policy_::interned_arguments 909.19kB 909.90kB +0.08% (728.00B)
FunctionType<'db>::signature_ 1.07MB 1.08MB +0.04% (452.00B)
IntersectionType 230.86kB 231.25kB +0.17% (400.00B)
is_redundant_with_impl::interned_arguments 537.28kB 537.62kB +0.06% (352.00B)
infer_deferred_types 2.36MB 2.36MB +0.01% (316.00B)
Type<'db>::apply_specialization_::interned_arguments 645.55kB 645.78kB +0.04% (240.00B)
FunctionType 1.50MB 1.50MB +0.01% (224.00B)
... 14 more

flake8

Name Old New Diff Outcome
semantic_index 13.78MB 13.97MB +1.33% (187.69kB)
Type<'db>::member_lookup_with_policy_ 484.18kB 485.98kB +0.37% (1.81kB)
Type<'db>::apply_specialization_::interned_arguments 202.34kB 203.75kB +0.69% (1.41kB)
CallableType 142.38kB 143.58kB +0.84% (1.20kB)
Type<'db>::class_member_with_policy_ 566.15kB 567.30kB +0.20% (1.16kB)
Type<'db>::apply_specialization_ 216.51kB 217.50kB +0.45% (1008.00B)
Type<'db>::class_member_with_policy_::interned_arguments 304.79kB 305.60kB +0.27% (832.00B)
infer_expression_types_impl 1.03MB 1.04MB +0.07% (792.00B)
Type<'db>::member_lookup_with_policy_::interned_arguments 227.09kB 227.80kB +0.31% (728.00B)
StringLiteralType 193.92kB 194.54kB +0.32% (640.00B)
infer_definition_types 1.95MB 1.95MB +0.03% (568.00B)
Type<'db>::try_call_dunder_get_ 373.83kB 374.37kB +0.14% (548.00B)
infer_scope_types_impl 1001.57kB 1002.02kB +0.05% (468.00B)
is_redundant_with_impl 139.85kB 140.30kB +0.32% (456.00B)
FunctionType<'db>::signature_ 358.91kB 359.36kB +0.12% (452.00B)
... 24 more

@astral-sh-bot
Copy link

astral-sh-bot bot commented Feb 20, 2026

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.

@codspeed-hq
Copy link

codspeed-hq bot commented Feb 20, 2026

Merging this PR will not alter performance

✅ 56 untouched benchmarks


Comparing ibraheem/dict-unpack-narrowing (000add9) with main (74769e8)

Open in CodSpeed

@astral-sh-bot
Copy link

astral-sh-bot bot commented Feb 20, 2026

ecosystem-analyzer results

Lint rule Added Removed Changed
invalid-argument-type 0 265 10
unused-type-ignore-comment 7 0 0
no-matching-overload 0 1 0
Total 7 266 10

Full report with detailed diff (timing results)

@ibraheemdev ibraheemdev marked this pull request as draft February 20, 2026 02:14
@ibraheemdev ibraheemdev force-pushed the ibraheem/dict-unpack-narrowing branch 3 times, most recently from 3862660 to 1d08375 Compare February 20, 2026 12:00
@astral-sh-bot
Copy link

astral-sh-bot bot commented Feb 20, 2026

mypy_primer results

Changes were detected when running on open source projects
attrs (https://github.com/python-attrs/attrs)
- src/attr/_funcs.py:487:44: error[invalid-argument-type] Argument to function `get_type_hints` is incorrect: Expected `dict[str, Any] | None`, found `Unknown | None | bool`
- src/attr/_funcs.py:487:44: error[invalid-argument-type] Argument to function `get_type_hints` is incorrect: Expected `Mapping[str, Any] | None`, found `Unknown | None | bool`
- src/attr/_funcs.py:487:44: error[invalid-argument-type] Argument to function `get_type_hints` is incorrect: Expected `bool`, found `Unknown | None | bool`
- Found 644 diagnostics
+ Found 641 diagnostics

pyinstrument (https://github.com/joerick/pyinstrument)
- pyinstrument/context_manager.py:40:34: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `int | float`, found `@Todo | None`
- pyinstrument/context_manager.py:40:34: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Literal["enabled", "disabled", "strict"]`, found `@Todo | None`
- Found 41 diagnostics
+ Found 39 diagnostics

pip (https://github.com/pypa/pip)
- src/pip/_vendor/requests/cookies.py:489:29: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `int | None`, found `int | Unknown | None | str | dict[str, None]`
- src/pip/_vendor/requests/cookies.py:489:29: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `str`, found `int | Unknown | None | str | dict[str, None]`
- src/pip/_vendor/requests/cookies.py:489:29: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `str | None`, found `int | Unknown | None | str | dict[str, None]`
- src/pip/_vendor/requests/cookies.py:489:29: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `str | None`, found `int | Unknown | None | str | dict[str, None]`
- src/pip/_vendor/requests/cookies.py:489:29: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `bool`, found `int | Unknown | None | str | dict[str, None]`
- src/pip/_vendor/requests/cookies.py:489:29: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `str`, found `int | Unknown | None | str | dict[str, None]`
- src/pip/_vendor/requests/cookies.py:489:29: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `bool`, found `int | Unknown | None | str | dict[str, None]`
- src/pip/_vendor/requests/cookies.py:489:29: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `bool`, found `int | Unknown | None | str | dict[str, None]`
- src/pip/_vendor/requests/cookies.py:489:29: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `str`, found `int | Unknown | None | str | dict[str, None]`
- src/pip/_vendor/requests/cookies.py:489:29: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `bool`, found `int | Unknown | None | str | dict[str, None]`
- src/pip/_vendor/requests/cookies.py:489:29: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `bool`, found `int | Unknown | None | str | dict[str, None]`
- src/pip/_vendor/requests/cookies.py:489:29: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `int | None`, found `int | Unknown | None | str | dict[str, None]`
- src/pip/_vendor/requests/cookies.py:489:29: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `bool`, found `int | Unknown | None | str | dict[str, None]`
- src/pip/_vendor/requests/cookies.py:489:29: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `str | None`, found `int | Unknown | None | str | dict[str, None]`
- src/pip/_vendor/requests/cookies.py:489:29: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `str | None`, found `int | Unknown | None | str | dict[str, None]`
- src/pip/_vendor/requests/cookies.py:489:29: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `dict[str, str]`, found `int | Unknown | None | str | dict[str, None]`
+ src/pip/_vendor/requests/cookies.py:489:29: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `dict[str, str]`, found `dict[str, None]`
- src/pip/_vendor/requests/cookies.py:489:29: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `bool`, found `int | Unknown | None | str | dict[str, None]`
- src/pip/_vendor/urllib3/util/ssl_.py:182:62: error[invalid-argument-type] Argument to function `wrap_socket` is incorrect: Expected `str | bytes | PathLike[str] | PathLike[bytes] | None`, found `Unknown | None | VerifyMode | bool`
- src/pip/_vendor/urllib3/util/ssl_.py:182:62: error[invalid-argument-type] Argument to function `wrap_socket` is incorrect: Expected `str | bytes | PathLike[str] | PathLike[bytes] | None`, found `Unknown | None | VerifyMode | bool`
- src/pip/_vendor/urllib3/util/ssl_.py:182:62: error[invalid-argument-type] Argument to function `wrap_socket` is incorrect: Expected `bool`, found `Unknown | None | VerifyMode | bool`
- src/pip/_vendor/urllib3/util/ssl_.py:182:62: error[invalid-argument-type] Argument to function `wrap_socket` is incorrect: Expected `int`, found `Unknown | None | VerifyMode | bool`
- src/pip/_vendor/urllib3/util/ssl_.py:182:62: error[invalid-argument-type] Argument to function `wrap_socket` is incorrect: Expected `int`, found `Unknown | None | VerifyMode | bool`
- src/pip/_vendor/urllib3/util/ssl_.py:182:62: error[invalid-argument-type] Argument to function `wrap_socket` is incorrect: Expected `str | None`, found `Unknown | None | VerifyMode | bool`
- Found 637 diagnostics
+ Found 615 diagnostics

spack (https://github.com/spack/spack)
- lib/spack/spack/cmd/create.py:1094:29: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `list[str]`, found `Unknown | str | list[str]`
- lib/spack/spack/cmd/create.py:1094:29: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `list[str]`, found `Unknown | str | list[str]`
- lib/spack/spack/cmd/create.py:1094:29: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `list[str]`, found `Unknown | str | list[str]`
- lib/spack/spack/cmd/create.py:1094:29: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `str`, found `Unknown | str | list[str]`
- lib/spack/spack/cmd/create.py:1094:29: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `list[str]`, found `Unknown | str | list[str]`
- lib/spack/spack/cmd/create.py:1094:29: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `list[str]`, found `Unknown | str | list[str]`
- lib/spack/spack/cmd/create.py:1094:29: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `list[str]`, found `Unknown | str | list[str]`
- lib/spack/spack/cmd/create.py:1094:29: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `list[str]`, found `Unknown | str | list[str]`
- lib/spack/spack/cmd/create.py:1094:29: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `list[str]`, found `Unknown | str | list[str]`
- lib/spack/spack/cmd/create.py:1094:29: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `list[str]`, found `Unknown | str | list[str]`
- lib/spack/spack/cmd/create.py:1094:29: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `list[str]`, found `Unknown | str | list[str]`
- lib/spack/spack/cmd/create.py:1094:29: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `list[str]`, found `Unknown | str | list[str]`
- lib/spack/spack/cmd/create.py:1094:29: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `list[str]`, found `Unknown | str | list[str]`
- lib/spack/spack/cmd/create.py:1094:29: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `list[str]`, found `Unknown | str | list[str]`
- lib/spack/spack/cmd/create.py:1094:29: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `list[str]`, found `Unknown | str | list[str]`
- lib/spack/spack/cmd/create.py:1094:29: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `list[str]`, found `Unknown | str | list[str]`
- lib/spack/spack/cmd/create.py:1094:29: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `list[str]`, found `Unknown | str | list[str]`
- lib/spack/spack/cmd/create.py:1094:29: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `list[str]`, found `Unknown | str | list[str]`
- lib/spack/spack/cmd/create.py:1094:29: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `list[str]`, found `Unknown | str | list[str]`
- lib/spack/spack/cmd/create.py:1094:29: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `list[str]`, found `Unknown | str | list[str]`
- lib/spack/spack/cmd/create.py:1094:29: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `list[str]`, found `Unknown | str | list[str]`
- lib/spack/spack/cmd/create.py:1094:29: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `list[str]`, found `Unknown | str | list[str]`
- lib/spack/spack/cmd/create.py:1094:29: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `list[str]`, found `Unknown | str | list[str]`
- lib/spack/spack/cmd/create.py:1094:29: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `list[str]`, found `Unknown | str | list[str]`
- lib/spack/spack/cmd/create.py:1094:29: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `list[str]`, found `Unknown | str | list[str]`
- lib/spack/spack/fetch_strategy.py:975:73: error[invalid-argument-type] Argument to function `git_clone` is incorrect: Expected `bool`, found `Any | None`
- lib/spack/spack/fetch_strategy.py:978:90: error[invalid-argument-type] Argument to function `git_clone` is incorrect: Expected `bool`, found `Any | None`
- lib/spack/spack/fetch_strategy.py:982:82: error[invalid-argument-type] Argument to function `git_checkout` is incorrect: Expected `bool`, found `Any | None`
- Found 4416 diagnostics
+ Found 4388 diagnostics

werkzeug (https://github.com/pallets/werkzeug)
- src/werkzeug/test.py:409:20: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `str`, found `str | Any | None | Headers`
- src/werkzeug/test.py:409:20: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `str | None`, found `str | Any | None | Headers`
- src/werkzeug/test.py:409:20: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Mapping[str, str] | str | None`, found `str | Any | None | Headers`
- src/werkzeug/test.py:409:20: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `str`, found `str | Any | None | Headers`
- src/werkzeug/test.py:409:20: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `IO[bytes] | None`, found `str | Any | None | Headers`
- src/werkzeug/test.py:409:20: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `str | None`, found `str | Any | None | Headers`
- src/werkzeug/test.py:409:20: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `int | None`, found `str | Any | None | Headers`
+ src/werkzeug/test.py:409:20: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `int | None`, found `str | None`
- src/werkzeug/test.py:409:20: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `IO[str] | None`, found `str | Any | None | Headers`
- src/werkzeug/test.py:409:20: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `bool`, found `str | Any | None | Headers`
- src/werkzeug/test.py:409:20: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `bool`, found `str | Any | None | Headers`
- src/werkzeug/test.py:409:20: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `bool`, found `str | Any | None | Headers`
- src/werkzeug/test.py:409:20: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Iterable[tuple[str, str]] | None`, found `str | Any | None | Headers`
- Found 387 diagnostics
+ Found 376 diagnostics

scrapy (https://github.com/scrapy/scrapy)
- tests/test_downloaderslotssettings.py:105:21: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `bool`, found `int`
- Found 1794 diagnostics
+ Found 1793 diagnostics

graphql-core (https://github.com/graphql-python/graphql-core)
+ tests/error/test_graphql_error.py:403:46: warning[unused-type-ignore-comment] Unused blanket `type: ignore` directive
+ tests/test_user_registry.py:283:51: warning[unused-type-ignore-comment] Unused blanket `type: ignore` directive
+ tests/test_user_registry.py:337:51: warning[unused-type-ignore-comment] Unused blanket `type: ignore` directive
- Found 638 diagnostics
+ Found 641 diagnostics

paasta (https://github.com/yelp/paasta)
- paasta_tools/tron/client.py:44:37: error[invalid-argument-type] Argument to function `get` is incorrect: Expected `str | bytes`, found `str | dict[str, str]`
- paasta_tools/tron/client.py:44:37: error[invalid-argument-type] Argument to function `get` is incorrect: Expected `Mapping[str, str | bytes | None] | None`, found `str | dict[str, str]`
- paasta_tools/tron/client.py:50:38: error[invalid-argument-type] Argument to function `post` is incorrect: Expected `str | bytes`, found `str | dict[str, str]`
- paasta_tools/tron/client.py:50:38: error[invalid-argument-type] Argument to function `post` is incorrect: Expected `Mapping[str, str | bytes | None] | None`, found `str | dict[str, str]`
- Found 1069 diagnostics
+ Found 1065 diagnostics

ignite (https://github.com/pytorch/ignite)
- tests/ignite/handlers/test_state_param_scheduler.py:336:49: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `int | float`, found `str | int | float | list[int]`
- tests/ignite/handlers/test_state_param_scheduler.py:336:49: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `int | float`, found `str | int | float | list[int]`
- tests/ignite/handlers/test_state_param_scheduler.py:336:49: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `list[int]`, found `str | int | float | list[int]`
- tests/ignite/handlers/test_state_param_scheduler.py:336:49: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `str`, found `str | int | float | list[int]`
- tests/ignite/handlers/test_state_param_scheduler.py:336:49: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `bool`, found `str | int | float | list[int]`
- tests/ignite/handlers/test_state_param_scheduler.py:342:84: error[invalid-argument-type] Argument to bound method `plot_values` is incorrect: Expected `Mapping[Unknown, Unknown]`, found `str | int | float | list[int]`
- Found 2242 diagnostics
+ Found 2236 diagnostics

poetry (https://github.com/python-poetry/poetry)
+ tests/fixtures/directory/project_with_transitive_directory_dependencies/setup.py:26:7: error[invalid-argument-type] Argument to function `setup` is incorrect: Expected `str`, found `None`
+ tests/fixtures/directory/project_with_transitive_directory_dependencies/setup.py:26:7: error[invalid-argument-type] Argument to function `setup` is incorrect: Expected `str`, found `None`
- tests/fixtures/directory/project_with_transitive_directory_dependencies/setup.py:26:7: error[invalid-argument-type] Argument to function `setup` is incorrect: Expected `str`, found `str | None | list[str] | dict[str, list[str]]`
- tests/fixtures/directory/project_with_transitive_directory_dependencies/setup.py:26:7: error[invalid-argument-type] Argument to function `setup` is incorrect: Expected `str`, found `str | None | list[str] | dict[str, list[str]]`
- tests/fixtures/directory/project_with_transitive_directory_dependencies/setup.py:26:7: error[invalid-argument-type] Argument to function `setup` is incorrect: Expected `str`, found `str | None | list[str] | dict[str, list[str]]`
- tests/fixtures/directory/project_with_transitive_directory_dependencies/setup.py:26:7: error[invalid-argument-type] Argument to function `setup` is incorrect: Expected `str`, found `str | None | list[str] | dict[str, list[str]]`
- tests/fixtures/directory/project_with_transitive_directory_dependencies/setup.py:26:7: error[invalid-argument-type] Argument to function `setup` is incorrect: Expected `str`, found `str | None | list[str] | dict[str, list[str]]`
- tests/fixtures/directory/project_with_transitive_directory_dependencies/setup.py:26:7: error[invalid-argument-type] Argument to function `setup` is incorrect: Expected `str`, found `str | None | list[str] | dict[str, list[str]]`
- tests/fixtures/directory/project_with_transitive_directory_dependencies/setup.py:26:7: error[invalid-argument-type] Argument to function `setup` is incorrect: Expected `str`, found `str | None | list[str] | dict[str, list[str]]`
- tests/fixtures/directory/project_with_transitive_directory_dependencies/setup.py:26:7: error[invalid-argument-type] Argument to function `setup` is incorrect: Expected `list[str]`, found `str | None | list[str] | dict[str, list[str]]`
- tests/fixtures/directory/project_with_transitive_directory_dependencies/setup.py:26:7: error[invalid-argument-type] Argument to function `setup` is incorrect: Expected `Mapping[str, list[str]]`, found `str | None | list[str] | dict[str, list[str]]`
- Found 987 diagnostics
+ Found 980 diagnostics

pydantic (https://github.com/pydantic/pydantic)
- pydantic/_internal/_core_metadata.py:87:54: error[invalid-assignment] Invalid assignment to key "pydantic_js_extra" with declared type `dict[str, Divergent] | ((dict[str, Divergent], /) -> None) | ((dict[str, Divergent], type[Any], /) -> None)` on TypedDict `CoreMetadata`: value of type `dict[object, object]`
+ pydantic/_internal/_core_metadata.py:87:54: error[invalid-assignment] Invalid assignment to key "pydantic_js_extra" with declared type `dict[str, int | float | str | ... omitted 3 union elements] | ((dict[str, int | float | str | ... omitted 3 union elements], /) -> None) | ((dict[str, int | float | str | ... omitted 3 union elements], type[Any], /) -> None)` on TypedDict `CoreMetadata`: value of type `dict[object, object]`
- pydantic/fields.py:949:5: error[invalid-parameter-default] Default value of type `PydanticUndefinedType` is not assignable to annotated parameter type `dict[str, Divergent] | ((dict[str, Divergent], /) -> None) | None`
+ pydantic/fields.py:949:5: error[invalid-parameter-default] Default value of type `PydanticUndefinedType` is not assignable to annotated parameter type `dict[str, int | float | str | ... omitted 3 union elements] | ((dict[str, int | float | str | ... omitted 3 union elements], /) -> None) | None`
- pydantic/fields.py:989:5: error[invalid-parameter-default] Default value of type `PydanticUndefinedType` is not assignable to annotated parameter type `dict[str, Divergent] | ((dict[str, Divergent], /) -> None) | None`
+ pydantic/fields.py:989:5: error[invalid-parameter-default] Default value of type `PydanticUndefinedType` is not assignable to annotated parameter type `dict[str, int | float | str | ... omitted 3 union elements] | ((dict[str, int | float | str | ... omitted 3 union elements], /) -> None) | None`
- pydantic/fields.py:1032:5: error[invalid-parameter-default] Default value of type `PydanticUndefinedType` is not assignable to annotated parameter type `dict[str, Divergent] | ((dict[str, Divergent], /) -> None) | None`
+ pydantic/fields.py:1032:5: error[invalid-parameter-default] Default value of type `PydanticUndefinedType` is not assignable to annotated parameter type `dict[str, int | float | str | ... omitted 3 union elements] | ((dict[str, int | float | str | ... omitted 3 union elements], /) -> None) | None`
- pydantic/fields.py:1072:5: error[invalid-parameter-default] Default value of type `PydanticUndefinedType` is not assignable to annotated parameter type `dict[str, Divergent] | ((dict[str, Divergent], /) -> None) | None`
+ pydantic/fields.py:1072:5: error[invalid-parameter-default] Default value of type `PydanticUndefinedType` is not assignable to annotated parameter type `dict[str, int | float | str | ... omitted 3 union elements] | ((dict[str, int | float | str | ... omitted 3 union elements], /) -> None) | None`
- pydantic/fields.py:1115:5: error[invalid-parameter-default] Default value of type `PydanticUndefinedType` is not assignable to annotated parameter type `dict[str, Divergent] | ((dict[str, Divergent], /) -> None) | None`
+ pydantic/fields.py:1115:5: error[invalid-parameter-default] Default value of type `PydanticUndefinedType` is not assignable to annotated parameter type `dict[str, int | float | str | ... omitted 3 union elements] | ((dict[str, int | float | str | ... omitted 3 union elements], /) -> None) | None`
- pydantic/fields.py:1154:5: error[invalid-parameter-default] Default value of type `PydanticUndefinedType` is not assignable to annotated parameter type `dict[str, Divergent] | ((dict[str, Divergent], /) -> None) | None`
+ pydantic/fields.py:1154:5: error[invalid-parameter-default] Default value of type `PydanticUndefinedType` is not assignable to annotated parameter type `dict[str, int | float | str | ... omitted 3 union elements] | ((dict[str, int | float | str | ... omitted 3 union elements], /) -> None) | None`
- pydantic/fields.py:1194:5: error[invalid-parameter-default] Default value of type `PydanticUndefinedType` is not assignable to annotated parameter type `dict[str, Divergent] | ((dict[str, Divergent], /) -> None) | None`
+ pydantic/fields.py:1194:5: error[invalid-parameter-default] Default value of type `PydanticUndefinedType` is not assignable to annotated parameter type `dict[str, int | float | str | ... omitted 3 union elements] | ((dict[str, int | float | str | ... omitted 3 union elements], /) -> None) | None`
- pydantic/fields.py:1573:13: error[invalid-argument-type] Argument is incorrect: Expected `dict[str, Divergent] | ((dict[str, Divergent], /) -> None) | None`, found `dict[str, Divergent] | dict[Never, Never] | (((dict[str, Divergent], /) -> None) & ~Top[dict[Unknown, Unknown]]) | None`
+ pydantic/fields.py:1573:13: error[invalid-argument-type] Argument is incorrect: Expected `dict[str, int | float | str | ... omitted 3 union elements] | ((dict[str, int | float | str | ... omitted 3 union elements], /) -> None) | None`, found `dict[str, int | float | str | ... omitted 3 union elements] | dict[Never, Never] | (((dict[str, int | float | str | ... omitted 3 union elements], /) -> None) & ~Top[dict[Unknown, Unknown]]) | None`

mkdocs (https://github.com/mkdocs/mkdocs)
- mkdocs/config/config_options.py:858:28: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `str | None`, found `object`
- mkdocs/config/config_options.py:858:28: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `str | None`, found `object`
- mkdocs/config/config_options.py:858:28: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Collection[str]`, found `object`
- mkdocs/config/config_options.py:858:28: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `str | None`, found `object`
- Found 220 diagnostics
+ Found 216 diagnostics

xarray (https://github.com/pydata/xarray)
- xarray/tests/test_dataarray.py:4732:30: error[no-matching-overload] No overload of function `pad` matches arguments
- Found 1711 diagnostics
+ Found 1710 diagnostics

discord.py (https://github.com/Rapptz/discord.py)
- discord/client.py:727:59: error[invalid-argument-type] Argument to bound method `from_client` is incorrect: Expected `bool`, found `int | None`
- discord/http.py:571:53: error[invalid-argument-type] Argument to bound method `ws_connect` is incorrect: Expected `bool`, found `BasicAuth | None | str | ... omitted 4 union elements`
- discord/http.py:571:53: error[invalid-argument-type] Argument to bound method `ws_connect` is incorrect: Expected `Mapping[str, str] | Mapping[istr, str] | Iterable[tuple[str, str]] | None`, found `BasicAuth | None | str | ... omitted 4 union elements`
- discord/http.py:571:53: error[invalid-argument-type] Argument to bound method `ws_connect` is incorrect: Expected `str | URL | None`, found `BasicAuth | None | str | ... omitted 4 union elements`
- discord/http.py:571:53: error[invalid-argument-type] Argument to bound method `ws_connect` is incorrect: Expected `BasicAuth | None`, found `BasicAuth | None | str | ... omitted 4 union elements`
- discord/http.py:571:53: error[invalid-argument-type] Argument to bound method `ws_connect` is incorrect: Expected `int`, found `BasicAuth | None | str | ... omitted 4 union elements`
- discord/http.py:571:53: error[invalid-argument-type] Argument to bound method `ws_connect` is incorrect: Expected `int`, found `BasicAuth | None | str | ... omitted 4 union elements`
- Found 558 diagnostics
+ Found 551 diagnostics

cloud-init (https://github.com/canonical/cloud-init)
- cloudinit/url_helper.py:572:40: error[invalid-argument-type] Argument to bound method `request` is incorrect: Expected `str | bytes`, found `Unknown | bool`
- cloudinit/url_helper.py:572:40: error[invalid-argument-type] Argument to bound method `request` is incorrect: Expected `str | bytes`, found `Unknown | bool`
- cloudinit/url_helper.py:572:40: error[invalid-argument-type] Argument to bound method `request` is incorrect: Expected `Mapping[str, str | bytes | None] | None`, found `Unknown | bool`
- tests/unittests/net/test_init.py:853:57: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `dict[Unknown, Unknown]`, found `str | dict[str, dict[str, str | list[dict[str, str]] | bool]]`
- tests/unittests/net/test_init.py:896:49: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `dict[Unknown, Unknown]`, found `str | dict[str, dict[str, str | list[dict[str, str]] | bool]]`
- tests/unittests/net/test_init.py:975:49: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `dict[Unknown, Unknown]`, found `str | dict[str, dict[str, str | list[dict[str, str]] | bool]]`
- tests/unittests/net/test_init.py:992:53: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `dict[Unknown, Unknown]`, found `str | dict[str, dict[str, str | list[dict[str, str]] | bool]]`
- tests/unittests/net/test_init.py:1105:49: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `dict[Unknown, Unknown]`, found `str | dict[str, dict[str, str | list[dict[str, str]] | bool]]`
- tests/unittests/net/test_init.py:1219:49: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `dict[Unknown, Unknown]`, found `str | list[tuple[str, str]] | dict[str, dict[str, str | list[dict[str, str]] | bool]]`
- Found 1310 diagnostics
+ Found 1301 diagnostics

apprise (https://github.com/caronc/apprise)
- apprise/plugins/xmpp/base.py:358:35: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `XMPPConfig`, found `XMPPConfig | list[str] | str | ... omitted 4 union elements`
- apprise/plugins/xmpp/base.py:358:35: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `list[str]`, found `XMPPConfig | list[str] | str | ... omitted 4 union elements`
- apprise/plugins/xmpp/base.py:358:35: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `str`, found `XMPPConfig | list[str] | str | ... omitted 4 union elements`
- apprise/plugins/xmpp/base.py:358:35: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `str`, found `XMPPConfig | list[str] | str | ... omitted 4 union elements`
- apprise/plugins/xmpp/base.py:358:35: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `int | float`, found `XMPPConfig | list[str] | str | ... omitted 4 union elements`
- apprise/plugins/xmpp/base.py:358:35: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `bool`, found `XMPPConfig | list[str] | str | ... omitted 4 union elements`
+ apprise/plugins/xmpp/base.py:358:35: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `bool`, found `Unknown | str | dict[Unknown | str, dict[str, int]] | bool`
- apprise/plugins/xmpp/base.py:358:35: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `bool`, found `XMPPConfig | list[str] | str | ... omitted 4 union elements`
+ apprise/plugins/xmpp/base.py:358:35: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `bool`, found `Unknown | str | dict[Unknown | str, dict[str, int]] | bool`
- apprise/plugins/xmpp/base.py:361:40: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `XMPPConfig`, found `XMPPConfig | list[str] | str | ... omitted 4 union elements`
- apprise/plugins/xmpp/base.py:361:40: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `list[str]`, found `XMPPConfig | list[str] | str | ... omitted 4 union elements`
- apprise/plugins/xmpp/base.py:361:40: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `str`, found `XMPPConfig | list[str] | str | ... omitted 4 union elements`
- apprise/plugins/xmpp/base.py:361:40: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `str`, found `XMPPConfig | list[str] | str | ... omitted 4 union elements`
- apprise/plugins/xmpp/base.py:361:40: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `int | float`, found `XMPPConfig | list[str] | str | ... omitted 4 union elements`
- apprise/plugins/xmpp/base.py:361:40: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `bool`, found `XMPPConfig | list[str] | str | ... omitted 4 union elements`
+ apprise/plugins/xmpp/base.py:361:40: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `bool`, found `Unknown | str | dict[Unknown | str, dict[str, int]] | bool`
- apprise/plugins/xmpp/base.py:361:40: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `bool`, found `XMPPConfig | list[str] | str | ... omitted 4 union elements`
+ apprise/plugins/xmpp/base.py:361:40: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `bool`, found `Unknown | str | dict[Unknown | str, dict[str, int]] | bool`
- Found 3575 diagnostics
+ Found 3565 diagnostics

freqtrade (https://github.com/freqtrade/freqtrade)
- freqtrade/rpc/telegram.py:1161:49: error[invalid-argument-type] Argument to bound method `_rpc_trade_statistics` is incorrect: Expected `str`, found `Any | datetime`
- freqtrade/rpc/telegram.py:1161:49: error[invalid-argument-type] Argument to bound method `_rpc_trade_statistics` is incorrect: Expected `str`, found `Any | datetime`
- Found 667 diagnostics
+ Found 665 diagnostics

prefect (https://github.com/PrefectHQ/prefect)
- src/integrations/prefect-dbt/tests/core/test_orchestrator_cache.py:544:39: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `PrefectDbtSettings | None`, found `object`
- src/integrations/prefect-dbt/tests/core/test_orchestrator_cache.py:544:39: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Path | None`, found `object`
- src/integrations/prefect-dbt/tests/core/test_orchestrator_cache.py:544:39: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `DbtExecutor | None`, found `object`
- src/integrations/prefect-dbt/tests/core/test_orchestrator_cache.py:544:39: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `ExecutionMode`, found `object`
- src/integrations/prefect-dbt/tests/core/test_orchestrator_cache.py:544:39: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `type | None`, found `object`
- src/integrations/prefect-dbt/tests/core/test_orchestrator_integration.py:449:39: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `PrefectDbtSettings | None`, found `PrefectDbtSettings | Unknown | ExecutionMode | ... omitted 4 union elements`
- src/integrations/prefect-dbt/tests/core/test_orchestrator_integration.py:449:39: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Path | None`, found `PrefectDbtSettings | Unknown | ExecutionMode | ... omitted 4 union elements`
- src/integrations/prefect-dbt/tests/core/test_orchestrator_integration.py:449:39: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `ExecutionMode`, found `PrefectDbtSettings | Unknown | ExecutionMode | ... omitted 4 union elements`
- src/integrations/prefect-dbt/tests/core/test_orchestrator_integration.py:449:39: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `str | int | None`, found `PrefectDbtSettings | Unknown | ExecutionMode | ... omitted 4 union elements`
- src/integrations/prefect-dbt/tests/core/test_orchestrator_integration.py:449:39: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `type | None`, found `PrefectDbtSettings | Unknown | ExecutionMode | ... omitted 4 union elements`
- src/integrations/prefect-dbt/tests/core/test_orchestrator_integration.py:449:39: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `CacheConfig | None`, found `PrefectDbtSettings | Unknown | ExecutionMode | ... omitted 4 union elements`
- src/integrations/prefect-dbt/tests/core/test_orchestrator_integration.py:449:39: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `TestStrategy`, found `PrefectDbtSettings | Unknown | ExecutionMode | ... omitted 4 union elements`
- src/integrations/prefect-dbt/tests/core/test_orchestrator_per_node.py:123:39: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `PrefectDbtSettings | None`, found `MagicMock | Path | Unknown | ExecutionMode | <class 'ThreadPoolTaskRunner'>`
- src/integrations/prefect-dbt/tests/core/test_orchestrator_per_node.py:123:39: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Path | None`, found `MagicMock | Path | Unknown | ExecutionMode | <class 'ThreadPoolTaskRunner'>`
- src/integrations/prefect-dbt/tests/core/test_orchestrator_per_node.py:123:39: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `DbtExecutor | None`, found `MagicMock | Path | Unknown | ExecutionMode | <class 'ThreadPoolTaskRunner'>`
- src/integrations/prefect-dbt/tests/core/test_orchestrator_per_node.py:123:39: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `ExecutionMode`, found `MagicMock | Path | Unknown | ExecutionMode | <class 'ThreadPoolTaskRunner'>`
- src/integrations/prefect-dbt/tests/core/test_orchestrator_per_node.py:123:39: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `type | None`, found `MagicMock | Path | Unknown | ExecutionMode | <class 'ThreadPoolTaskRunner'>`
- src/integrations/prefect-dbt/tests/core/test_orchestrator_test_strategies.py:109:39: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `PrefectDbtSettings | None`, found `MagicMock | Path | Unknown | ExecutionMode | <class 'ThreadPoolTaskRunner'>`
- src/integrations/prefect-dbt/tests/core/test_orchestrator_test_strategies.py:109:39: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Path | None`, found `MagicMock | Path | Unknown | ExecutionMode | <class 'ThreadPoolTaskRunner'>`
- src/integrations/prefect-dbt/tests/core/test_orchestrator_test_strategies.py:109:39: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `DbtExecutor | None`, found `MagicMock | Path | Unknown | ExecutionMode | <class 'ThreadPoolTaskRunner'>`
- src/integrations/prefect-dbt/tests/core/test_orchestrator_test_strategies.py:109:39: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `ExecutionMode`, found `MagicMock | Path | Unknown | ExecutionMode | <class 'ThreadPoolTaskRunner'>`
- src/integrations/prefect-dbt/tests/core/test_orchestrator_test_strategies.py:109:39: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `type | None`, found `MagicMock | Path | Unknown | ExecutionMode | <class 'ThreadPoolTaskRunner'>`
- src/integrations/prefect-dbt/tests/core/test_orchestrator_test_strategies.py:129:39: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `PrefectDbtSettings | None`, found `MagicMock | Path | Unknown | ExecutionMode`
- src/integrations/prefect-dbt/tests/core/test_orchestrator_test_strategies.py:129:39: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Path | None`, found `MagicMock | Path | Unknown | ExecutionMode`
- src/integrations/prefect-dbt/tests/core/test_orchestrator_test_strategies.py:129:39: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `DbtExecutor | None`, found `MagicMock | Path | Unknown | ExecutionMode`
- src/integrations/prefect-dbt/tests/core/test_orchestrator_test_strategies.py:129:39: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `ExecutionMode`, found `MagicMock | Path | Unknown | ExecutionMode`
- src/integrations/prefect-github/tests/test_graphql.py:28:66: error[invalid-argument-type] Argument to function `_subset_return_fields` is incorrect: Expected `dict[tuple[Unknown, ...], tuple[Unknown, ...]]`, found `list[Unknown] | dict[Unknown, Unknown]`
- src/prefect/cli/variable.py:182:57: error[invalid-argument-type] Argument is incorrect: Expected `str | None`, found `str | int | float | ... omitted 4 union elements`
- src/prefect/cli/variable.py:182:57: error[invalid-argument-type] Argument is incorrect: Expected `list[str] | None`, found `str | int | float | ... omitted 4 union elements`
- src/prefect/cli/variable.py:184:57: error[invalid-argument-type] Argument is incorrect: Expected `str`, found `str | int | float | ... omitted 4 union elements`
- src/prefect/cli/variable.py:184:57: error[invalid-argument-type] Argument is incorrect: Expected `list[str] | None`, found `str | int | float | ... omitted 4 union elements`
- src/prefect/events/utilities.py:99:27: error[invalid-argument-type] Argument is incorrect: Expected `str`, found `Any | dict[str, Any] | None`
- src/prefect/events/utilities.py:99:27: error[invalid-argument-type] Argument is incorrect: Expected `Resource`, found `Any | dict[str, Any] | None`
+ src/prefect/events/utilities.py:99:27: error[invalid-argument-type] Argument is incorrect: Expected `Resource`, found `(Any & dict[str, str]) | (dict[str, Any] & dict[str, str])`
- Found 5849 diagnostics
+ Found 5817 diagnostics

setuptools (https://github.com/pypa/setuptools)
- setuptools/tests/config/test_expand.py:206:37: error[invalid-argument-type] Argument to function `find_packages` is incorrect: Expected `str | PathLike[str] | None`, found `Unknown | dict[Unknown, Unknown]`
- setuptools/tests/config/test_expand.py:243:46: error[invalid-argument-type] Argument to function `find_packages` is incorrect: Expected `dict[str, str] | None`, found `Unknown | dict[Unknown, Unknown] | bool`
- setuptools/tests/config/test_expand.py:243:46: error[invalid-argument-type] Argument to function `find_packages` is incorrect: Expected `str | PathLike[str] | None`, found `Unknown | dict[Unknown, Unknown] | bool`
- Found 1123 diagnostics
+ Found 1120 diagnostics

dd-trace-py (https://github.com/DataDog/dd-trace-py)
- ddtrace/internal/remoteconfig/__init__.py:35:44: error[invalid-argument-type] Argument is incorrect: Expected `str`, found `object`
- ddtrace/internal/remoteconfig/__init__.py:35:44: error[invalid-argument-type] Argument is incorrect: Expected `str`, found `object`
- ddtrace/internal/remoteconfig/__init__.py:35:44: error[invalid-argument-type] Argument is incorrect: Expected `str | None`, found `object`
- ddtrace/internal/remoteconfig/__init__.py:35:44: error[invalid-argument-type] Argument is incorrect: Expected `int | None`, found `object`
- ddtrace/internal/remoteconfig/__init__.py:35:44: error[invalid-argument-type] Argument is incorrect: Expected `int | None`, found `object`
- ddtrace/internal/remoteconfig/__init__.py:35:44: error[invalid-argument-type] Argument is incorrect: Expected `int | None`, found `object`
- ddtrace/internal/remoteconfig/__init__.py:35:44: error[invalid-argument-type] Argument is incorrect: Expected `str | None`, found `object`
- ddtrace/internal/remoteconfig/client.py:130:32: error[invalid-argument-type] Argument is incorrect: Expected `str`, found `object`
- ddtrace/internal/remoteconfig/client.py:130:32: error[invalid-argument-type] Argument is incorrect: Expected `str`, found `object`
- ddtrace/internal/remoteconfig/client.py:130:32: error[invalid-argument-type] Argument is incorrect: Expected `bool`, found `object`
- ddtrace/internal/remoteconfig/client.py:130:32: error[invalid-argument-type] Argument is incorrect: Expected `str`, found `object`
- ddtrace/internal/remoteconfig/client.py:130:32: error[invalid-argument-type] Argument is incorrect: Expected `Mapping[str, Key]`, found `object`
- ddtrace/internal/remoteconfig/client.py:130:32: error[invalid-argument-type] Argument is incorrect: Expected `Mapping[str, Role]`, found `object`
- ddtrace/internal/remoteconfig/client.py:130:32: error[invalid-argument-type] Argument is incorrect: Expected `int`, found `object`
- ddtrace/internal/remoteconfig/client.py:170:35: error[invalid-argument-type] Argument is incorrect: Expected `str`, found `object`
- ddtrace/internal/remoteconfig/client.py:170:35: error[invalid-argument-type] Argument is incorrect: Expected `Mapping[str, Any]`, found `object`
- ddtrace/internal/remoteconfig/client.py:170:35: error[invalid-argument-type] Argument is incorrect: Expected `str`, found `object`
- ddtrace/internal/remoteconfig/client.py:170:35: error[invalid-argument-type] Argument is incorrect: Expected `str`, found `object`
- ddtrace/internal/remoteconfig/client.py:170:35: error[invalid-argument-type] Argument is incorrect: Expected `Mapping[str, TargetDesc]`, found `object`
- ddtrace/internal/remoteconfig/client.py:170:35: error[invalid-argument-type] Argument is incorrect: Expected `int`, found `object`
- tests/ci_visibility/api_client/test_ci_visibility_api_client.py:666:50: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `ITR_SKIPPING_LEVEL`, found `str | int | None | float`
- tests/ci_visibility/api_client/test_ci_visibility_api_client.py:666:50: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `GitData`, found `str | int | None | float`
+ tests/ci_visibility/api_client/test_ci_visibility_api_client.py:666:50: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `GitData`, found `None`
- tests/ci_visibility/api_client/test_ci_visibility_api_client.py:666:50: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `dict[str, str | dict[str, str]]`, found `str | int | None | float`
+ tests/ci_visibility/api_client/test_ci_visibility_api_client.py:666:50: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `dict[str, str | dict[str, str]]`, found `None`
- tests/ci_visibility/api_client/test_ci_visibility_api_client.py:666:50: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `str`, found `str | int | None | float`
- tests/ci_visibility/api_client/test_ci_visibility_api_client.py:666:50: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `str | None`, found `str | int | None | float`
- tests/ci_visibility/api_client/test_ci_visibility_api_client.py:666:50: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `str | None`, found `str | int | None | float`
- tests/ci_visibility/api_client/test_ci_visibility_api_client.py:666:50: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `int | float`, found `str | int | None | float`
- Found 9273 diagnostics
+ Found 9248 diagnostics

altair (https://github.com/vega/altair)
- altair/vegalite/v6/api.py:2772:54: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `SchemaBase | Literal["argmax", "argmin", "average", "count", "distinct", ... omitted 20 literals] | UndefinedType`, found `str | Any`
- altair/vegalite/v6/api.py:3105:61: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `SchemaBase | Literal["argmax", "argmin", "average", "count", "distinct", ... omitted 20 literals] | UndefinedType`, found `str | Any`
- altair/vegalite/v6/api.py:4192:47: error[invalid-argument-type] Argument to bound method `to_dict` is incorrect: Expected `bool`, found `bool | Literal["vega-lite", "vega"] | list[str] | ... omitted 3 union elements`
- altair/vegalite/v6/api.py:4192:47: error[invalid-argument-type] Argument to bound method `to_dict` is incorrect: Expected `Literal["vega-lite", "vega"]`, found `bool | Literal["vega-lite", "vega"] | list[str] | ... omitted 3 union elements`
- altair/vegalite/v6/api.py:4192:47: error[invalid-argument-type] Argument to bound method `to_dict` is incorrect: Expected `list[str] | None`, found `bool | Literal["vega-lite", "vega"] | list[str] | ... omitted 3 union elements`
- altair/vegalite/v6/api.py:4192:47: error[invalid-argument-type] Argument to bound method `to_dict` is incorrect: Expected `dict[str, Any] | None`, found `bool | Literal["vega-lite", "vega"] | list[str] | ... omitted 3 union elements`
- altair/vegalite/v6/api.py:4193:32: error[invalid-argument-type] Argument to bound method `to_dict` is incorrect: Expected `bool`, found `bool | Literal["vega-lite", "vega"] | list[str] | ... omitted 3 union elements`
- altair/vegalite/v6/api.py:4193:32: error[invalid-argument-type] Argument to bound method `to_dict` is incorrect: Expected `Literal["vega-lite", "vega"]`, found `bool | Literal["vega-lite", "vega"] | list[str] | ... omitted 3 union elements`
- altair/vegalite/v6/api.py:4193:32: error[invalid-argument-type] Argument to bound method `to_dict` is incorrect: Expected `list[str] | None`, found `bool | Literal["vega-lite", "vega"] | list[str] | ... omitted 3 union elements`
- altair/vegalite/v6/api.py:4193:32: error[invalid-argument-type] Argument to bound method `to_dict` is incorrect: Expected `dict[str, Any] | None`, found `bool | Literal["vega-lite", "vega"] | list[str] | ... omitted 3 union elements`
- tests/vegalite/v6/test_api.py:1147:55: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Sequence[SchemaBase | Mapping[str, Any]] | UndefinedType`, found `list[AggregatedFieldDef] | list[str]`
- tests/vegalite/v6/test_api.py:1152:49: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `SchemaBase | Literal[True] | Mapping[str, Any] | UndefinedType`, found `str | bool`
- tests/vegalite/v6/test_api.py:1152:49: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `str | SchemaBase | UndefinedType`, found `str | bool`
- tests/vegalite/v6/test_api.py:1162:53: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `str | SchemaBase | UndefinedType`, found `list[str] | str`
- tests/vegalite/v6/test_api.py:1185:52: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `str | SchemaBase | UndefinedType`, found `str | list[str]`
- tests/vegalite/v6/test_api.py:1185:52: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `str | SchemaBase | UndefinedType`, found `str | list[str]`
- tests/vegalite/v6/test_api.py:1195:59: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Sequence[SchemaBase | Mapping[str, Any]] | UndefinedType`, found `list[JoinAggregateFieldDef] | list[str]`
- tests/vegalite/v6/test_api.py:1200:51: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `str | SchemaBase | UndefinedType`, found `str | list[str]`
- tests/vegalite/v6/test_api.py:1200:51: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `str | SchemaBase | UndefinedType`, found `str | list[str]`
- tests/vegalite/v6/test_api.py:1206:52: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `str | UndefinedType`, found `LookupData | str`
- tests/vegalite/v6/test_api.py:1214:52: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `str | UndefinedType`, found `LookupSelection | str`
- tests/vegalite/v6/test_api.py:1223:54: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `str | SchemaBase | UndefinedType`, found `str | list[str]`
- tests/vegalite/v6/test_api.py:1228:56: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `str | SchemaBase | UndefinedType`, found `str | list[str]`
- tests/vegalite/v6/test_api.py:1228:56: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `str | SchemaBase | UndefinedType`, found `str | list[str]`
- Found 1070 diagnostics
+ Found 1046 diagnostics

bokeh (https://github.com/bokeh/bokeh)
- src/bokeh/command/subcommand.py:146:46: error[invalid-argument-type] Argument to bound method `add_argument` is incorrect: Expected `str | type[Action]`, found `object`
- src/bokeh/command/subcommand.py:146:46: error[invalid-argument-type] Argument to bound method `add_argument` is incorrect: Expected `int | str | None`, found `object`
- src/bokeh/command/subcommand.py:146:46: error[invalid-argument-type] Argument to bound method `add_argument` is incorrect: Expected `((str, /) -> Any) | FileType | str`, found `object`
- src/bokeh/command/subcommand.py:146:46: error[invalid-argument-type] Argument to bound method `add_argument` is incorrect: Expected `Iterable[Unknown] | None`, found `object`
- src/bokeh/command/subcommand.py:146:46: error[invalid-argument-type] Argument to bound method `add_argument` is incorrect: Expected `bool`, found `object`
- src/bokeh/command/subcommand.py:146:46: error[invalid-argument-type] Argument to bound method `add_argument` is incorrect: Expected `str | None`, found `object`
- src/bokeh/command/subcommand.py:146:46: error[invalid-argument-type] Argument to bound method `add_argument` is incorrect: Expected `str | tuple[str, ...] | None`, found `object`
- src/bokeh/command/subcommand.py:146:46: error[invalid-argument-type] Argument to bound method `add_argument` is incorrect: Expected `str | None`, found `object`
- src/bokeh/command/subcommand.py:146:46: error[invalid-argument-type] Argument to bound method `add_argument` is incorrect: Expected `str`, found `object`
- Found 861 diagnostics
+ Found 852 diagnostics

scikit-learn (https://github.com/scikit-learn/scikit-learn)
- sklearn/utils/estimator_checks.py:699:51: error[invalid-argument-type] Argument to function `estimator_checks_generator` is incorrect: Expected `bool`, found `Unknown | str | bool | None`
- sklearn/utils/estimator_checks.py:699:51: error[invalid-argument-type] Argument to function `estimator_checks_generator` is incorrect: Expected `Literal["xfail", "skip"] | None`, found `Unknown | str | bool | None`
- sklearn/utils/estimator_checks.py:699:51: error[invalid-argument-type] Argument to function `estimator_checks_generator` is incorrect: Expected `bool | None`, found `Unknown | str | bool | None`
- sklearn/utils/estimator_checks.py:916:55: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `str`, found `Unknown | Exception | bool | str`
- sklearn/utils/estimator_checks.py:916:55: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `str`, found `Unknown | Exception | bool | str`
- sklearn/utils/estimator_checks.py:916:55: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `bool`, found `Unknown | Exception | bool | str`
- sklearn/utils/estimator_checks.py:916:55: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `str`, found `Unknown | Exception | bool | str`
- sklearn/utils/estimator_checks.py:916:55: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Exception`, found `Unknown | Exception | bool | str`
- Found 2540 diagnostics
+ Found 2532 diagnostics

jax (https://github.com/google/jax)
- jax/_src/xla_bridge.py:190:54: error[invalid-argument-type] Argument to function `make_transfer_server_interface_factory` is incorrect: Expected `int`, found `DistributedRuntimeClient | Any | None | ... omitted 3 union elements`
- jax/_src/xla_bridge.py:190:54: error[invalid-argument-type] Argument to function `make_transfer_server_interface_factory` is incorrect: Expected `int`, found `DistributedRuntimeClient | Any | None | ... omitted 3 union elements`
- jax/_src/xla_bridge.py:190:54: error[invalid-argument-type] Argument to function `make_transfer_server_interface_factory` is incorrect: Expected `DistributedRuntimeClient | None`, found `DistributedRuntimeClient | Any | None | ... omitted 3 union elements`
- jax/_src/xla_bridge.py:190:54: error[invalid-argument-type] Argument to function `make_transfer_server_interface_factory` is incorrect: Expected `str`, found `DistributedRuntimeClient | Any | None | ... omitted 3 union elements`
- jax/_src/xla_bridge.py:190:54: error[invalid-argument-type] Argument to function `make_transfer_server_interface_factory` is incorrect: Expected `Sequence[str]`, found `DistributedRuntimeClient | Any | None | ... omitted 3 union elements`
- Found 2215 diagnostics
+ Found 2210 diagnostics

pandas (https://github.com/pandas-dev/pandas)
- pandas/core/arrays/datetimes.py:3016:29: error[invalid-argument-type] Argument to bound method `tz_localize` is incorrect: Expected `bool | Literal["raise", "NaT"]`, found `Unknown | bool | None`
- pandas/core/arrays/datetimes.py:3016:29: error[invalid-argument-type] Argument to bound method `tz_localize` is incorrect: Expected `Literal["shift_forward", "shift_backward", "NaT", "raise"] | timedelta`, found `Unknown | bool | None`
+ pandas/core/generic.py:4823:40: warning[unused-type-ignore-comment] Unused blanket `type: ignore` directive
+ pandas/core/generic.py:4894:40: warning[unused-type-ignore-comment] Unused blanket `type: ignore` directive
- pandas/io/json/_json.py:1069:38: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `ExtensionDtype | str | dtype[Any] | ... omitted 3 union elements`, found `Unknown | bool | None | Literal["pyarrow", "numpy_nullable"] | _NoDefault`
- pandas/io/json/_json.py:1069:38: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `bool`, found `Unknown | bool | None | Literal["pyarrow", "numpy_nullable"] | _NoDefault`
+ pandas/io/json/_json.py:1069:38: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `bool`, found `Unknown | bool | None`
- pandas/io/json/_json.py:1069:38: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `bool | list[str]`, found `Unknown | bool | None | Literal["pyarrow", "numpy_nullable"] | _NoDefault`
- pandas/io/json/_json.py:1069:38: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `bool`, found `Unknown | bool | None | Literal["pyarrow", "numpy_nullable"] | _NoDefault`
- pandas/io/json/_json.py:1069:38: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `bool`, found `Unknown | bool | None | Literal["pyarrow", "numpy_nullable"] | _NoDefault`
- pandas/io/json/_json.py:1069:38: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Literal["pyarrow", "numpy_nullable"] | _NoDefault`, found `Unknown | bool | None | Literal["pyarrow", "numpy_nullable"] | _NoDefault`
- pandas/io/json/_json.py:1073:39: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `ExtensionDtype | str | dtype[Any] | ... omitted 3 union elements`, found `Unknown | bool | None | Literal["pyarrow", "numpy_nullable"] | _NoDefault`
- pandas/io/json/_json.py:1073:39: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `bool`, found `Unknown | bool | None | Literal["pyarrow", "numpy_nullable"] | _NoDefault`
+ pandas/io/json/_json.py:1073:39: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `bool`, found `Unknown | bool | None`
- pandas/io/json/_json.py:1073:39: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `bool | list[str]`, found `Unknown | bool | None | Literal["pyarrow", "numpy_nullable"] | _NoDefault`
- pandas/io/json/_json.py:1073:39: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `bool`, found `Unknown | bool | None | Literal["pyarrow", "numpy_nullable"] | _NoDefault`
- pandas/io/json/_json.py:1073:39: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `bool`, found `Unknown | bool | None | Literal["pyarrow", "numpy_nullable"] | _NoDefault`
- pandas/io/json/_json.py:1073:39: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Literal["pyarrow", "numpy_nullable"] | _NoDefault`, found `Unknown | bool | None | Literal["pyarrow", "numpy_nullable"] | _NoDefault`
- pandas/tests/window/test_ewm.py:148:57: error[invalid-argument-type] Argument to bound method `ewm` is incorrect: Expected `bool`, found `int | Unknown`
- pandas/tests/window/test_ewm.py:148:57: error[invalid-argument-type] Argument to bound method `ewm` is incorrect: Expected `bool`, found `int | Unknown`
- Found 4584 diagnostics
+ Found 4572 diagnostics

rotki (https://github.com/rotki/rotki)
- rotkehlchen/chain/bitcoin/btc/manager.py:107:63: error[invalid-argument-type] Argument to function `request_get_dict` is incorrect: Expected `bool`, found `int`
- rotkehlchen/chain/bitcoin/btc/manager.py:113:25: error[invalid-argument-type] Argument to function `request_get_dict` is incorrect: Expected `bool`, found `int`
+ rotkehlchen/exchanges/binance.py:363:61: warning[unused-type-ignore-comment] Unused blanket `type: ignore` directive
- Found 2156 diagnostics
+ Found 2155 diagnostics

core (https://github.com/home-assistant/core)
- homeassistant/components/assist_satellite/__init__.py:124:69: error[invalid-argument-type] Argument to bound method `async_internal_ask_question` is incorrect: Expected `bool`, found `Unknown | None`
- homeassistant/components/isy994/number.py:133:54: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `str`, found `Unknown | str | NumberEntityDescription | DeviceInfo | None`
- homeassistant/components/isy994/number.py:133:54: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `str`, found `Unknown | str | NumberEntityDescription | DeviceInfo | None`
- homeassistant/components/isy994/number.py:133:54: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `NumberEntityDescription`, found `Unknown | str | NumberEntityDescription | DeviceInfo | None`
- homeassistant/components/isy994/number.py:133:54: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `DeviceInfo | None`, found `Unknown | str | NumberEntityDescription | DeviceInfo | None`
- homeassistant/components/isy994/number.py:135:51: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `str`, found `Unknown | str | NumberEntityDescription | DeviceInfo | None`
- homeassistant/components/isy994/number.py:135:51: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `str`, found `Unknown | str | NumberEntityDescription | DeviceInfo | None`
- homeassistant/co

... (truncated 76 lines) ...

@ibraheemdev ibraheemdev marked this pull request as ready for review February 20, 2026 12:25
Copy link
Member

@AlexWaygood AlexWaygood left a comment

Choose a reason for hiding this comment

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

This is cool! I'm a bit uncertain about how freely you're intersecting with TypedDicts, though; we need to be pretty careful there. See my inline comments. A synthesized protocol with __getitem__ overloads might be a better fit here.

@carljm carljm closed this Feb 24, 2026
@carljm carljm reopened this Feb 24, 2026
@carljm carljm assigned AlexWaygood and carljm and unassigned carljm and AlexWaygood Feb 25, 2026
Copy link
Contributor

@carljm carljm left a comment

Choose a reason for hiding this comment

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

Mostly looks good, but I do think we need to address the intersection-with-TypedDict issue.

Copy link
Contributor

@carljm carljm left a comment

Choose a reason for hiding this comment

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

This is very cool! Found one issue that should be fixed before landing, otherwise looks good!

@ibraheemdev ibraheemdev force-pushed the ibraheem/dict-unpack-narrowing branch from ce8dce8 to 63cf7be Compare March 17, 2026 01:56
@ibraheemdev ibraheemdev force-pushed the ibraheem/dict-unpack-narrowing branch from 63cf7be to 000add9 Compare March 17, 2026 01:56
@ibraheemdev ibraheemdev merged commit fbd7b8a into main Mar 17, 2026
51 checks passed
@ibraheemdev ibraheemdev deleted the ibraheem/dict-unpack-narrowing branch March 17, 2026 02:33
carljm added a commit that referenced this pull request Mar 17, 2026
* main:
  Pass through ParamSpec relation check for non-overloaded signatures (#23927)
  [ty] Narrow keyword arguments when unpacking dictionary instances (#23436)
  [ty] Implement Duboc's TDD optimization for unions of constraint sets (#23881)
  Remove the repository security policy in favor of the organization one (#24008)
  Remove the repository code of conduct in favor of the organization one (#24007)
ibraheemdev added a commit that referenced this pull request Mar 20, 2026
Fixes a bug in #23436 where nested
dictionary literals are not tracked, e.g.,
```py
def f(a: int, b: str): ...

x = {"inner": {"a": 1, "b": "a"}}
f(**x["inner"])
```

This is unlikely to have an ecosystem impact, but seems worth doing
nonetheless.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ecosystem-analyzer ty Multi-file analysis & type inference

Projects

None yet

Development

Successfully merging this pull request may close these issues.

better gradual guarantee for un-annotated dict (and other container?) literals

3 participants