Skip to content

[ty] Narrow TypedDicts through isinstance(..., dict)#23946

Open
charliermarsh wants to merge 7 commits intomainfrom
charlie/td-narrow
Open

[ty] Narrow TypedDicts through isinstance(..., dict)#23946
charliermarsh wants to merge 7 commits intomainfrom
charlie/td-narrow

Conversation

@charliermarsh
Copy link
Copy Markdown
Member

@charliermarsh charliermarsh commented Mar 13, 2026

Summary

This PR implements a TypedDictTop type that is a supertype of all TypedDict types, and treated as assignable to Mapping[str, object].

With this type, isinstance(x, dict) and isinstance(x, MutableMapping) now generate a constraint that includes TypedDictTop, e.g., Top[dict[Unknown, Unknown]] | TypedDictTop.

Closes astral-sh/ty#1130.

Closes astral-sh/ty#2374.

@astral-sh-bot astral-sh-bot Bot added the ty Multi-file analysis & type inference label Mar 13, 2026
@charliermarsh charliermarsh force-pushed the charlie/td-narrow branch 2 times, most recently from c93ef08 to 931ca14 Compare March 13, 2026 19:50
@astral-sh-bot
Copy link
Copy Markdown

astral-sh-bot Bot commented Mar 13, 2026

Typing conformance results

No changes detected ✅

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

@astral-sh-bot
Copy link
Copy Markdown

astral-sh-bot Bot commented Mar 13, 2026

mypy_primer results

Changes were detected when running on open source projects
pip (https://github.com/pypa/pip)
- src/pip/_vendor/dependency_groups/_implementation.py:149:56: error[invalid-argument-type] Argument is incorrect: Expected `str`, found `object`
- src/pip/_vendor/pkg_resources/__init__.py:2840:21: error[invalid-assignment] Object of type `dict_items[object, object]` is not assignable to `Iterable[tuple[str | None, Iterable[str]]]`
+ src/pip/_vendor/pkg_resources/__init__.py:2840:21: error[invalid-assignment] Object of type `dict_items[Unknown, Unknown] | dict_items[str, object]` is not assignable to `Iterable[tuple[str | None, Iterable[str]]]`
- Found 656 diagnostics
+ Found 655 diagnostics

spack (https://github.com/spack/spack)
- lib/spack/spack/vendor/jinja2/filters.py:219:50: error[invalid-assignment] Object of type `dict_items[object, object]` is not assignable to `Iterable[tuple[str, Any]]`
- Found 4471 diagnostics
+ Found 4470 diagnostics

werkzeug (https://github.com/pallets/werkzeug)
- src/werkzeug/_internal.py:42:12: error[invalid-return-type] Return type does not match returned value: expected `dict[str, Any]`, found `(Any & Top[dict[Unknown, Unknown]]) | dict[str, Any] | (Request & Top[dict[Unknown, Unknown]])`
+ src/werkzeug/_internal.py:42:12: error[invalid-return-type] Return type does not match returned value: expected `dict[str, Any]`, found `(Any & Top[dict[Unknown, Unknown]]) | dict[str, Any] | (Request & Top[dict[Unknown, Unknown]]) | (Any & Top[TypedDict])`
- src/werkzeug/http.py:362:18: error[not-subscriptable] Cannot subscript object of type `object` with no `__getitem__` method
- Found 386 diagnostics
+ Found 385 diagnostics

stone (https://github.com/dropbox/stone)
- stone/backends/python_rsrc/stone_serializers.py:788:52: error[invalid-argument-type] Argument to function `ensure_str` is incorrect: Expected `bytes | str`, found `object`
- Found 252 diagnostics
+ Found 251 diagnostics

jinja (https://github.com/pallets/jinja)
- src/jinja2/filters.py:169:48: error[invalid-assignment] Object of type `dict_items[object, object]` is not assignable to `Iterable[tuple[str, Any]]`
- Found 202 diagnostics
+ Found 201 diagnostics

pyjwt (https://github.com/jpadilla/pyjwt)
- jwt/jwks_client.py:145:35: error[invalid-argument-type] Argument to function `from_dict` is incorrect: Expected `dict[str, Any]`, found `(PyJWKSet & Top[dict[Unknown, Unknown]]) | (Any & Top[dict[Unknown, Unknown]])`
+ jwt/jwks_client.py:145:35: error[invalid-argument-type] Argument to function `from_dict` is incorrect: Expected `dict[str, Any]`, found `(PyJWKSet & Top[dict[Unknown, Unknown]]) | (Any & Top[dict[Unknown, Unknown]]) | (Any & Top[TypedDict])`

beartype (https://github.com/beartype/beartype)
- beartype/_util/func/utilfuncframe.py:1163:12: error[invalid-return-type] Return type does not match returned value: expected `dict[str, Any]`, found `Mapping[str, object] & Top[dict[Unknown, Unknown]]`
+ beartype/_util/func/utilfuncframe.py:1163:12: error[invalid-return-type] Return type does not match returned value: expected `dict[str, Any]`, found `(Mapping[str, object] & Top[dict[Unknown, Unknown]]) | Top[TypedDict]`

graphql-core (https://github.com/graphql-python/graphql-core)
- src/graphql/error/graphql_error.py:213:58: error[invalid-argument-type] Argument to function `getattr` is incorrect: Expected `str`, found `~Literal["original_error"]`
- src/graphql/error/graphql_error.py:213:77: error[invalid-argument-type] Argument to bound method `get` is incorrect: Expected `Never`, found `~Literal["original_error"]`
- src/graphql/execution/types.py:106:28: error[invalid-argument-type] Argument to bound method `get` is incorrect: Expected `Never`, found `Literal["data"]`
- src/graphql/execution/types.py:107:32: error[invalid-argument-type] Argument to bound method `get` is incorrect: Expected `Never`, found `Literal["errors"]`
- src/graphql/execution/types.py:108:32: error[invalid-argument-type] Argument to bound method `get` is incorrect: Expected `Never`, found `Literal["extensions"]`
- src/graphql/execution/types.py:193:27: error[invalid-argument-type] Argument to bound method `get` is incorrect: Expected `Never`, found `Literal["data"]`
- src/graphql/execution/types.py:194:32: error[invalid-argument-type] Argument to bound method `get` is incorrect: Expected `Never`, found `Literal["errors"]`
- src/graphql/execution/types.py:195:32: error[invalid-argument-type] Argument to bound method `get` is incorrect: Expected `Never`, found `Literal["pending"]`
- src/graphql/execution/types.py:196:32: error[invalid-argument-type] Argument to bound method `get` is incorrect: Expected `Never`, found `Literal["hasNext"]`
- src/graphql/execution/types.py:197:32: error[invalid-argument-type] Argument to bound method `get` is incorrect: Expected `Never`, found `Literal["extensions"]`
- src/graphql/execution/types.py:294:28: error[invalid-argument-type] Argument to bound method `get` is incorrect: Expected `Never`, found `Literal["hasNext"]`
- src/graphql/execution/types.py:295:32: error[invalid-argument-type] Argument to bound method `get` is incorrect: Expected `Never`, found `Literal["pending"]`
- src/graphql/execution/types.py:296:32: error[invalid-argument-type] Argument to bound method `get` is incorrect: Expected `Never`, found `Literal["incremental"]`
- src/graphql/execution/types.py:297:32: error[invalid-argument-type] Argument to bound method `get` is incorrect: Expected `Never`, found `Literal["completed"]`
- src/graphql/execution/types.py:298:32: error[invalid-argument-type] Argument to bound method `get` is incorrect: Expected `Never`, found `Literal["extensions"]`
- src/graphql/execution/types.py:411:27: error[invalid-argument-type] Argument to bound method `get` is incorrect: Expected `Never`, found `Literal["data"]`
- src/graphql/execution/types.py:412:31: error[invalid-argument-type] Argument to bound method `get` is incorrect: Expected `Never`, found `Literal["id"]`
- src/graphql/execution/types.py:413:32: error[invalid-argument-type] Argument to bound method `get` is incorrect: Expected `Never`, found `Literal["subPath"]`
- src/graphql/execution/types.py:414:32: error[invalid-argument-type] Argument to bound method `get` is incorrect: Expected `Never`, found `Literal["errors"]`
- src/graphql/execution/types.py:415:32: error[invalid-argument-type] Argument to bound method `get` is incorrect: Expected `Never`, found `Literal["extensions"]`
- src/graphql/execution/types.py:519:27: error[invalid-argument-type] Argument to bound method `get` is incorrect: Expected `Never`, found `Literal["items"]`
- src/graphql/execution/types.py:520:31: error[invalid-argument-type] Argument to bound method `get` is incorrect: Expected `Never`, found `Literal["id"]`
- src/graphql/execution/types.py:521:22: error[no-matching-overload] No overload of bound method `get` matches arguments
- src/graphql/execution/types.py:522:32: error[invalid-argument-type] Argument to bound method `get` is incorrect: Expected `Never`, found `Literal["errors"]`
- src/graphql/execution/types.py:523:22: error[no-matching-overload] No overload of bound method `get` matches arguments
- src/graphql/execution/types.py:617:27: error[invalid-argument-type] Argument to bound method `get` is incorrect: Expected `Never`, found `Literal["id"]`
- src/graphql/execution/types.py:618:32: error[invalid-argument-type] Argument to bound method `get` is incorrect: Expected `Never`, found `Literal["path"]`
- src/graphql/execution/types.py:619:32: error[invalid-argument-type] Argument to bound method `get` is incorrect: Expected `Never`, found `Literal["label"]`
- src/graphql/execution/types.py:669:30: error[invalid-argument-type] Argument to bound method `get` is incorrect: Expected `Never`, found `Literal["id"]`
- src/graphql/execution/types.py:669:62: error[invalid-argument-type] Argument to bound method `get` is incorrect: Expected `Never`, found `Literal["errors"]`
- Found 638 diagnostics
+ Found 608 diagnostics

sockeye (https://github.com/awslabs/sockeye)
- sockeye/inference.py:410:32: error[invalid-argument-type] Argument is incorrect: Expected `RestrictLexicon | None`, found `object`
- Found 437 diagnostics
+ Found 436 diagnostics

porcupine (https://github.com/Akuli/porcupine)
- porcupine/plugins/filetypes.py:33:49: error[invalid-argument-type] Method `__getitem__` of type `bound method Top[dict[Unknown, Unknown]].__getitem__(key: Never, /) -> object` cannot be called with key of type `object` on object of type `Top[dict[Unknown, Unknown]]`
- porcupine/plugins/filetypes.py:33:70: error[invalid-argument-type] Method `__getitem__` of type `bound method Top[dict[Unknown, Unknown]].__getitem__(key: Never, /) -> object` cannot be called with key of type `object` on object of type `Top[dict[Unknown, Unknown]]`
- Found 25 diagnostics
+ Found 23 diagnostics

ignite (https://github.com/pytorch/ignite)
- tests/ignite/test_utils.py:49:28: error[invalid-argument-type] Method `__getitem__` of type `Overload[(index: int, /) -> Unknown, (index: slice[int | None, int | None, int | None], /) -> Sequence[Unknown]]` cannot be called with key of type `Literal["a"]` on object of type `Sequence[Unknown]`
- tests/ignite/test_utils.py:49:28: error[invalid-argument-type] Method `__getitem__` of type `bound method Top[dict[Unknown, Unknown]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["a"]` on object of type `Top[dict[Unknown, Unknown]]`
- tests/ignite/test_utils.py:50:28: error[invalid-argument-type] Method `__getitem__` of type `Overload[(index: int, /) -> Unknown, (index: slice[int | None, int | None, int | None], /) -> Sequence[Unknown]]` cannot be called with key of type `Literal["b"]` on object of type `Sequence[Unknown]`
- tests/ignite/test_utils.py:50:28: error[invalid-argument-type] Method `__getitem__` of type `bound method Top[dict[Unknown, Unknown]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["b"]` on object of type `Top[dict[Unknown, Unknown]]`
- Found 2223 diagnostics
+ Found 2219 diagnostics

PyGithub (https://github.com/PyGithub/PyGithub)
- github/AdvisoryCredit.py:97:31: error[invalid-argument-type] Method `__getitem__` of type `bound method Top[dict[Unknown, Unknown]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["login"]` on object of type `Top[dict[Unknown, Unknown]]`
- github/AdvisoryCredit.py:97:84: error[invalid-argument-type] Method `__getitem__` of type `bound method Top[dict[Unknown, Unknown]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["login"]` on object of type `Top[dict[Unknown, Unknown]]`
- github/AdvisoryCredit.py:98:31: error[invalid-argument-type] Method `__getitem__` of type `bound method Top[dict[Unknown, Unknown]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["type"]` on object of type `Top[dict[Unknown, Unknown]]`
- github/AdvisoryCredit.py:98:53: error[invalid-argument-type] Method `__getitem__` of type `bound method Top[dict[Unknown, Unknown]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["type"]` on object of type `Top[dict[Unknown, Unknown]]`
- github/AdvisoryCredit.py:109:31: error[invalid-argument-type] Method `__getitem__` of type `bound method Top[dict[Unknown, Unknown]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["login"]` on object of type `Top[dict[Unknown, Unknown]]`
- github/AdvisoryCredit.py:109:84: error[invalid-argument-type] Method `__getitem__` of type `bound method Top[dict[Unknown, Unknown]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["login"]` on object of type `Top[dict[Unknown, Unknown]]`
- github/AdvisoryCredit.py:110:21: error[invalid-argument-type] Method `__getitem__` of type `bound method Top[dict[Unknown, Unknown]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["login"]` on object of type `Top[dict[Unknown, Unknown]]`
- github/AdvisoryCredit.py:113:20: error[invalid-return-type] Return type does not match returned value: expected `SimpleCredit`, found `dict[str, object]`
- github/AdvisoryCredit.py:115:25: error[invalid-argument-type] Method `__getitem__` of type `bound method Top[dict[Unknown, Unknown]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["type"]` on object of type `Top[dict[Unknown, Unknown]]`
- github/AdvisoryCredit.py:115:25: error[invalid-argument-type] Invalid argument to key "type" with declared type `str` on TypedDict `SimpleCredit`: value of type `object`
- github/AdvisoryVulnerability.py:129:59: error[invalid-argument-type] Method `__getitem__` of type `bound method Top[dict[Unknown, Unknown]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["package"]` on object of type `Top[dict[Unknown, Unknown]]`
- github/AdvisoryVulnerability.py:129:59: error[invalid-assignment] Object of type `object` is not assignable to `SimpleAdvisoryVulnerabilityPackage`
- github/AdvisoryVulnerability.py:136:31: error[invalid-argument-type] Method `__getitem__` of type `bound method Top[dict[Unknown, Unknown]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["patched_versions"]` on object of type `Top[dict[Unknown, Unknown]]`
- github/AdvisoryVulnerability.py:138:31: error[invalid-argument-type] Method `__getitem__` of type `bound method Top[dict[Unknown, Unknown]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["vulnerable_functions"]` on object of type `Top[dict[Unknown, Unknown]]`
- github/AdvisoryVulnerability.py:141:51: error[invalid-argument-type] Method `__getitem__` of type `bound method Top[dict[Unknown, Unknown]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["vulnerable_functions"]` on object of type `Top[dict[Unknown, Unknown]]`
- github/AdvisoryVulnerability.py:142:20: error[invalid-argument-type] Method `__getitem__` of type `bound method Top[dict[Unknown, Unknown]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["vulnerable_functions"]` on object of type `Top[dict[Unknown, Unknown]]`
- github/AdvisoryVulnerability.py:146:31: error[invalid-argument-type] Method `__getitem__` of type `bound method Top[dict[Unknown, Unknown]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["vulnerable_version_range"]` on object of type `Top[dict[Unknown, Unknown]]`
- github/AdvisoryVulnerability.py:158:73: error[invalid-argument-type] Method `__getitem__` of type `bound method Top[dict[Unknown, Unknown]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["package"]` on object of type `Top[dict[Unknown, Unknown]]`
- github/AdvisoryVulnerability.py:158:73: error[invalid-assignment] Object of type `object` is not assignable to `SimpleAdvisoryVulnerabilityPackage`
- github/AdvisoryVulnerability.py:159:20: error[invalid-return-type] Return type does not match returned value: expected `SimpleAdvisoryVulnerability`, found `dict[str, object]`
- github/AdvisoryVulnerability.py:164:37: error[invalid-argument-type] Method `__getitem__` of type `bound method Top[dict[Unknown, Unknown]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["patched_versions"]` on object of type `Top[dict[Unknown, Unknown]]`
- github/AdvisoryVulnerability.py:164:37: error[invalid-argument-type] Invalid argument to key "patched_versions" with declared type `str | None` on TypedDict `SimpleAdvisoryVulnerability`: value of type `object`
- github/AdvisoryVulnerability.py:165:41: error[invalid-argument-type] Method `__getitem__` of type `bound method Top[dict[Unknown, Unknown]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["vulnerable_functions"]` on object of type `Top[dict[Unknown, Unknown]]`
- github/AdvisoryVulnerability.py:165:41: error[invalid-argument-type] Invalid argument to key "vulnerable_functions" with declared type `list[str] | None` on TypedDict `SimpleAdvisoryVulnerability`: value of type `object`
- github/AdvisoryVulnerability.py:166:45: error[invalid-argument-type] Method `__getitem__` of type `bound method Top[dict[Unknown, Unknown]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["vulnerable_version_range"]` on object of type `Top[dict[Unknown, Unknown]]`
- github/AdvisoryVulnerability.py:166:45: error[invalid-argument-type] Invalid argument to key "vulnerable_version_range" with declared type `str | None` on TypedDict `SimpleAdvisoryVulnerability`: value of type `object`
- github/AdvisoryVulnerability.py:170:30: error[unresolved-attribute] Attribute `package` is not defined on `SimpleAdvisoryVulnerability & ~Top[dict[Unknown, Unknown]]` in union `(SimpleAdvisoryVulnerability & ~Top[dict[Unknown, Unknown]]) | (AdvisoryVulnerability & ~Top[dict[Unknown, Unknown]])`
- github/AdvisoryVulnerability.py:171:25: error[unresolved-attribute] Attribute `package` is not defined on `SimpleAdvisoryVulnerability & ~Top[dict[Unknown, Unknown]]` in union `(SimpleAdvisoryVulnerability & ~Top[dict[Unknown, Unknown]]) | (AdvisoryVulnerability & ~Top[dict[Unknown, Unknown]])`
- github/AdvisoryVulnerability.py:173:33: error[unresolved-attribute] Attribute `patched_versions` is not defined on `SimpleAdvisoryVulnerability & ~Top[dict[Unknown, Unknown]]` in union `(SimpleAdvisoryVulnerability & ~Top[dict[Unknown, Unknown]]) | (AdvisoryVulnerability & ~Top[dict[Unknown, Unknown]])`
- github/AdvisoryVulnerability.py:174:37: error[unresolved-attribute] Attribute `vulnerable_functions` is not defined on `SimpleAdvisoryVulnerability & ~Top[dict[Unknown, Unknown]]` in union `(SimpleAdvisoryVulnerability & ~Top[dict[Unknown, Unknown]]) | (AdvisoryVulnerability & ~Top[dict[Unknown, Unknown]])`
- github/AdvisoryVulnerability.py:175:41: error[unresolved-attribute] Attribute `vulnerable_version_range` is not defined on `SimpleAdvisoryVulnerability & ~Top[dict[Unknown, Unknown]]` in union `(SimpleAdvisoryVulnerability & ~Top[dict[Unknown, Unknown]]) | (AdvisoryVulnerability & ~Top[dict[Unknown, Unknown]])`
- Found 326 diagnostics
+ Found 295 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/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, Divergent] | ((dict[str, Divergent], /) -> None) | None`, found `dict[str, Divergent] | dict[Never, Never] | Top[TypedDict] | (((dict[str, Divergent], /) -> None) & ~Top[dict[Unknown, Unknown]] & ~Top[TypedDict]) | None`
- pydantic/json_schema.py:1696:13: error[no-matching-overload] No overload of bound method `update` matches arguments
- Found 3165 diagnostics
+ Found 3163 diagnostics

tornado (https://github.com/tornadoweb/tornado)
- tornado/gen.py:532:47: error[invalid-argument-type] Argument to function `__new__` is incorrect: Expected `Iterable[None | Awaitable[Unknown] | list[Awaitable[Unknown]] | dict[Any, Awaitable[Unknown]] | Future[Unknown]]`, found `dict_values[object, object] | (Sequence[None | Awaitable[Unknown] | list[Awaitable[Unknown]] | dict[Any, Awaitable[Unknown]] | Future[Unknown]] & ~Top[dict[Unknown, Unknown]]) | (Mapping[Any, None | Awaitable[Unknown] | list[Awaitable[Unknown]] | dict[Any, Awaitable[Unknown]] | Future[Unknown]] & ~Top[dict[Unknown, Unknown]])`
- Found 334 diagnostics
+ Found 333 diagnostics

urllib3 (https://github.com/urllib3/urllib3)
- src/urllib3/fields.py:281:24: error[invalid-assignment] Object of type `dict_items[object, object]` is not assignable to `Iterable[tuple[str, str | bytes | None]]`
- Found 276 diagnostics
+ Found 275 diagnostics

mitmproxy (https://github.com/mitmproxy/mitmproxy)
- mitmproxy/http.py:601:21: error[no-matching-overload] No overload of function `always_bytes` matches arguments
+ mitmproxy/http.py:1081:67: warning[unused-type-ignore-comment] Unused blanket `type: ignore` directive

schemathesis (https://github.com/schemathesis/schemathesis)
- src/schemathesis/config/_diff_base.py:44:39: error[invalid-argument-type] Method `__getitem__` of type `bound method Top[dict[Unknown, Unknown]].__getitem__(key: Never, /) -> object` cannot be called with key of type `object` on object of type `Top[dict[Unknown, Unknown]]`
- src/schemathesis/config/_diff_base.py:44:49: error[invalid-argument-type] Method `__getitem__` of type `bound method Top[dict[Unknown, Unknown]].__getitem__(key: Never, /) -> object` cannot be called with key of type `object` on object of type `Top[dict[Unknown, Unknown]]`
- src/schemathesis/config/_diff_base.py:64:33: error[invalid-argument-type] Argument to bound method `get` is incorrect: Expected `Never`, found `object`
- src/schemathesis/config/_error.py:130:18: error[no-matching-overload] No overload of bound method `get` matches arguments
- src/schemathesis/openapi/checks.py:151:31: error[invalid-argument-type] Argument to function `unbundle` is incorrect: Expected `dict[str, Any] | bool | list[dict[str, Any] | bool]`, found `dict[Unknown, Unknown] | (Unresolvable & Top[dict[Unknown, Unknown]]) | bool | dict[str, Any] | dict[object, object]`
+ src/schemathesis/openapi/checks.py:151:31: error[invalid-argument-type] Argument to function `unbundle` is incorrect: Expected `dict[str, Any] | bool | list[dict[str, Any] | bool]`, found `dict[Unknown, Unknown] | (Unresolvable & Top[dict[Unknown, Unknown]]) | bool | dict[str, Any] | dict[Unknown | str, Unknown]`
- src/schemathesis/openapi/checks.py:173:13: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `dict[str, Any] | bool`, found `dict[Unknown, Unknown] | (Unresolvable & Top[dict[Unknown, Unknown]]) | dict[str, Any] | dict[object, object]`
+ src/schemathesis/openapi/checks.py:173:13: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `dict[str, Any] | bool`, found `dict[Unknown, Unknown] | (Unresolvable & Top[dict[Unknown, Unknown]]) | dict[str, Any] | dict[Unknown | str, Unknown]`
- src/schemathesis/resources/repository.py:119:32: error[invalid-argument-type] Argument to bound method `append` is incorrect: Expected `dict[str, Any]`, found `Top[dict[Unknown, Unknown]]`
+ src/schemathesis/resources/repository.py:119:32: error[invalid-argument-type] Argument to bound method `append` is incorrect: Expected `dict[str, Any]`, found `Top[dict[Unknown, Unknown]] | Top[TypedDict]`
- src/schemathesis/specs/openapi/adapter/responses.py:378:16: error[invalid-return-type] Return type does not match returned value: expected `str | None`, found `object`
- src/schemathesis/specs/openapi/adapter/responses.py:398:16: error[invalid-return-type] Return type does not match returned value: expected `str | None`, found `object`
- src/schemathesis/specs/openapi/adapter/responses.py:411:16: error[invalid-return-type] Return type does not match returned value: expected `str | None`, found `object`
- src/schemathesis/specs/openapi/adapter/responses.py:421:12: error[invalid-return-type] Return type does not match returned value: expected `str | None`, found `object`
- src/schemathesis/specs/openapi/examples.py:603:70: error[unresolved-attribute] Object of type `object` has no attribute `lower`
- src/schemathesis/specs/openapi/examples.py:609:33: error[invalid-argument-type] Argument to function `_find_matching_in_responses` is incorrect: Expected `dict[str, Any]`, found `Top[dict[Unknown, Unknown]]`
+ src/schemathesis/specs/openapi/examples.py:609:33: error[invalid-argument-type] Argument to function `_find_matching_in_responses` is incorrect: Expected `dict[str, Any]`, found `Top[dict[Unknown, Unknown]] | Top[TypedDict]`
- src/schemathesis/specs/openapi/examples.py:616:50: error[invalid-argument-type] Argument to function `_find_matching_in_responses` is incorrect: Expected `dict[str, Any]`, found `Top[dict[Unknown, Unknown]]`
+ src/schemathesis/specs/openapi/examples.py:616:50: error[invalid-argument-type] Argument to function `_find_matching_in_responses` is incorrect: Expected `dict[str, Any]`, found `Top[dict[Unknown, Unknown]] | Top[TypedDict]`
- Found 343 diagnostics
+ Found 334 diagnostics

artigraph (https://github.com/artigraph/artigraph)
- src/arti/storage/_internal.py:146:9: error[invalid-assignment] Invalid subscript assignment with key of type `Unknown` and value of type `object` on object of type `dict[str, str]`
- Found 156 diagnostics
+ Found 155 diagnostics

schema_salad (https://github.com/common-workflow-language/schema_salad)
- schema_salad/avro/schema.py:801:52: error[invalid-argument-type] Argument to bound method `get` is incorrect: Expected `Never`, found `Literal["type"]`
- schema_salad/avro/schema.py:802:34: error[invalid-argument-type] Method `__getitem__` of type `bound method Top[dict[Unknown, Unknown]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["names"]` on object of type `Top[dict[Unknown, Unknown]]`
- schema_salad/avro/schema.py:802:34: error[invalid-argument-type] Argument to function `is_subtype` is incorrect: Expected `None | str | int | ... omitted 6 union elements`, found `object`
- schema_salad/avro/schema.py:803:42: error[invalid-argument-type] Argument to bound method `get` is incorrect: Expected `Never`, found `Literal["type"]`
- schema_salad/avro/schema.py:804:44: error[invalid-argument-type] Method `__getitem__` of type `bound method Top[dict[Unknown, Unknown]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["names"]` on object of type `Top[dict[Unknown, Unknown]]`
- schema_salad/avro/schema.py:804:44: error[invalid-argument-type] Argument to function `is_subtype` is incorrect: Expected `None | str | int | ... omitted 6 union elements`, found `object`
- schema_salad/avro/schema.py:806:33: error[invalid-argument-type] Method `__getitem__` of type `bound method Top[dict[Unknown, Unknown]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["extends"]` on object of type `Top[dict[Unknown, Unknown]]`
- schema_salad/avro/schema.py:806:64: error[invalid-argument-type] Argument to bound method `get` is incorrect: Expected `Never`, found `Literal["name"]`
- schema_salad/avro/schema.py:808:25: error[invalid-argument-type] Argument to bound method `get` is incorrect: Expected `Never`, found `Literal["type"]`
- schema_salad/avro/schema.py:808:56: error[invalid-argument-type] Argument to bound method `get` is incorrect: Expected `Never`, found `Literal["type"]`
- schema_salad/avro/schema.py:809:38: error[invalid-argument-type] Method `__getitem__` of type `bound method Top[dict[Unknown, Unknown]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["items"]` on object of type `Top[dict[Unknown, Unknown]]`
- schema_salad/avro/schema.py:809:38: error[invalid-argument-type] Argument to function `is_subtype` is incorrect: Expected `None | str | int | ... omitted 6 union elements`, found `object`
- schema_salad/avro/schema.py:809:57: error[invalid-argument-type] Method `__getitem__` of type `bound method Top[dict[Unknown, Unknown]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["items"]` on object of type `Top[dict[Unknown, Unknown]]`
- schema_salad/avro/schema.py:809:57: error[invalid-argument-type] Argument to function `is_subtype` is incorrect: Expected `None | str | int | ... omitted 6 union elements`, found `object`
- schema_salad/avro/schema.py:810:25: error[invalid-argument-type] Argument to bound method `get` is incorrect: Expected `Never`, found `Literal["type"]`
- schema_salad/avro/schema.py:810:54: error[invalid-argument-type] Argument to bound method `get` is incorrect: Expected `Never`, found `Literal["type"]`
- schema_salad/avro/schema.py:811:38: error[invalid-argument-type] Method `__getitem__` of type `bound method Top[dict[Unknown, Unknown]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["values"]` on object of type `Top[dict[Unknown, Unknown]]`
- schema_salad/avro/schema.py:811:38: error[invalid-argument-type] Argument to function `is_subtype` is incorrect: Expected `None | str | int | ... omitted 6 union elements`, found `object`
- schema_salad/avro/schema.py:811:58: error[invalid-argument-type] Method `__getitem__` of type `bound method Top[dict[Unknown, Unknown]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["values"]` on object of type `Top[dict[Unknown, Unknown]]`
- schema_salad/avro/schema.py:811:58: error[invalid-argument-type] Argument to function `is_subtype` is incorrect: Expected `None | str | int | ... omitted 6 union elements`, found `object`
- schema_salad/avro/schema.py:812:25: error[invalid-argument-type] Argument to bound method `get` is incorrect: Expected `Never`, found `Literal["type"]`
- schema_salad/avro/schema.py:812:55: error[invalid-argument-type] Argument to bound method `get` is incorrect: Expected `Never`, found `Literal["type"]`
- schema_salad/avro/schema.py:813:38: error[invalid-argument-type] Method `__getitem__` of type `bound method Top[dict[Unknown, Unknown]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["symbols"]` on object of type `Top[dict[Unknown, Unknown]]`
- schema_salad/avro/schema.py:813:38: error[invalid-argument-type] Argument to function `is_subtype` is incorrect: Expected `None | str | int | ... omitted 6 union elements`, found `object`
- schema_salad/avro/schema.py:813:59: error[invalid-argument-type] Method `__getitem__` of type `bound method Top[dict[Unknown, Unknown]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["symbols"]` on object of type `Top[dict[Unknown, Unknown]]`
- schema_salad/avro/schema.py:813:59: error[invalid-argument-type] Argument to function `is_subtype` is incorrect: Expected `None | str | int | ... omitted 6 union elements`, found `object`
- schema_salad/avro/schema.py:814:25: error[invalid-argument-type] Argument to bound method `get` is incorrect: Expected `Never`, found `Literal["type"]`
- schema_salad/avro/schema.py:814:57: error[invalid-argument-type] Argument to bound method `get` is incorrect: Expected `Never`, found `Literal["type"]`
- schema_salad/avro/schema.py:815:57: error[invalid-argument-type] Method `__getitem__` of type `bound method Top[dict[Unknown, Unknown]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["fields"]` on object of type `Top[dict[Unknown, Unknown]]`
- schema_salad/avro/schema.py:817:66: error[invalid-argument-type] Method `__getitem__` of type `bound method Top[dict[Unknown, Unknown]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["fields"]` on object of type `Top[dict[Unknown, Unknown]]`
- Found 370 diagnostics
+ Found 340 diagnostics

psycopg (https://github.com/psycopg/psycopg)
- psycopg/psycopg/errors.py:514:38: error[invalid-argument-type] Argument to bound method `get` is incorrect: Expected `Never`, found `DiagnosticField`
- Found 666 diagnostics
+ Found 665 diagnostics

mypy (https://github.com/python/mypy)
- mypy/server/astdiff.py:157:67: error[invalid-argument-type] Argument to function `compare_symbol_table_snapshots` is incorrect: Expected `dict[str, tuple[object, ...]]`, found `Top[dict[Unknown, Unknown]]`
+ mypy/server/astdiff.py:157:67: error[invalid-argument-type] Argument to function `compare_symbol_table_snapshots` is incorrect: Expected `dict[str, tuple[object, ...]]`, found `Top[dict[Unknown, Unknown]] | Top[TypedDict]`
- mypy/server/astdiff.py:157:78: error[invalid-argument-type] Argument to function `compare_symbol_table_snapshots` is incorrect: Expected `dict[str, tuple[object, ...]]`, found `Top[dict[Unknown, Unknown]]`
+ mypy/server/astdiff.py:157:78: error[invalid-argument-type] Argument to function `compare_symbol_table_snapshots` is incorrect: Expected `dict[str, tuple[object, ...]]`, found `Top[dict[Unknown, Unknown]] | Top[TypedDict]`
- mypy/test/test_diff_cache.py:125:42: error[unsupported-operator] Operator `in` is not supported between objects of type `Literal["/b."]` and `object`
- mypy/test/test_diff_cache.py:125:56: error[unresolved-attribute] Object of type `object` has no attribute `startswith`
- mypy/test/test_diff_cache.py:126:42: error[unsupported-operator] Operator `in` is not supported between objects of type `Literal["/c."]` and `object`
- mypy/test/test_diff_cache.py:126:56: error[unresolved-attribute] Object of type `object` has no attribute `startswith`
- mypy/test/test_diff_cache.py:127:42: error[unsupported-operator] Operator `in` is not supported between objects of type `Literal["/a."]` and `object`
- mypy/test/test_diff_cache.py:127:56: error[unresolved-attribute] Object of type `object` has no attribute `startswith`
- Found 1762 diagnostics
+ Found 1756 diagnostics

mongo-python-driver (https://github.com/mongodb/mongo-python-driver)
- pymongo/asynchronous/topology.py:857:46: error[invalid-argument-type] Argument to bound method `get` is incorrect: Expected `Never`, found `Literal["topologyVersion"]`
+ pymongo/asynchronous/topology.py:859:57: error[invalid-argument-type] Argument to function `_is_stale_error_topology_version` is incorrect: Expected `Mapping[str, Any] | None`, found `object`
- pymongo/collation.py:225:16: error[invalid-return-type] Return type does not match returned value: expected `dict[str, Any] | None`, found `Mapping[str, Any] & Top[dict[Unknown, Unknown]]`
+ pymongo/collation.py:225:16: error[invalid-return-type] Return type does not match returned value: expected `dict[str, Any] | None`, found `(Mapping[str, Any] & Top[dict[Unknown, Unknown]]) | (Mapping[str, Any] & Top[TypedDict])`
- pymongo/errors.py:106:43: error[invalid-argument-type] Argument to bound method `get` is incorrect: Expected `Never`, found `Literal["errorLabels"]`
- pymongo/message.py:1719:47: error[invalid-argument-type] Argument to function `_maybe_add_read_preference` is incorrect: Expected `MutableMapping[str, Any]`, found `(Unknown & Top[MutableMapping[Unknown, Unknown]]) | (Mapping[str, Any] & Top[MutableMapping[Unknown, Unknown]])`
+ pymongo/message.py:1719:47: error[invalid-argument-type] Argument to function `_maybe_add_read_preference` is incorrect: Expected `MutableMapping[str, Any]`, found `(Unknown & Top[MutableMapping[Unknown, Unknown]]) | (Mapping[str, Any] & Top[MutableMapping[Unknown, Unknown]]) | (Unknown & Top[TypedDict]) | (Mapping[str, Any] & Top[TypedDict])`
- pymongo/synchronous/topology.py:855:46: error[invalid-argument-type] Argument to bound method `get` is incorrect: Expected `Never`, found `Literal["topologyVersion"]`
+ pymongo/synchronous/topology.py:857:57: error[invalid-argument-type] Argument to function `_is_stale_error_topology_version` is incorrect: Expected `Mapping[str, Any] | None`, found `object`
- Found 429 diagnostics
+ Found 428 diagnostics

pyproject-metadata (https://github.com/pypa/pyproject-metadata)
- pyproject_metadata/project_table.py:276:16: error[no-matching-overload] No overload of bound method `fullmatch` matches arguments
- pyproject_metadata/project_table.py:311:21: error[invalid-argument-type] Method `__getitem__` of type `bound method Top[dict[Unknown, Unknown]].__getitem__(key: Never, /) -> object` cannot be called with key of type `str` on object of type `Top[dict[Unknown, Unknown]]`
- pyproject_metadata/project_table.py:358:51: error[invalid-argument-type] Argument to function `join` is incorrect: Expected `str`, found `object`
- pyproject_metadata/pyproject.py:90:12: error[invalid-return-type] Return type does not match returned value: expected `dict[str, str] | None`, found `Top[dict[Unknown, Unknown]]`
+ pyproject_metadata/pyproject.py:90:12: error[invalid-return-type] Return type does not match returned value: expected `dict[str, str] | None`, found `Top[dict[Unknown, Unknown]] | Top[TypedDict]`
- Found 10 diagnostics
+ Found 7 diagnostics

apprise (https://github.com/caronc/apprise)
- apprise/config/base.py:1116:31: error[no-matching-overload] No overload of bound method `match` matches arguments
- apprise/config/base.py:1170:37: error[invalid-argument-type] Method `__delitem__` of type `bound method Top[dict[Unknown, Unknown]].__delitem__(key: Never, /) -> None` cannot be called with key of type `Literal["schema"]` on object of type `Top[dict[Unknown, Unknown]]`
- apprise/config/base.py:1175:45: error[invalid-argument-type] Argument to function `_special_token_handler` is incorrect: Expected `dict[str, object]`, found `Top[dict[Unknown, Unknown]]`
- apprise/config/base.py:1179:29: error[no-matching-overload] No overload of bound method `update` matches arguments
- apprise/config/base.py:1188:37: error[invalid-argument-type] Argument to function `_special_token_handler` is incorrect: Expected `dict[str, object]`, found `Top[dict[Unknown, Unknown]]`
- apprise/config/base.py:1196:21: error[no-matching-overload] No overload of bound method `update` matches arguments
- Found 3575 diagnostics
+ Found 3569 diagnostics

meson (https://github.com/mesonbuild/meson)
- mesonbuild/build.py:436:24: error[invalid-return-type] Return type does not match returned value: expected `_T@copy_value`, found `list[Never] | dict[Never, Never] | set[Never]`
+ mesonbuild/build.py:436:24: error[invalid-return-type] Return type does not match returned value: expected `_T@copy_value`, found `list[Never] | dict[Never, Never] | Top[TypedDict] | set[Never]`
- mesonbuild/cargo/manifest.py:117:36: error[no-matching-overload] No overload of bound method `get` matches arguments
- mesonbuild/interpreter/type_checking.py:252:37: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `dict[str, str | list[str]] | None`, found `dict[object, str | list[str]]`
- mesonbuild/interpreterbase/_unholder.py:18:16: error[invalid-return-type] Return type does not match returned value: expected `Sequence[Divergent] | int | dict[str, Divergent] | ... omitted 5 union elements`, found `HoldableObject | int | str | Top[list[Unknown]] | Top[dict[Unknown, Unknown]]`
+ mesonbuild/interpreterbase/_unholder.py:18:16: error[invalid-return-type] Return type does not match returned value: expected `Sequence[Divergent] | int | dict[str, Divergent] | ... omitted 5 union elements`, found `HoldableObject | int | str | ... omitted 3 union elements`
- mesonbuild/interpreterbase/helpers.py:39:20: error[invalid-return-type] Return type does not match returned value: expected `Sequence[Divergent] | int | dict[str, Divergent] | ... omitted 5 union elements`, found `dict[object, Sequence[Divergent] | int | dict[str, Divergent] | ... omitted 5 union elements]`
- mesonbuild/interpreterbase/helpers.py:39:33: error[invalid-argument-type] Argument to function `resolver` is incorrect: Expected `Sequence[Divergent] | int | dict[str, Divergent] | ... omitted 5 union elements`, found `object`
- mesonbuild/interpreterbase/helpers.py:60:54: error[invalid-argument-type] Argument to function `stringifyUserArguments` is incorrect: Expected `Sequence[Divergent] | int | dict[str, Divergent] | ... omitted 5 union elements`, found `object`
- mesonbuild/interpreterbase/helpers.py:61:54: error[invalid-argument-type] Argument to function `stringifyUserArguments` is incorrect: Expected `Sequence[Divergent] | int | dict[str, Divergent] | ... omitted 5 union elements`, found `object`
- mesonbuild/interpreterbase/interpreterbase.py:615:13: error[invalid-assignment] Invalid subscript assignment with key of type `object` and value of type `InterpreterObject` on object of type `dict[str, InterpreterObject | None]`
- mesonbuild/interpreterbase/interpreterbase.py:615:41: error[invalid-argument-type] Argument to bound method `_holderify` is incorrect: Expected `Sequence[Divergent] | int | dict[str, Divergent] | ... omitted 5 union elements`, found `object`
- Found 2354 diagnostics
+ Found 2346 diagnostics

vision (https://github.com/pytorch/vision)
- torchvision/transforms/v2/_utils.py:45:29: error[invalid-argument-type] Argument to function `_check_fill_arg` is incorrect: Expected `int | float | Sequence[int | float] | None | dict[type | str, int | float | Sequence[int | float] | None]`, found `object`
- torchvision/transforms/v2/_utils.py:69:13: error[invalid-assignment] Invalid subscript assignment with key of type `object` and value of type `list[int | float] | None` on object of type `dict[type | str, int | float | Sequence[int | float] | None]`
- torchvision/transforms/v2/_utils.py:69:41: error[invalid-argument-type] Argument to function `_convert_fill_arg` is incorrect: Expected `int | float | Sequence[int | float] | None`, found `object`
- Found 1414 diagnostics
+ Found 1411 diagnostics

cloud-init (https://github.com/canonical/cloud-init)
- cloudinit/config/cc_ubuntu_pro.py:129:16: error[no-matching-overload] No overload of function `search` matches arguments
- cloudinit/config/cc_ubuntu_pro.py:130:48: error[invalid-argument-type] Argument to function `escape` is incorrect: Argument type `~None` does not satisfy constraints (`str`, `bytes`) of type variable `AnyStr`
- cloudinit/config/cc_ubuntu_pro.py:136:23: error[invalid-argument-type] Argument to function `subp` is incorrect: Expected `str | bytes | list[str] | list[bytes]`, found `list[object] | list[str]`
- cloudinit/config/cc_ubuntu_pro.py:140:27: error[no-matching-overload] No overload of bound method `replace` matches arguments
- Found 1318 diagnostics
+ Found 1314 diagnostics

mkdocs (https://github.com/mkdocs/mkdocs)
+ mkdocs/config/config_options.py:139:56: error[invalid-argument-type] Argument to bound method `setdefault` is incorrect: Expected `Never`, found `str`
+ mkdocs/config/config_options.py:142:33: error[no-matching-overload] No overload of bound method `setdefault` matches arguments
- mkdocs/config/config_options.py:274:20: error[invalid-return-type] Return type does not match returned value: expected `dict[str, T@DictOfItems]`, found `Top[dict[Unknown, Unknown]] & ~AlwaysTruthy`
+ mkdocs/config/config_options.py:274:20: error[invalid-return-type] Return type does not match returned value: expected `dict[str, T@DictOfItems]`, found `(Top[dict[Unknown, Unknown]] & ~AlwaysTruthy) | (Top[TypedDict] & ~AlwaysTruthy)`
+ mkdocs/config/config_options.py:283:9: error[invalid-assignment] Object of type `(Top[dict[Unknown, Unknown]] & ~AlwaysFalsy) | (Top[TypedDict] & ~AlwaysFalsy)` is not assignable to attribute `data` of type `dict[Unknown, Unknown]`
- mkdocs/config/config_options.py:298:16: error[invalid-return-type] Return type does not match returned value: expected `dict[str, T@DictOfItems]`, found `Top[dict[Unknown, Unknown]] & ~AlwaysFalsy`
+ mkdocs/config/config_options.py:298:16: error[invalid-return-type] Return type does not match returned value: expected `dict[str, T@DictOfItems]`, found `(Top[dict[Unknown, Unknown]] & ~AlwaysFalsy) | (Top[TypedDict] & ~AlwaysFalsy)`
- mkdocs/config/config_options.py:834:12: error[invalid-argument-type] Method `__getitem__` of type `bound method Top[dict[Unknown, Unknown]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["name"]` on object of type `Top[dict[Unknown, Unknown]]`
- mkdocs/config/config_options.py:834:49: error[invalid-argument-type] Method `__getitem__` of type `bound method Top[dict[Unknown, Unknown]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["name"]` on object of type `Top[dict[Unknown, Unknown]]`
- mkdocs/config/config_options.py:836:46: error[invalid-argument-type] Method `__getitem__` of type `bound method Top[dict[Unknown, Unknown]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["name"]` on object of type `Top[dict[Unknown, Unknown]]`
- mkdocs/config/config_options.py:840:16: error[invalid-argument-type] Method `__getitem__` of type `bound method Top[dict[Unknown, Unknown]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["name"]` on object of type `Top[dict[Unknown, Unknown]]`
- mkdocs/config/config_options.py:844:63: error[invalid-argument-type] Method `__getitem__` of type `bound method Top[dict[Unknown, Unknown]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["custom_dir"]` on object of type `Top[dict[Unknown, Unknown]]`
+ mkdocs/config/config_options.py:846:13: error[invalid-assignment] Cannot assign to a subscript on an object of type `Top[TypedDict]`
- mkdocs/config/config_options.py:846:67: error[invalid-argument-type] Method `__getitem__` of type `bound method Top[dict[Unknown, Unknown]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["custom_dir"]` on object of type `Top[dict[Unknown, Unknown]]`
- mkdocs/config/config_options.py:848:63: error[invalid-argument-type] Method `__getitem__` of type `bound method Top[dict[Unknown, Unknown]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["custom_dir"]` on object of type `Top[dict[Unknown, Unknown]]`
- mkdocs/config/config_options.py:851:26: error[invalid-argument-type] Method `__getitem__` of type `bound method Top[dict[Unknown, Unknown]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["custom_dir"]` on object of type `Top[dict[Unknown, Unknown]]`
- mkdocs/config/config_options.py:855:56: error[invalid-argument-type] Method `__getitem__` of type `bound method Top[dict[Unknown, Unknown]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["locale"]` on object of type `Top[dict[Unknown, Unknown]]`
- mkdocs/config/config_options.py:858:28: error[invalid-argument-type] Argument expression after ** must be a mapping with `str` key type: Found `object`
+ mkdocs/config/config_options.py:985:9: error[invalid-assignment] Invalid subscript assignment with key of type `str` and value of type `(Top[dict[Unknown, Unknown]] & ~AlwaysFalsy) | (Top[TypedDict] & ~AlwaysFalsy)` on object of type `dict[str, dict[Unknown, Unknown]]`
+ mkdocs/config/config_options.py:1007:32: error[unresolved-attribute] Attribute `popitem` is not defined on `Top[TypedDict]` in union `Top[dict[Unknown, Unknown]] | Top[TypedDict]`
+ mkdocs/config/config_options.py:1064:46: error[invalid-argument-type] Argument to bound method `_parse_configs` is incorrect: Expected `list[Unknown] | tuple[Unknown, ...] | dict[Unknown, Unknown]`, found `Top[list[Unknown]] | tuple[object, ...] | Top[dict[Unknown, Unknown]] | Top[TypedDict]`
- mkdocs/tests/structure/page_tests.py:715:17: error[invalid-assignment] Object of type `str | None` is not assignable to attribute `edit_uri` of type `weak_property`
+ mkdocs/tests/structure/page_tests.py:715:17: error[invalid-assignment] Object of type `str | None | Unknown` is not assignable to attribute `edit_uri` of type `weak_property`
- Found 220 diagnostics
+ Found 217 diagnostics

openlibrary (https://github.com/internetarchive/openlibrary)
+ openlibrary/core/lists/model.py:475:29: warning[redundant-cast] Value is already of type `ThingReferenceDict`
- openlibrary/core/lists/model.py:435:24: error[unresolved-attribute] Attribute `key` is not defined on `AnnotatedSeed & ~Top[dict[Unknown, Unknown]]` in union `(Thing & ~str & ~Top[dict[Unknown, Unknown]]) | (AnnotatedSeed & ~Top[dict[Unknown, Unknown]])`
- openlibrary/core/lists/model.py:436:13: error[invalid-assignment] Object of type `(Thing & ~str & ~Top[dict[Unknown, Unknown]]) | (AnnotatedSeed & ~Top[dict[Unknown, Unknown]])` is not assignable to attribute `value` of type `Thing | str`
- openlibrary/core/lists/model.py:483:27: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Thing | str | AnnotatedSeed`, found `str | (ThingReferenceDict & ~Top[dict[Unknown, Unknown]]) | (AnnotatedSeedDict & ~Top[dict[Unknown, Unknown]])`
- openlibrary/plugins/upstream/utils.py:369:49: error[no-matching-overload] No overload of function `sorted` matches arguments
- Found 1133 diagnostics
+ Found 1130 diagnostics

strawberry (https://github.com/strawberry-graphql/strawberry)
+ strawberry/subscriptions/protocols/graphql_transport_ws/handlers.py:180:13: error[invalid-assignment] Cannot assign to a subscript on an object of type `Context@BaseGraphQLTransportWSHandler`
- strawberry/subscriptions/protocols/graphql_transport_ws/handlers.py:182:13: error[invalid-assignment] Object of type `dict[str, object] | dict[Unknown, Unknown]` is not assignable to attribute `connection_params` on type `(Unknown & <Protocol with members 'connection_params'> & ~Top[dict[Unknown, Unknown]]) | (Context@BaseGraphQLTransportWSHandler & <Protocol with members 'connection_params'> & ~Top[dict[Unknown, Unknown]])`
+ strawberry/subscriptions/protocols/graphql_transport_ws/handlers.py:182:13: error[invalid-assignment] Object of type `dict[str, object]` is not assignable to attribute `connection_params` on type `(Unknown & <Protocol with members 'connection_params'> & ~Top[dict[Unknown, Unknown]]) | (Context@BaseGraphQLTransportWSHandler & <Protocol with members 'connection_params'> & ~Top[dict[Unknown, Unknown]])`
+ strawberry/subscriptions/protocols/graphql_ws/handlers.py:101:13: error[invalid-assignment] Cannot assign to a subscript on an object of type `Context@BaseGraphQLWSHandler`
- Found 343 diagnostics
+ Found 345 diagnostics

setuptools (https://github.com/pypa/setuptools)
- setuptools/_distutils/command/build_ext.py:418:39: error[invalid-argument-type] Method `__getitem__` of type `bound method Top[dict[Unknown, Unknown]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["sources"]` on object of type `Top[dict[Unknown, Unknown]]`
+ setuptools/_distutils/command/build_ext.py:445:30: error[not-iterable] Object of type `~AlwaysFalsy` is not iterable
- setuptools/_distutils/command/build_ext.py:430:38: error[invalid-argument-type] Argument to bound method `get` is incorrect: Expected `Never`, found `Literal["include_dirs", "library_dirs", "libraries", "extra_objects", "extra_compile_args", "extra_link_args"]`
- setuptools/_distutils/command/build_ext.py:435:55: error[invalid-argument-type] Argument to bound method `get` is incorrect: Expected `Never`, found `Literal["rpath"]`
- setuptools/_distutils/command/build_ext.py:441:37: error[invalid-argument-type] Argument to bound method `get` is incorrect: Expected `Never`, found `Literal["macros"]`
- Found 1125 diagnostics
+ Found 1122 diagnostics

xarray-dataclasses (https://github.com/astropenguin/xarray-dataclasses)
- xarray_dataclasses/dataarray.py:187:27: error[invalid-argument-type] Method `__getitem__` of type `Overload[(index: int, /) -> int, (index: slice[int | None, int | None, int | None], /) -> Sequence[int]]` cannot be called with key of type `str` on object of type `Sequence[int]`
- xarray_dataclasses/dataarray.py:187:27: error[invalid-argument-type] Method `__getitem__` of type `bound method Top[dict[Unknown, Unknown]].__getitem__(key: Never, /) -> object` cannot be called with key of type `str` on object of type `Top[dict[Unknown, Unknown]]`
- Found 13 diagnostics
+ Found 11 diagnostics

cwltool (https://github.com/common-workflow-language/cwltool)
- cwltool/job.py:180:46: error[no-matching-overload] No overload of bound method `get` matches arguments
- cwltool/job.py:181:39: error[no-matching-overload] No overload of bound method `get` matches arguments
- cwltool/main.py:1337:58: error[invalid-argument-type] Argument to function `remove_at_id` is incorrect: Expected `MutableMapping[str, None | int | str | ... omitted 3 union elements]`, found `Top[MutableMapping[Unknown, Unknown]]`
+ cwltool/main.py:1337:58: error[invalid-argument-type] Argument to function `remove_at_id` is incorrect: Expected `MutableMapping[str, None | int | str | ... omitted 3 union elements]`, found `Top[MutableMapping[Unknown, Unknown]] | Top[TypedDict]`
- cwltool/process.py:314:24: error[invalid-argument-type] Argument to bound method `get` is incorrect: Expected `Never`, found `Literal["class"]`
- cwltool/process.py:318:51: error[invalid-argument-type] Argument to function `_collectDirEntries` is incorrect: Expected `MutableMapping[str, None | int | str | ... omitted 3 union elements] | MutableSequence[MutableMapping[str, None | int | str | ... omitted 3 union elements]] | None`, found `object`
- tests/test_examples.py:327:12: error[invalid-argument-type] Method `__getitem__` of type `bound method MutableMapping[str, Divergent].__getitem__(key: str, /) -> Divergent` cannot be called with key of type `Literal[0]` on object of type `MutableMapping[str, Divergent]`
- tests/test_examples.py:327:12: 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["checksum"]` on object of type `str`
- tests/test_examples.py:327:12: error[not-subscriptable] Cannot subscript object of type `None` with no `__getitem__` method
- tests/test_examples.py:327:12: error[not-subscriptable] Cannot subscript object of type `int` with no `__getitem__` method
- tests/test_examples.py:327:12: error[not-subscriptable] Cannot subscript object of type `float` with no `__getitem__` method
- tests/test_examples.py:328:12: error[invalid-argument-type] Method `__getitem__` of type `bound method MutableMapping[str, Divergent].__getitem__(key: str, /) -> Divergent` cannot be called with key of type `Literal[1]` on object of type `MutableMapping[str, Divergent]`
- tests/test_examples.py:328:12: error[not-subscriptable] Cannot subscript object of type `None` with no `__getitem__` method
- tests/test_examples.py:328:12: error[not-subscriptable] Cannot subscript object of type `int` with no `__getitem__` method
- tests/test_examples.py:328:12: error[not-subscriptable] Cannot subscript object of type `float` with no `__getitem__` method
- tests/test_examples.py:329:12: error[invalid-argument-type] Method `__getitem__` of type `bound method MutableMapping[str, Divergent].__getitem__(key: str, /) -> Divergent` cannot be called with key of type `Literal[2]` on object of type `MutableMapping[str, Divergent]`
- tests/test_examples.py:329:12: 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["checksum"]` on object of type `str`
- tests/test_examples.py:329:12: error[not-subscriptable] Cannot subscript object of type `None` with no `__getitem__` method
- tests/test_examples.py:329:12: error[not-subscriptable] Cannot subscript object of type `int` with no `__getitem__` method
- tests/test_examples.py:329:12: error[not-subscriptable] Cannot subscript object of type `float` with no `__getitem__` method
- tests/test_examples.py:342:12: 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["checksum"]` on object of type `str`
- tests/test_examples.py:342:12: error[invalid-argument-type] Method `__getitem__` of type `Overload[(index: int, /) -> Divergent, (index: slice[int | None, int | None, int | None], /) -> MutableSequence[Divergent]]` cannot be called with key of type `Literal["checksum"]` on object of type `MutableSequence[Divergent]`
- tests/test_examples.py:342:12: error[not-subscriptable] Cannot subscript object of type `None` with no `__getitem__` method
- tests/test_examples.py:342:12: error[not-subscriptable] Cannot subscript object of type `int` with no `__getitem__` method
- tests/test_examples.py:342:12: error[not-subscriptable] Cannot subscript object of type `float` with no `__getitem__` method
- tests/test_examples.py:1448:12: error[invalid-argument-type] Method `__getitem__` of type `Overload[(index: int, /) -> Divergent, (index: slice[int | None, int | None, int | None], /) -> MutableSequence[Divergent]]` cannot be called with key of type `Literal["checksum"]` on object of type `MutableSequence[Divergent]`
- tests/test_examples.py:1448:12: error[invalid-argument-type] Method `__getitem__` of type `bound method Top[dict[Unknown, Unknown]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["checksum"]` on object of type `Top[dict[Unknown, Unknown]]`
- tests/test_examples.py:1693:28: 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["location"]` on object of type `str`
- tests/test_examples.py:1693:63: error[not-iterable] Object of type `None | int | str | ... omitted 3 union elements` may not be iterable
- tests/test_secrets.py:31:41: error[invalid-argument-type] Method `__getitem__` of type `Overload[(index: int, /) -> Divergent, (index: slice[int | None, int | None, int | None], /) -> MutableSequence[Divergent]]` cannot be called with key of type `Literal["foo"]` on object of type `MutableSequence[Divergent]`
- tests/test_secrets.py:31:41: error[invalid-argument-type] Method `__getitem__` of type `bound method Top[dict[Unknown, Unknown]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["foo"]` on object of type `Top[dict[Unknown, Unknown]]`
- Found 502 diagnostics
+ Found 473 diagnostics

hydra-zen (https://github.com/mit-ll-responsible-ai/hydra-zen)
+ src/hydra_zen/structured_configs/_implementations.py:3837:9: error[invalid-assignment] Object of type `(Sequence[Divergent] & Top[dict[Unknown, Unknown]]) | (ListConfig & Top[dict[Unknown, Unknown]]) | (DictConfig & Top[dict[Unknown, Unknown]]) | ... omitted 4 union elements` is not assignable to attribute `dict_` of type `dict[Any, Any]`
- Found 514 diagnostics
+ Found 515 diagnostics

xarray (https://github.com/pydata/xarray)
- xarray/core/dataarray.py:473:9: error[invalid-assignment] Object of type `(Sequence[Sequence[Unknown] | Index[Any] | DataArray | Variable | ndarray[tuple[Any, ...], dtype[Any]]] & Top[dict[Unknown, Unknown]]) | (Mapping[Unknown, Unknown] & Top[dict[Unknown, Unknown]]) | dict[Unknown, Variable]` is not assignable to attribute `_coords` of type `dict[Any, Variable]`
+ xarray/core/dataarray.py:473:9: error[invalid-assignment] Object of type `(Sequence[Sequence[Unknown] | Index[Any] | DataArray | Variable | ndarray[tuple[Any, ...], dtype[Any]]] & Top[dict[Unknown, Unknown]]) | (Mapping[Unknown, Unknown] & Top[dict[Unknown, Unknown]]) | (Mapping[Unknown, Unknown] & Top[TypedDict]) | dict[Unknown, Variable]` is not assignable to attribute `_coords` of type `dict[Any, Variable]`

scikit-build-core (https://github.com/scikit-build/scikit-build-core)
- src/scikit_build_core/_vendor/pyproject_metadata/project_table.py:276:16: error[no-matching-overload] No overload of bound method `fullmatch` matches arguments
- src/scikit_build_core/_vendor/pyproject_metadata/project_table.py:311:21: error[invalid-argument-type] Method `__getitem__` of type `bound method Top[dict[Unknown, Unknown]].__getitem__(key: Never, /) -> object` cannot be called with key of type `str` on object of type `Top[dict[Unknown, Unknown]]`
- src/scikit_build_core/_vendor/pyproject_metadata/project_table.py:358:51: error[invalid-argument-type] Argument to function `join` is incorrect: Expected `str`, found `object`
- src/scikit_build_core/_vendor/pyproject_metadata/pyproject.py:90:12: error[invalid-return-type] Return type does not match returned value: expected `dict[str, str] | None`, found `Top[dict[Unknown, Unknown]]`
+ src/scikit_build_core/_vendor/pyproject_metadata/pyproject.py:90:12: error[invalid-return-type] Return type does not match returned value: expected `dict[str, str] | None`, found `Top[dict[Unknown, Unknown]] | Top[TypedDict]`
- Found 57 diagnostics
+ Found 54 diagnostics

altair (https://github.com/vega/altair)
- altair/jupyter/jupyter_chart.py:251:34: error[unresolved-attribute] Attribute `to_dict` is not defined on `UndefinedType & ~Top[dict[Unknown, Unknown]]` in union `(Any & ~Top[dict[Unknown, Unknown]]) | (UndefinedType & ~Top[dict[Unknown, Unknown]])`
+ altair/jupyter/jupyter_chart.py:251:34: error[unresolved-attribute] Attribute `to_dict` is not defined on `UndefinedType & ~Top[dict[Unknown, Unknown]]` in union `(Any & ~Top[dict[Unknown, Unknown]] & ~Top[TypedDict]) | (UndefinedType & ~Top[dict[Unknown, Unknown]])`
- altair/jupyter/jupyter_chart.py:253:35: error[invalid-argument-type] Method `__getitem__` of type `bound method Top[dict[Unknown, Unknown]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["type"]` on object of type `Top[dict[Unknown, Unknown]]`
- altair/jupyter/jupyter_chart.py:256:29: error[no-matching-overload] No overload of bou

... (truncated 247 lines) ...

@astral-sh-bot
Copy link
Copy Markdown

astral-sh-bot Bot commented Mar 13, 2026

Memory usage report

Summary

Project Old New Diff Outcome
prefect 690.36MB 690.71MB +0.05% (357.17kB)
sphinx 260.54MB 260.66MB +0.04% (120.01kB)
trio 117.15MB 117.15MB +0.01% (7.51kB)
flake8 47.79MB 47.79MB +0.00% (1.59kB)

Significant changes

Click to expand detailed breakdown

prefect

Name Old New Diff Outcome
infer_expression_types_impl 57.23MB 57.32MB +0.15% (87.88kB)
infer_definition_types 87.41MB 87.45MB +0.05% (41.37kB)
infer_scope_types_impl 56.74MB 56.77MB +0.05% (31.30kB)
is_redundant_with_impl::interned_arguments 2.15MB 2.17MB +1.02% (22.43kB)
all_negative_narrowing_constraints_for_expression 1.98MB 2.01MB +1.08% (21.93kB)
is_redundant_with_impl 1.91MB 1.93MB +1.07% (20.91kB)
Type<'db>::apply_specialization_ 3.69MB 3.71MB +0.52% (19.51kB)
all_narrowing_constraints_for_expression 6.11MB 6.13MB +0.29% (17.88kB)
Type<'db>::member_lookup_with_policy_ 16.05MB 16.06MB +0.10% (15.67kB)
Type<'db>::apply_specialization_::interned_arguments 3.04MB 3.06MB +0.38% (11.72kB)
Type<'db>::class_member_with_policy_ 17.21MB 17.22MB +0.06% (10.14kB)
check_file_impl 17.42MB 17.41MB -0.06% (9.86kB)
infer_unpack_types 976.23kB 984.92kB +0.89% (8.68kB)
StaticClassLiteral<'db>::try_mro_ 4.35MB 4.34MB -0.18% (7.91kB)
when_constraint_set_assignable_to_owned_impl 1.55MB 1.54MB -0.45% (7.06kB)
... 54 more

sphinx

Name Old New Diff Outcome
infer_expression_types_impl 20.48MB 20.49MB +0.09% (17.92kB)
is_redundant_with_impl 928.63kB 942.34kB +1.48% (13.71kB)
is_redundant_with_impl::interned_arguments 1.07MB 1.09MB +1.12% (12.29kB)
Type<'db>::member_lookup_with_policy_ 6.84MB 6.85MB +0.11% (7.37kB)
infer_definition_types 23.90MB 23.90MB +0.03% (6.51kB)
Type<'db>::apply_specialization_ 1.59MB 1.60MB +0.39% (6.37kB)
IntersectionType 463.77kB 468.91kB +1.11% (5.14kB)
Type<'db>::try_call_dunder_get_ 4.87MB 4.88MB +0.10% (5.12kB)
Type<'db>::class_member_with_policy_ 7.64MB 7.65MB +0.06% (4.83kB)
infer_scope_types_impl 15.48MB 15.48MB +0.03% (4.06kB)
UnionType 447.14kB 450.73kB +0.80% (3.59kB)
Type<'db>::apply_specialization_::interned_arguments 1.43MB 1.44MB +0.21% (3.12kB)
parsed_module 32.62MB 32.63MB +0.01% (3.10kB)
FunctionType 3.18MB 3.18MB +0.09% (3.08kB)
StaticClassLiteral<'db>::try_mro_ 1.93MB 1.92MB -0.14% (2.76kB)
... 53 more

trio

Name Old New Diff Outcome
parsed_module 27.13MB 27.14MB +0.01% (3.10kB)
semantic_index 30.03MB 30.03MB +0.01% (2.00kB)
is_redundant_with_impl 241.78kB 242.51kB +0.30% (744.00B)
StaticClassLiteral<'db>::try_mro_ 793.45kB 792.75kB -0.09% (716.00B)
is_redundant_with_impl::interned_arguments 283.68kB 284.37kB +0.24% (704.00B)
infer_definition_types 7.80MB 7.80MB +0.01% (648.00B)
IntersectionType 130.89kB 131.25kB +0.27% (368.00B)
UnionType 142.73kB 143.06kB +0.23% (336.00B)
Definition 4.36MB 4.36MB +0.01% (288.00B)
StaticClassLiteral<'db>::try_mro_::interned_arguments 186.19kB 186.05kB -0.08% (144.00B)
known_class_to_class_literal 6.36kB 6.49kB +2.15% (140.00B)
Specialization 456.20kB 456.08kB -0.03% (128.00B)
StaticClassLiteral<'db>::is_typed_dict_ 67.31kB 67.20kB -0.16% (108.00B)
infer_expression_types_impl 6.96MB 6.96MB +0.00% (108.00B)
source_text 3.76MB 3.76MB +0.00% (98.00B)
... 6 more

flake8

Name Old New Diff Outcome
parsed_module 17.40MB 17.40MB +0.02% (3.10kB)
infer_expression_types_impl 1.02MB 1.02MB -0.28% (2.88kB)
semantic_index 13.74MB 13.74MB +0.01% (2.00kB)
StaticClassLiteral<'db>::try_mro_ 310.14kB 309.45kB -0.23% (716.00B)
Definition 2.16MB 2.16MB +0.01% (288.00B)
StaticClassLiteral<'db>::try_mro_::interned_arguments 70.73kB 70.59kB -0.20% (144.00B)
Specialization 157.61kB 157.48kB -0.08% (128.00B)
StaticClassLiteral<'db>::is_typed_dict_ 28.09kB 27.98kB -0.38% (108.00B)
source_text 1.56MB 1.56MB +0.01% (98.00B)
Expression 368.58kB 368.65kB +0.02% (72.00B)
GenericAlias 68.70kB 68.62kB -0.10% (72.00B)
ScopeId 230.74kB 230.78kB +0.02% (40.00B)
infer_definition_types 1.87MB 1.87MB +0.00% (24.00B)

Copy link
Copy Markdown
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.

Exciting! 😃

I know this is still in draft, just a couple of things I noticed

Comment on lines +158 to +162
if class.is_known(db, KnownClass::Dict) {
UnionType::from_two_elements(db, instance_constraint, Type::TypedDictTop)
} else {
instance_constraint
}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

you also want to do the same here if class.is_known(db, KnownClass::MutableMapping)

Comment thread crates/ty_python_semantic/src/types/relation.rs Outdated
Comment thread crates/ty_python_semantic/src/types.rs Outdated
@charliermarsh charliermarsh force-pushed the charlie/td-narrow branch 2 times, most recently from 18db004 to 3baa343 Compare March 14, 2026 02:51
@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented Mar 14, 2026

Merging this PR will not alter performance

✅ 57 untouched benchmarks
⏩ 60 skipped benchmarks1


Comparing charlie/td-narrow (d7dcc24) with main (41f8a52)

Open in CodSpeed

Footnotes

  1. 60 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@charliermarsh charliermarsh force-pushed the charlie/td-narrow branch 6 times, most recently from 0be1f1e to bb52eee Compare March 14, 2026 19:54
@charliermarsh
Copy link
Copy Markdown
Member Author

I think these changes have the behavior we want, but it's more complex than I wanted.

Copy link
Copy Markdown
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.

Haven't looked through the whole patch yet because it's in draft (LMK if you want me to) -- but there are more changes to narrow.rs now than I'd have expected

Comment thread crates/ty_python_semantic/resources/mdtest/narrow/isinstance.md Outdated
def f(x: dict[str, int] | list[str], y: object):
if isinstance(x, t.Dict):
reveal_type(x) # revealed: dict[str, int]
reveal_type(x) # revealed: (dict[str, int] & dict[Any, Any]) | (dict[str, int] & Top[TypedDict])
Copy link
Copy Markdown
Member

@AlexWaygood AlexWaygood Mar 15, 2026

Choose a reason for hiding this comment

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

this should still be dict[str, int], and this will fall out naturally if you implement what I said in #23943 (comment):

  • isinstance(x, dict) (or isinstance(x, typing.Dict) should add a narrowing constraint of Top[dict[Unknown, Unknown]] | TypedDictTop
  • that means that the narrowed type of x here would be (dict[str, int] | list[str]) & (Top[dict[Unknown, Unknown]] | TypedDictTop
  • Due to de Morgan's rules, that simplifies to (dict[str, int] & Top[dict[Unknown, Unknown]]) | (dict[str, int] & TypedDictTop) | (list[str] & Top[dict[Unknown, Unknown]]) | (list[str] & TypedDictTop)
  • And that should in turn simplify to dict[str, int] | Never | Never | Never:
    • dict[str, int] is a subtype of Top[dict[Unknown, Unknown]], so dict[str, int] & Top[dict[Unknown, Unknown]] simplifies to dict[str, int]
    • TypedDictTop, and all TypedDict types, should be implemented as being disjoint from any non-structural type that is not a supertype of TypedDictTop: they should be disjoint from both dicst[str, int] and list[str]. If you do that, then both dict[str, int] & TypedDictTop and list[str] & TypedDictTop will naturally simplify to Never in our intersection builder.
    • dict[str, int] is already understood by ty as being disjoint from list[str], so that part should already naturally be simplified to Never in our intersection builder
  • dict[str, int] | Never | Never | Never will naturally be simplified to dict[str, int] by our union builder

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

"Structural types" are TypedDict types (including TypedDictTop itself), Callable types and Protocol types. The only non-structural supertypes of TypedDictTop are Mapping[str, object] and all nominal supertypes of Mapping[str, object].

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

When I make this change, I see the following regression:

from typing import Any, TypedDict

class TD(TypedDict):
    x: int

def f(dt: dict[str, Any], key: str):
    reveal_type(dt.get(key, {"x": 0}))  # revealed: Any
    x: TD = dt.get(key, {"x": 0})
    reveal_type(x)  # current: Any; after the change: Unknown

Trying to figure that out.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

hmm, interesting... I can't immediately say I know why that would be. There might be an unrelated pre-existing bug somewhere? not sure

Comment thread crates/ty_python_semantic/src/types/relation.rs Outdated
@charliermarsh charliermarsh force-pushed the charlie/td-narrow branch 2 times, most recently from 3dc84c5 to a840e56 Compare March 16, 2026 01:12
@astral-sh-bot
Copy link
Copy Markdown

astral-sh-bot Bot commented Mar 16, 2026

ecosystem-analyzer results

Failing projects:

Project Old Status New Status Old Return Code New Return Code
pywin32 abnormal exit abnormal exit 2 2

Diagnostic changes:

Lint rule Added Removed Changed
invalid-argument-type 22 286 31
no-matching-overload 1 34 1
invalid-assignment 14 17 4
invalid-return-type 8 7 18
unresolved-attribute 15 12 6
invalid-key 0 8 6
not-subscriptable 0 13 0
unsupported-operator 0 8 0
not-iterable 1 2 1
unused-ignore-comment 3 0 0
invalid-type-form 0 0 2
invalid-yield 0 1 0
redundant-cast 1 0 0
too-many-positional-arguments 0 1 0
unused-type-ignore-comment 1 0 0
Total 66 389 69

Showing a random sample of 249 of 524 changes. See the HTML report for the full diff.

Raw diff sample (249 of 524 changes)
PyGithub (https://github.com/PyGithub/PyGithub)
- github/AdvisoryCredit.py:97:31 error[invalid-argument-type] Method `__getitem__` of type `bound method Top[dict[Unknown, Unknown]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["login"]` on object of type `Top[dict[Unknown, Unknown]]`
- github/AdvisoryCredit.py:98:31 error[invalid-argument-type] Method `__getitem__` of type `bound method Top[dict[Unknown, Unknown]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["type"]` on object of type `Top[dict[Unknown, Unknown]]`
- github/AdvisoryCredit.py:98:53 error[invalid-argument-type] Method `__getitem__` of type `bound method Top[dict[Unknown, Unknown]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["type"]` on object of type `Top[dict[Unknown, Unknown]]`
- github/AdvisoryCredit.py:115:25 error[invalid-argument-type] Invalid argument to key "type" with declared type `str` on TypedDict `SimpleCredit`: value of type `object`
- github/AdvisoryCredit.py:115:25 error[invalid-argument-type] Method `__getitem__` of type `bound method Top[dict[Unknown, Unknown]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["type"]` on object of type `Top[dict[Unknown, Unknown]]`
- github/AdvisoryVulnerability.py:129:59 error[invalid-assignment] Object of type `object` is not assignable to `SimpleAdvisoryVulnerabilityPackage`
- github/AdvisoryVulnerability.py:136:31 error[invalid-argument-type] Method `__getitem__` of type `bound method Top[dict[Unknown, Unknown]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["patched_versions"]` on object of type `Top[dict[Unknown, Unknown]]`
- github/AdvisoryVulnerability.py:146:31 error[invalid-argument-type] Method `__getitem__` of type `bound method Top[dict[Unknown, Unknown]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["vulnerable_version_range"]` on object of type `Top[dict[Unknown, Unknown]]`
- github/AdvisoryVulnerability.py:164:37 error[invalid-argument-type] Invalid argument to key "patched_versions" with declared type `str | None` on TypedDict `SimpleAdvisoryVulnerability`: value of type `object`
- github/AdvisoryVulnerability.py:165:41 error[invalid-argument-type] Method `__getitem__` of type `bound method Top[dict[Unknown, Unknown]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["vulnerable_functions"]` on object of type `Top[dict[Unknown, Unknown]]`
- github/AdvisoryVulnerability.py:166:45 error[invalid-argument-type] Method `__getitem__` of type `bound method Top[dict[Unknown, Unknown]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["vulnerable_version_range"]` on object of type `Top[dict[Unknown, Unknown]]`
- github/AdvisoryVulnerability.py:170:30 error[unresolved-attribute] Attribute `package` is not defined on `SimpleAdvisoryVulnerability & ~Top[dict[Unknown, Unknown]]` in union `(SimpleAdvisoryVulnerability & ~Top[dict[Unknown, Unknown]]) | (AdvisoryVulnerability & ~Top[dict[Unknown, Unknown]])`
- github/AdvisoryVulnerability.py:171:25 error[unresolved-attribute] Attribute `package` is not defined on `SimpleAdvisoryVulnerability & ~Top[dict[Unknown, Unknown]]` in union `(SimpleAdvisoryVulnerability & ~Top[dict[Unknown, Unknown]]) | (AdvisoryVulnerability & ~Top[dict[Unknown, Unknown]])`
- github/AdvisoryVulnerability.py:173:33 error[unresolved-attribute] Attribute `patched_versions` is not defined on `SimpleAdvisoryVulnerability & ~Top[dict[Unknown, Unknown]]` in union `(SimpleAdvisoryVulnerability & ~Top[dict[Unknown, Unknown]]) | (AdvisoryVulnerability & ~Top[dict[Unknown, Unknown]])`
- github/AdvisoryVulnerability.py:174:37 error[unresolved-attribute] Attribute `vulnerable_functions` is not defined on `SimpleAdvisoryVulnerability & ~Top[dict[Unknown, Unknown]]` in union `(SimpleAdvisoryVulnerability & ~Top[dict[Unknown, Unknown]]) | (AdvisoryVulnerability & ~Top[dict[Unknown, Unknown]])`

altair (https://github.com/vega/altair)
- altair/utils/data.py:161:13 error[invalid-argument-type] Argument to function `len` is incorrect: Expected `Sized`, found `object`
- altair/utils/data.py:193:22 error[invalid-argument-type] Method `__getitem__` of type `bound method Top[dict[Unknown, Unknown]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["values"]` on object of type `Top[dict[Unknown, Unknown]]`
- altair/utils/data.py:193:22 error[invalid-argument-type] Method `__getitem__` of type `bound method Top[dict[Unknown, Unknown]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["values"]` on object of type `Top[dict[Unknown, Unknown]]`
- altair/utils/data.py:193:22 error[invalid-argument-type] Method `__getitem__` of type `bound method Top[dict[Unknown, Unknown]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["values"]` on object of type `Top[dict[Unknown, Unknown]]`
- altair/utils/data.py:199:36 error[invalid-argument-type] Argument to bound method `Random.sample` is incorrect: Expected `Sequence[Unknown] | AbstractSet[Unknown]`, found `object`
- altair/utils/data.py:378:27 error[invalid-argument-type] Method `__getitem__` of type `bound method Top[dict[Unknown, Unknown]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["values"]` on object of type `Top[dict[Unknown, Unknown]]`
- altair/utils/data.py:378:27 error[invalid-argument-type] Method `__getitem__` of type `bound method Top[dict[Unknown, Unknown]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["values"]` on object of type `Top[dict[Unknown, Unknown]]`
- altair/utils/data.py:378:27 error[invalid-argument-type] Method `__getitem__` of type `bound method Top[dict[Unknown, Unknown]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["values"]` on object of type `Top[dict[Unknown, Unknown]]`
- altair/utils/data.py:210:39 error[invalid-argument-type] Argument to function `len` is incorrect: Expected `Sized`, found `(NativeDataFrame & ~DataFrame & ~Top[dict[Unknown, Unknown]]) | (narwhals.stable.v1.typing.DataFrameLike & ~DataFrame & ~Top[dict[Unknown, Unknown]]) | (Unknown & ~None & ~DataFrame & ~Top[dict[Unknown, Unknown]]) | (SupportsGeoInterface & ~DataFrame & ~Top[dict[Unknown, Unknown]]) | (altair.utils.core.DataFrameLike & ~DataFrame & ~Top[dict[Unknown, Unknown]])`
+ altair/utils/data.py:210:39 error[invalid-argument-type] Argument to function `len` is incorrect: Expected `Sized`, found `(NativeDataFrame & ~DataFrame & ~Top[dict[Unknown, Unknown]]) | (narwhals.stable.v1.typing.DataFrameLike & ~DataFrame & ~Top[dict[Unknown, Unknown]]) | (Unknown & ~None & ~DataFrame & ~Top[dict[Unknown, Unknown]] & ~TypedDictTop) | (SupportsGeoInterface & ~DataFrame & ~Top[dict[Unknown, Unknown]]) | (altair.utils.core.DataFrameLike & ~DataFrame & ~Top[dict[Unknown, Unknown]])`
- altair/utils/data.py:416:12 error[unresolved-attribute] Attribute `write_csv` is not defined on `NativeDataFrame & ~SupportsGeoInterface & ~DataFrame & ~Top[dict[Unknown, Unknown]]`, `DataFrameLike & ~SupportsGeoInterface & ~DataFrame & ~Top[dict[Unknown, Unknown]]`, `DataFrameLike & ~SupportsGeoInterface & ~DataFrame & ~Top[dict[Unknown, Unknown]]` in union `(NativeDataFrame & ~SupportsGeoInterface & ~DataFrame & ~Top[dict[Unknown, Unknown]]) | (narwhals.stable.v1.typing.DataFrameLike & ~SupportsGeoInterface & ~DataFrame & ~Top[dict[Unknown, Unknown]]) | (Unknown & ~SupportsGeoInterface & ~DataFrame & ~Top[dict[Unknown, Unknown]]) | (altair.utils.core.DataFrameLike & ~SupportsGeoInterface & ~DataFrame & ~Top[dict[Unknown, Unknown]])`
+ altair/utils/data.py:416:12 error[unresolved-attribute] Attribute `write_csv` is not defined on `NativeDataFrame & ~SupportsGeoInterface & ~DataFrame & ~Top[dict[Unknown, Unknown]]`, `DataFrameLike & ~SupportsGeoInterface & ~DataFrame & ~Top[dict[Unknown, Unknown]]`, `DataFrameLike & ~SupportsGeoInterface & ~DataFrame & ~Top[dict[Unknown, Unknown]]` in union `(NativeDataFrame & ~SupportsGeoInterface & ~DataFrame & ~Top[dict[Unknown, Unknown]]) | (narwhals.stable.v1.typing.DataFrameLike & ~SupportsGeoInterface & ~DataFrame & ~Top[dict[Unknown, Unknown]]) | (Unknown & ~SupportsGeoInterface & ~DataFrame & ~Top[dict[Unknown, Unknown]] & ~TypedDictTop) | (altair.utils.core.DataFrameLike & ~SupportsGeoInterface & ~DataFrame & ~Top[dict[Unknown, Unknown]])`
- altair/vegalite/v6/api.py:255:18 error[invalid-argument-type] Method `__getitem__` of type `bound method Top[dict[Unknown, Unknown]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["values"]` on object of type `Top[dict[Unknown, Unknown]]`
- altair/vegalite/v6/api.py:255:18 error[invalid-argument-type] Method `__getitem__` of type `bound method Top[dict[Unknown, Unknown]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["values"]` on object of type `Top[dict[Unknown, Unknown]]`
- altair/vegalite/v6/api.py:255:18 error[invalid-argument-type] Method `__getitem__` of type `bound method Top[dict[Unknown, Unknown]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["values"]` on object of type `Top[dict[Unknown, Unknown]]`
- altair/vegalite/v6/api.py:255:18 error[invalid-argument-type] Method `__getitem__` of type `bound method Top[dict[Unknown, Unknown]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["values"]` on object of type `Top[dict[Unknown, Unknown]]`
+ altair/vegalite/v6/api.py:908:22 error[invalid-argument-type] Argument to bound method `TypedDictFallback.update` is incorrect: Argument type `dict[str, Any]` does not satisfy upper bound `TypedDictTop` of type variable `Self`
+ altair/vegalite/v6/api.py:908:22 error[invalid-argument-type] Argument to bound method `TypedDictFallback.update` is incorrect: Expected `TypedDictTop`, found `dict[str, Any]`
- altair/vegalite/v6/api.py:909:12 error[invalid-return-type] Return type does not match returned value: expected `dict[str, Any]`, found `(Mapping[str, Any] & Top[dict[Unknown, Unknown]] & ~SchemaBase) | dict[str, Any]`
+ altair/vegalite/v6/api.py:909:12 error[invalid-return-type] Return type does not match returned value: expected `dict[str, Any]`, found `(Mapping[str, Any] & Top[dict[Unknown, Unknown]] & ~SchemaBase) | (Mapping[str, Any] & TypedDictTop) | dict[str, Any]`

apprise (https://github.com/caronc/apprise)
- apprise/config/base.py:1118:31 error[no-matching-overload] No overload of bound method `Pattern.match` matches arguments
- apprise/config/base.py:1172:37 error[invalid-argument-type] Method `__delitem__` of type `bound method Top[dict[Unknown, Unknown]].__delitem__(key: Never, /) -> None` cannot be called with key of type `Literal["schema"]` on object of type `Top[dict[Unknown, Unknown]]`
- apprise/config/base.py:1198:21 error[no-matching-overload] No overload of bound method `MutableMapping.update` matches arguments

artigraph (https://github.com/artigraph/artigraph)
- src/arti/internal/type_hints.py:161:41 error[invalid-type-form] Variable of type `type` is not allowed in a type expression
+ src/arti/internal/type_hints.py:161:41 error[invalid-type-form] Variable of type `type[Unknown]` is not allowed in a type expression

bokeh (https://github.com/bokeh/bokeh)
- src/bokeh/core/property/bases.py:264:41 error[invalid-argument-type] Method `__getitem__` of type `bound method Top[dict[Unknown, Unknown]].__getitem__(key: Never, /) -> object` cannot be called with key of type `object` on object of type `Top[dict[Unknown, Unknown]]`
- src/bokeh/core/property/bases.py:264:49 error[invalid-argument-type] Method `__getitem__` of type `bound method Top[dict[Unknown, Unknown]].__getitem__(key: Never, /) -> object` cannot be called with key of type `object` on object of type `Top[dict[Unknown, Unknown]]`
- src/bokeh/embed/standalone.py:262:18 error[invalid-assignment] Object of type `list[object]` is not assignable to `Model | Sequence[Model] | dict[str, Model]`
- src/bokeh/embed/standalone.py:265:28 error[invalid-argument-type] Argument is incorrect: Expected `Sequence[Model]`, found `Model | Sequence[Model] | dict[str, Model]`
+ src/bokeh/embed/standalone.py:265:28 error[invalid-argument-type] Argument is incorrect: Expected `Sequence[Model]`, found `(Model & ~Top[dict[Unknown, Unknown]]) | (Sequence[Model] & ~Top[dict[Unknown, Unknown]]) | list[Unknown | Model]`

cloud-init (https://github.com/canonical/cloud-init)
- cloudinit/config/cc_ubuntu_pro.py:129:16 error[no-matching-overload] No overload of function `search` matches arguments
- cloudinit/config/cc_ubuntu_pro.py:130:48 error[invalid-argument-type] Argument to function `escape` is incorrect: Argument type `~None` does not satisfy constraints (`str`, `bytes`) of type variable `AnyStr`
- cloudinit/config/cc_ubuntu_pro.py:136:23 error[invalid-argument-type] Argument to function `subp` is incorrect: Expected `str | bytes | list[str] | list[bytes]`, found `list[object] | list[str]`
- cloudinit/config/cc_ubuntu_pro.py:140:27 error[no-matching-overload] No overload of bound method `str.replace` matches arguments

core (https://github.com/home-assistant/core)
- homeassistant/auth/permissions/merge.py:61:43 error[invalid-argument-type] Argument to function `_merge_policies` is incorrect: Expected `list[CategoryType]`, found `list[SubCategoryType | None]`
+ homeassistant/auth/permissions/merge.py:61:43 error[invalid-argument-type] Argument to function `_merge_policies` is incorrect: Expected `list[CategoryType]`, found `list[Mapping[str, ValueType] | bool | None]`
- homeassistant/auth/permissions/util.py:111:12 error[invalid-return-type] Return type does not match returned value: expected `bool`, found `ValueType`
+ homeassistant/auth/permissions/util.py:111:12 error[invalid-return-type] Return type does not match returned value: expected `bool`, found `Mapping[str, bool] | bool | None`
- homeassistant/components/asuswrt/helpers.py:42:16 error[invalid-return-type] Return type does not match returned value: expected `T@translate_to_legacy`, found `dict[Unknown, object]`
+ homeassistant/components/asuswrt/helpers.py:42:16 error[invalid-return-type] Return type does not match returned value: expected `T@translate_to_legacy`, found `dict[Unknown, Unknown]`
- homeassistant/components/asuswrt/helpers.py:42:17 error[no-matching-overload] No overload of bound method `dict.get` matches arguments

cwltool (https://github.com/common-workflow-language/cwltool)
- cwltool/load_tool.py:233:32 error[invalid-key] Unknown key "id" for TypedDict `CWLDirectoryType` (subscripted object has type `(int & Top[MutableMapping[Unknown, Unknown]]) | (str & Top[MutableMapping[Unknown, Unknown]]) | (float & Top[MutableMapping[Unknown, Unknown]]) | ... omitted 5 union elements`)
+ cwltool/load_tool.py:233:32 error[invalid-key] Unknown key "id" for TypedDict `CWLDirectoryType` (subscripted object has type `(int & Top[MutableMapping[Unknown, Unknown]]) | (str & Top[MutableMapping[Unknown, Unknown]]) | (float & Top[MutableMapping[Unknown, Unknown]]) | ... omitted 6 union elements`)
- cwltool/main.py:1344:58 error[invalid-argument-type] Argument to function `remove_at_id` is incorrect: Expected `MutableMapping[str, int | str | float | ... omitted 5 union elements]`, found `Top[MutableMapping[Unknown, Unknown]]`
+ cwltool/main.py:1344:58 error[invalid-argument-type] Argument to function `remove_at_id` is incorrect: Expected `MutableMapping[str, int | str | float | ... omitted 5 union elements]`, found `Top[MutableMapping[Unknown, Unknown]] | TypedDictTop`
+ cwltool/pack.py:97:25 error[unresolved-attribute] Attribute `clear` is not defined on `CWLFileType`, `CWLDirectoryType` in union `(MutableMapping[str, int | str | float | ... omitted 5 union elements] & ~Top[MutableSequence[Unknown]]) | (int & Top[MutableMapping[Unknown, Unknown]] & ~Top[MutableSequence[Unknown]]) | (str & Top[MutableMapping[Unknown, Unknown]] & ~Top[MutableSequence[Unknown]]) | ... omitted 4 union elements`
- cwltool/process.py:1226:30 error[invalid-key] Unknown key "id" for TypedDict `CWLDirectoryType` (subscripted object has type `(CWLFileType & Top[MutableMapping[Unknown, Unknown]]) | (CWLDirectoryType & Top[MutableMapping[Unknown, Unknown]]) | MutableMapping[str, int | str | float | ... omitted 5 union elements] | (Sequence[CWLFileType | CWLDirectoryType | MutableMapping[str, int | str | float | ... omitted 5 union elements]] & Top[MutableMapping[Unknown, Unknown]])`)
+ cwltool/process.py:1226:30 error[invalid-key] Unknown key "id" for TypedDict `CWLDirectoryType` (subscripted object has type `MutableMapping[str, int | str | float | ... omitted 5 union elements] | (Sequence[CWLFileType | CWLDirectoryType | MutableMapping[str, int | str | float | ... omitted 5 union elements]] & Top[MutableMapping[Unknown, Unknown]]) | CWLFileType | CWLDirectoryType`)
- tests/test_examples.py:348:12 error[not-subscriptable] Cannot subscript object of type `None` with no `__getitem__` method
- tests/test_examples.py:348:12 error[not-subscriptable] Cannot subscript object of type `float` with no `__getitem__` method
- tests/test_examples.py:348:12 error[not-subscriptable] Cannot subscript object of type `int` with no `__getitem__` method
- tests/test_examples.py:348:12 error[invalid-argument-type] Method `__getitem__` of type `bound method MutableMapping[str, Divergent].__getitem__(key: str, /) -> Divergent` cannot be called with key of type `Literal[0]` on object of type `MutableMapping[str, Divergent]`
- tests/test_examples.py:348:26 error[invalid-key] TypedDict `CWLDirectoryType` can only be subscripted with a string literal key, got key of type `Literal[0]`
- tests/test_examples.py:348:26 error[invalid-key] TypedDict `CWLFileType` can only be subscripted with a string literal key, got key of type `Literal[0]`
- tests/test_examples.py:349:12 error[not-subscriptable] Cannot subscript object of type `None` with no `__getitem__` method
- tests/test_examples.py:349:12 error[not-subscriptable] Cannot subscript object of type `float` with no `__getitem__` method
- tests/test_examples.py:349:12 error[invalid-argument-type] Method `__getitem__` of type `bound method MutableMapping[str, Divergent].__getitem__(key: str, /) -> Divergent` cannot be called with key of type `Literal[1]` on object of type `MutableMapping[str, Divergent]`
- tests/test_examples.py:349:26 error[invalid-key] TypedDict `CWLFileType` can only be subscripted with a string literal key, got key of type `Literal[1]`
- tests/test_examples.py:350:12 error[not-subscriptable] Cannot subscript object of type `None` with no `__getitem__` method
- tests/test_examples.py:350:26 error[invalid-key] TypedDict `CWLDirectoryType` can only be subscripted with a string literal key, got key of type `Literal[2]`
- tests/test_examples.py:363:12 error[not-subscriptable] Cannot subscript object of type `int` with no `__getitem__` method
- tests/test_examples.py:1720:63 error[not-iterable] Object of type `int | str | float | ... omitted 5 union elements` may not be iterable

dd-trace-py (https://github.com/DataDog/dd-trace-py)
- ddtrace/internal/remoteconfig/__init__.py:35:44 error[invalid-argument-type] Argument expression after ** must be a mapping with `str` key type: Found `object`
- ddtrace/appsec/_asm_request_context.py:241:32 error[invalid-argument-type] Argument to `Block_config.__init__` is incorrect: Expected `int`, found `Any | str | int | None`
- ddtrace/appsec/_asm_request_context.py:241:32 error[invalid-argument-type] Argument to `Block_config.__init__` is incorrect: Expected `int`, found `Any | str | int | None`
- ddtrace/appsec/_asm_request_context.py:241:32 error[invalid-argument-type] Argument to `Block_config.__init__` is incorrect: Expected `str`, found `Any | str | int | None`
- ddtrace/contrib/internal/botocore/services/stepfunctions.py:37:58 error[invalid-argument-type] Argument to function `dispatch` is incorrect: Expected `tuple[Any, ...]`, found `list[ExecutionContext[Unknown] | None | (Any & Top[dict[Unknown, Unknown]])]`
+ ddtrace/contrib/internal/botocore/services/stepfunctions.py:37:58 error[invalid-argument-type] Argument to function `dispatch` is incorrect: Expected `tuple[Any, ...]`, found `list[ExecutionContext[Unknown] | None | (Any & Top[dict[Unknown, Unknown]]) | (Any & TypedDictTop)]`
- ddtrace/contrib/internal/pymongo/utils.py:147:26 error[no-matching-overload] No overload of bound method `dict.get` matches arguments
+ ddtrace/contrib/internal/pymongo/utils.py:152:28 error[invalid-argument-type] Argument to function `len` is incorrect: Expected `Sized`, found `object`
- ddtrace/llmobs/_experiment.py:2176:68 error[invalid-argument-type] Argument to bound method `dict.get` is incorrect: Expected `Never`, found `Literal["message"]`
- ddtrace/llmobs/_experiment.py:2177:97 error[invalid-argument-type] Method `__getitem__` of type `Overload[(index: int, /) -> Divergent, (index: slice[int | None, int | None, int | None], /) -> Sequence[Divergent]]` cannot be called with key of type `Literal["message"]` on object of type `Sequence[Divergent]`
- ddtrace/llmobs/_integrations/bedrock_agents.py:114:31 error[invalid-argument-type] Argument to bound method `dict.get` is incorrect: Expected `Never`, found `Literal["traceId"]`
- scripts/view_trace_snapshot.py:153:38 error[no-matching-overload] No overload of bound method `dict.get` matches arguments

freqtrade (https://github.com/freqtrade/freqtrade)
- freqtrade/util/rich_tables.py:32:21 error[invalid-argument-type] Method `__getitem__` of type `bound method Top[dict[Unknown, Unknown]].__getitem__(key: Never, /) -> object` cannot be called with key of type `str` on object of type `Top[dict[Unknown, Unknown]]`
- freqtrade/util/rich_tables.py:32:47 error[invalid-argument-type] Method `__getitem__` of type `Overload[(index: int, /) -> str | Unknown, (index: slice[int | None, int | None, int | None], /) -> Sequence[str | Unknown]]` cannot be called with key of type `str` on object of type `Sequence[str | Unknown]`
- freqtrade/util/rich_tables.py:32:75 error[invalid-argument-type] Method `__getitem__` of type `Overload[(index: int, /) -> str | Unknown, (index: slice[int | None, int | None, int | None], /) -> Sequence[str | Unknown]]` cannot be called with key of type `str` on object of type `Sequence[str | Unknown]`

graphql-core (https://github.com/graphql-python/graphql-core)
- src/graphql/error/graphql_error.py:213:77 error[invalid-argument-type] Argument to bound method `dict.get` is incorrect: Expected `Never`, found `~Literal["original_error"]`
- src/graphql/execution/types.py:107:32 error[invalid-argument-type] Argument to bound method `dict.get` is incorrect: Expected `Never`, found `Literal["errors"]`
- src/graphql/execution/types.py:108:32 error[invalid-argument-type] Argument to bound method `dict.get` is incorrect: Expected `Never`, found `Literal["extensions"]`
- src/graphql/execution/types.py:295:32 error[invalid-argument-type] Argument to bound method `dict.get` is incorrect: Expected `Never`, found `Literal["pending"]`
- src/graphql/execution/types.py:412:31 error[invalid-argument-type] Argument to bound method `dict.get` is incorrect: Expected `Never`, found `Literal["id"]`
- src/graphql/execution/types.py:413:32 error[invalid-argument-type] Argument to bound method `dict.get` is incorrect: Expected `Never`, found `Literal["subPath"]`
- src/graphql/execution/types.py:415:32 error[invalid-argument-type] Argument to bound method `dict.get` is incorrect: Expected `Never`, found `Literal["extensions"]`
- src/graphql/execution/types.py:521:22 error[no-matching-overload] No overload of bound method `dict.get` matches arguments
- src/graphql/execution/types.py:618:32 error[invalid-argument-type] Argument to bound method `dict.get` is incorrect: Expected `Never`, found `Literal["path"]`
- src/graphql/execution/types.py:669:30 error[invalid-argument-type] Argument to bound method `dict.get` is incorrect: Expected `Never`, found `Literal["id"]`

ibis (https://github.com/ibis-project/ibis)
- ibis/backends/sql/ddl.py:82:54 error[invalid-argument-type] Method `__getitem__` of type `bound method Top[dict[Unknown, Unknown]].__getitem__(key: Never, /) -> object` cannot be called with key of type `str` on object of type `Top[dict[Unknown, Unknown]]`

ignite (https://github.com/pytorch/ignite)
- tests/ignite/test_utils.py:49:28 error[invalid-argument-type] Method `__getitem__` of type `Overload[(index: int, /) -> Unknown, (index: slice[int | None, int | None, int | None], /) -> Sequence[Unknown]]` cannot be called with key of type `Literal["a"]` on object of type `Sequence[Unknown]`

meson (https://github.com/mesonbuild/meson)
- mesonbuild/build.py:447:24 error[invalid-return-type] Return type does not match returned value: expected `_T@copy_value`, found `list[Never] | dict[Never, Never] | set[Never]`
+ mesonbuild/build.py:447:24 error[invalid-return-type] Return type does not match returned value: expected `_T@copy_value`, found `list[Never] | dict[Never, Never] | TypedDictTop | set[Never]`
- mesonbuild/interpreterbase/helpers.py:41:20 error[invalid-return-type] Return type does not match returned value: expected `Sequence[Divergent] | int | dict[str, Divergent] | ... omitted 5 union elements`, found `dict[object, Sequence[Divergent] | int | dict[str, Divergent] | ... omitted 5 union elements]`
- mesonbuild/interpreterbase/helpers.py:41:33 error[invalid-argument-type] Argument to function `resolver` is incorrect: Expected `Sequence[Divergent] | int | dict[str, Divergent] | ... omitted 5 union elements`, found `object`
- mesonbuild/interpreterbase/helpers.py:63:54 error[invalid-argument-type] Argument to function `stringifyUserArguments` is incorrect: Expected `Sequence[Divergent] | int | dict[str, Divergent] | ... omitted 5 union elements`, found `object`
- mesonbuild/interpreterbase/interpreterbase.py:615:13 error[invalid-assignment] Invalid subscript assignment with key of type `object` and value of type `InterpreterObject` on object of type `dict[str, InterpreterObject | None]`
- mesonbuild/interpreterbase/interpreterbase.py:615:41 error[invalid-argument-type] Argument to bound method `InterpreterBase._holderify` is incorrect: Expected `Sequence[Divergent] | int | dict[str, Divergent] | ... omitted 5 union elements`, found `object`
- mesonbuild/modules/sourceset.py:243:29 error[no-matching-overload] No overload of bound method `dict.get` matches arguments
- mesonbuild/modules/sourceset.py:243:50 error[too-many-positional-arguments] Too many positional arguments to bound method `ConfigurationData.get`: expected 2, got 3

mitmproxy (https://github.com/mitmproxy/mitmproxy)
- mitmproxy/http.py:601:21 error[no-matching-overload] No overload of function `always_bytes` matches arguments

mkdocs (https://github.com/mkdocs/mkdocs)
- mkdocs/config/config_options.py:834:12 error[invalid-argument-type] Method `__getitem__` of type `bound method Top[dict[Unknown, Unknown]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["name"]` on object of type `Top[dict[Unknown, Unknown]]`
- mkdocs/config/config_options.py:834:49 error[invalid-argument-type] Method `__getitem__` of type `bound method Top[dict[Unknown, Unknown]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["name"]` on object of type `Top[dict[Unknown, Unknown]]`
- mkdocs/config/config_options.py:836:46 error[invalid-argument-type] Method `__getitem__` of type `bound method Top[dict[Unknown, Unknown]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["name"]` on object of type `Top[dict[Unknown, Unknown]]`
+ mkdocs/config/config_options.py:142:33 error[no-matching-overload] No overload of bound method `MutableMapping.setdefault` matches arguments
+ mkdocs/config/config_options.py:139:56 error[invalid-argument-type] Argument to bound method `TypedDictFallback.setdefault` is incorrect: Expected `Never`, found `str`
- mkdocs/config/config_options.py:846:67 error[invalid-argument-type] Method `__getitem__` of type `bound method Top[dict[Unknown, Unknown]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["custom_dir"]` on object of type `Top[dict[Unknown, Unknown]]`
+ mkdocs/config/config_options.py:846:13 error[invalid-assignment] Cannot assign to a subscript on an object of type `TypedDictTop`
- mkdocs/config/config_options.py:848:63 error[invalid-argument-type] Method `__getitem__` of type `bound method Top[dict[Unknown, Unknown]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["custom_dir"]` on object of type `Top[dict[Unknown, Unknown]]`
- mkdocs/config/config_options.py:858:28 error[invalid-argument-type] Argument expression after ** must be a mapping with `str` key type: Found `object`
+ mkdocs/config/config_options.py:858:28 error[invalid-argument-type] Argument to `Theme.__init__` is incorrect: Expected `Collection[str]`, found `object`
+ mkdocs/config/config_options.py:858:28 error[invalid-argument-type] Argument to `Theme.__init__` is incorrect: Expected `str | None`, found `object`
+ mkdocs/config/config_options.py:858:28 error[invalid-argument-type] Argument to `Theme.__init__` is incorrect: Expected `str | None`, found `object`

mongo-python-driver (https://github.com/mongodb/mongo-python-driver)
+ pymongo/asynchronous/topology.py:859:57 error[invalid-argument-type] Argument to function `_is_stale_error_topology_version` is incorrect: Expected `Mapping[str, Any] | None`, found `object`
- pymongo/synchronous/topology.py:855:46 error[invalid-argument-type] Argument to bound method `dict.get` is incorrect: Expected `Never`, found `Literal["topologyVersion"]`
+ pymongo/synchronous/topology.py:857:57 error[invalid-argument-type] Argument to function `_is_stale_error_topology_version` is incorrect: Expected `Mapping[str, Any] | None`, found `object`

mypy (https://github.com/python/mypy)
- mypy/test/test_diff_cache.py:126:56 error[unresolved-attribute] Object of type `object` has no attribute `startswith`
- mypy/test/test_diff_cache.py:128:42 error[unsupported-operator] Operator `in` is not supported between objects of type `Literal["/a."]` and `object`
- mypy/test/test_diff_cache.py:128:56 error[unresolved-attribute] Object of type `object` has no attribute `startswith`
- mypy/server/astdiff.py:157:78 error[invalid-argument-type] Argument to function `compare_symbol_table_snapshots` is incorrect: Expected `dict[str, tuple[object, ...]]`, found `Top[dict[Unknown, Unknown]]`
+ mypy/server/astdiff.py:157:78 error[invalid-argument-type] Argument to function `compare_symbol_table_snapshots` is incorrect: Expected `dict[str, tuple[object, ...]]`, found `Top[dict[Unknown, Unknown]] | TypedDictTop`

openlibrary (https://github.com/internetarchive/openlibrary)
- openlibrary/core/lists/model.py:410:24 error[unresolved-attribute] Attribute `key` is not defined on `AnnotatedSeed & ~Top[dict[Unknown, Unknown]]` in union `(Thing & ~str & ~Top[dict[Unknown, Unknown]]) | (AnnotatedSeed & ~Top[dict[Unknown, Unknown]])`
- openlibrary/core/lists/model.py:411:13 error[invalid-assignment] Object of type `(Thing & ~str & ~Top[dict[Unknown, Unknown]]) | (AnnotatedSeed & ~Top[dict[Unknown, Unknown]])` is not assignable to attribute `value` of type `Thing | str`
- openlibrary/core/lists/model.py:458:27 error[invalid-argument-type] Argument to `Seed.__init__` is incorrect: Expected `Thing | str | AnnotatedSeed`, found `str | (ThingReferenceDict & ~Top[dict[Unknown, Unknown]]) | (AnnotatedSeedDict & ~Top[dict[Unknown, Unknown]])`
+ openlibrary/core/lists/model.py:450:29 warning[redundant-cast] Value is already of type `ThingReferenceDict`
- openlibrary/plugins/openlibrary/lists.py:125:23 error[invalid-yield] Yield type `dict[str, dict[str, ThingReferenceDict | str | AnnotatedSeedDict]]` does not match annotated yield type `AnnotatedSeedDict`
- openlibrary/plugins/openlibrary/lists.py:125:41 error[invalid-argument-type] Invalid argument to key "key" with declared type `str` on TypedDict `ThingReferenceDict`: value of type `(ThingReferenceDict & ~Top[dict[Unknown, Unknown]]) | str | (AnnotatedSeedDict & ~Top[dict[Unknown, Unknown]])`

packaging (https://github.com/pypa/packaging)
- src/packaging/_parser.py:55:33 error[invalid-argument-type] Method `__getitem__` of type `bound method Top[dict[Unknown, Unknown]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["value"]` on object of type `Top[dict[Unknown, Unknown]]`
- src/packaging/specifiers.py:1485:21 error[no-matching-overload] No overload of bound method `dict.get` matches arguments
- src/packaging/specifiers.py:1486:37 error[invalid-argument-type] Argument to bound method `dict.get` is incorrect: Expected `Never`, found `Literal["_prereleases"]`
- src/packaging/version.py:808:36 error[invalid-argument-type] Argument to bound method `dict.get` is incorrect: Expected `Never`, found `Literal["_version"]`
+ src/packaging/version.py:811:33 error[unresolved-attribute] Object of type `~None` has no attribute `release`
+ src/packaging/version.py:812:29 error[unresolved-attribute] Object of type `~None` has no attribute `pre`
+ src/packaging/version.py:813:30 error[unresolved-attribute] Object of type `~None` has no attribute `post`
- src/packaging/version.py:800:47 error[invalid-argument-type] Argument to bound method `dict.get` is incorrect: Expected `Never`, found `Literal["_pre"]`
+ src/packaging/version.py:801:21 error[invalid-assignment] Object of type `object` is not assignable to attribute `_post` of type `tuple[Literal["post"], int] | None`
- src/packaging/version.py:802:47 error[invalid-argument-type] Argument to bound method `dict.get` is incorrect: Expected `Never`, found `Literal["_dev"]`
- src/packaging/version.py:803:49 error[invalid-argument-type] Argument to bound method `dict.get` is incorrect: Expected `Never`, found `Literal["_local"]`
+ src/packaging/version.py:803:21 error[invalid-assignment] Object of type `object` is not assignable to attribute `_local` of type `tuple[int | str, ...] | None`

pandas (https://github.com/pandas-dev/pandas)
- pandas/core/frame.py:18680:21 error[invalid-argument-type] Argument to function `isin` is incorrect: Expected `ExtensionArray | ndarray[tuple[Any, ...], dtype[Any]] | Index | ... omitted 3 union elements`, found `(Sequence[Unknown] & ~Top[dict[Unknown, Unknown]] & ~Series & ~DataFrame) | (Mapping[Unknown, Unknown] & ~Top[dict[Unknown, Unknown]] & ~Series & ~DataFrame)`
+ pandas/core/frame.py:18680:21 error[invalid-argument-type] Argument to function `isin` is incorrect: Expected `ExtensionArray | ndarray[tuple[Any, ...], dtype[Any]] | Index | ... omitted 3 union elements`, found `(Sequence[Unknown] & ~Top[dict[Unknown, Unknown]] & ~Series & ~DataFrame) | (Mapping[Unknown, Unknown] & ~Top[dict[Unknown, Unknown]] & ~TypedDictTop & ~Series & ~DataFrame)`
- pandas/io/_util.py:166:35 error[invalid-argument-type] Method `__getitem__` of type `bound method Top[dict[Unknown, Unknown]].__getitem__(key: Never, /) -> object` cannot be called with key of type `object` on object of type `Top[dict[Unknown, Unknown]]`
- pandas/io/parsers/arrow_parser_wrapper.py:202:28 error[unresolved-attribute] Attribute `get` is not defined on `dtype[Any]`, `ExtensionDtype` in union `dict[object, dtype[Any] | ExtensionDtype] | dtype[Any] | ExtensionDtype | (Unknown & ~None)`
+ pandas/io/parsers/arrow_parser_wrapper.py:202:28 error[unresolved-attribute] Attribute `get` is not defined on `dtype[Any]`, `ExtensionDtype` in union `dict[Divergent, dtype[Any] | ExtensionDtype] | dtype[Any] | ExtensionDtype | (Unknown & ~None)`
- pandas/io/parsers/arrow_parser_wrapper.py:203:52 error[unresolved-attribute] Attribute `get` is not defined on `dtype[Any]`, `ExtensionDtype` in union `dict[object, dtype[Any] | ExtensionDtype] | dtype[Any] | ExtensionDtype | (Unknown & ~None)`
+ pandas/io/parsers/arrow_parser_wrapper.py:203:52 error[unresolved-attribute] Attribute `get` is not defined on `dtype[Any]`, `ExtensionDtype` in union `dict[Divergent, dtype[Any] | ExtensionDtype] | dtype[Any] | ExtensionDtype | (Unknown & ~None)`

pandera (https://github.com/pandera-dev/pandera)
- pandera/io/_minimal.py:145:34 error[invalid-argument-type] Argument to function `prune_component_dict` is incorrect: Expected `dict[str, Any]`, found `Top[dict[Unknown, Unknown]]`
- pandera/io/_minimal.py:196:38 error[invalid-argument-type] Argument to function `prune_component_dict` is incorrect: Expected `dict[str, Any]`, found `Top[dict[Unknown, Unknown]]`
- pandera/io/_minimal.py:245:49 error[invalid-argument-type] Argument to function `apply_minimal_nested_data_array` is incorrect: Expected `dict[str, Any]`, found `Top[dict[Unknown, Unknown]]`
- pandera/io/_minimal.py:247:38 error[invalid-argument-type] Argument to function `prune_component_dict` is incorrect: Expected `dict[str, Any]`, found `Top[dict[Unknown, Unknown]]`
- pandera/io/_minimal.py:257:38 error[invalid-argument-type] Argument to function `prune_component_dict` is incorrect: Expected `dict[str, Any]`, found `Top[dict[Unknown, Unknown]]`

pip (https://github.com/pypa/pip)
- src/pip/_vendor/packaging/markers.py:417:27 error[invalid-argument-type] Method `__getitem__` of type `bound method Top[dict[Unknown, Unknown]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["_markers"]` on object of type `Top[dict[Unknown, Unknown]]`
- src/pip/_vendor/packaging/requirements.py:106:13 error[no-matching-overload] No overload of bound method `MutableMapping.update` matches arguments
- src/pip/_vendor/packaging/specifiers.py:796:27 error[no-matching-overload] No overload of bound method `dict.get` matches arguments
- src/pip/_vendor/packaging/specifiers.py:1486:21 error[no-matching-overload] No overload of bound method `dict.get` matches arguments
- src/pip/_vendor/packaging/specifiers.py:1487:37 error[invalid-argument-type] Argument to bound method `dict.get` is incorrect: Expected `Never`, found `Literal["_prereleases"]`
+ src/pip/_vendor/packaging/version.py:811:31 error[unresolved-attribute] Object of type `~None` has no attribute `epoch`
+ src/pip/_vendor/packaging/version.py:812:33 error[unresolved-attribute] Object of type `~None` has no attribute `release`
+ src/pip/_vendor/packaging/version.py:813:29 error[unresolved-attribute] Object of type `~None` has no attribute `pre`
+ src/pip/_vendor/packaging/version.py:816:31 error[unresolved-attribute] Object of type `~None` has no attribute `local`
- src/pip/_vendor/packaging/version.py:800:37 error[invalid-argument-type] Method `__getitem__` of type `bound method Top[dict[Unknown, Unknown]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["_release"]` on object of type `Top[dict[Unknown, Unknown]]`
- src/pip/_vendor/packaging/version.py:801:47 error[invalid-argument-type] Argument to bound method `dict.get` is incorrect: Expected `Never`, found `Literal["_pre"]`
+ src/pip/_vendor/packaging/version.py:801:21 error[invalid-assignment] Object of type `object` is not assignable to attribute `_pre` of type `tuple[Literal["a", "b", "rc"], int] | None`
- src/pip/_vendor/packaging/version.py:803:47 error[invalid-argument-type] Argument to bound method `dict.get` is incorrect: Expected `Never`, found `Literal["_dev"]`
+ src/pip/_vendor/packaging/version.py:803:21 error[invalid-assignment] Object of type `object` is not assignable to attribute `_dev` of type `tuple[Literal["dev"], int] | None`
- src/pip/_vendor/urllib3/fields.py:281:24 error[invalid-assignment] Object of type `dict_items[object, object]` is not assignable to `Iterable[tuple[str, str | bytes | None]]`

prefect (https://github.com/PrefectHQ/prefect)
- src/prefect/runner/storage.py:586:17 error[invalid-assignment] Invalid subscript assignment with key of type `Literal["credentials"]` and value of type `dict[str, Unknown | str]` on object of type `dict[str, str | None]`
+ src/prefect/runner/storage.py:586:17 error[invalid-assignment] Invalid subscript assignment with key of type `Literal["credentials"]` and value of type `dict[str, Any | str]` on object of type `dict[str, str | None]`
- src/prefect/utilities/templating/__init__.py:92:47 error[invalid-argument-type] Argument to function `find_placeholders` is incorrect: Argument type `object` does not satisfy constraints (`str`, `int`, `int | float`, `bool`, `dict[Any, Any]`, `list[Any]`, `None`) of type variable `T`
- src/prefect/utilities/templating/__init__.py:378:29 error[no-matching-overload] No overload of bound method `dict.get` matches arguments
- src/prefect/utilities/templating/__init__.py:385:17 error[invalid-argument-type] Argument is incorrect: Argument type `object` does not satisfy constraints (`str`, `int`, `int | float`, `bool`, `dict[Any, Any]`, `list[Any]`, `None`) of type variable `T`
- src/prefect/utilities/templating/__init__.py:387:13 error[invalid-assignment] Invalid subscript assignment with key of type `object` and value of type `Unknown | dict[str, Any]` on object of type `dict[str, Any]`

psycopg (https://github.com/psycopg/psycopg)
- psycopg/psycopg/errors.py:514:38 error[invalid-argument-type] Argument to bound method `dict.get` is incorrect: Expected `Never`, found `DiagnosticField`

pydantic (https://github.com/pydantic/pydantic)
- pydantic/fields.py:1600: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:1600:13 error[invalid-argument-type] Argument is incorrect: Expected `dict[str, Divergent] | ((dict[str, Divergent], /) -> None) | None`, found `dict[str, Divergent] | dict[Never, Never] | TypedDictTop | (((dict[str, Divergent], /) -> None) & ~Top[dict[Unknown, Unknown]] & ~TypedDictTop) | None`
- pydantic/json_schema.py:1688:13 error[no-matching-overload] No overload of bound method `MutableMapping.update` matches arguments

pyproject-metadata (https://github.com/pypa/pyproject-metadata)
- pyproject_metadata/project_table.py:276:16 error[no-matching-overload] No overload of bound method `Pattern.fullmatch` matches arguments
- pyproject_metadata/project_table.py:311:21 error[invalid-argument-type] Method `__getitem__` of type `bound method Top[dict[Unknown, Unknown]].__getitem__(key: Never, /) -> object` cannot be called with key of type `str` on object of type `Top[dict[Unknown, Unknown]]`
- pyproject_metadata/pyproject.py:90:12 error[invalid-return-type] Return type does not match returned value: expected `dict[str, str] | None`, found `Top[dict[Unknown, Unknown]]`
+ pyproject_metadata/pyproject.py:90:12 error[invalid-return-type] Return type does not match returned value: expected `dict[str, str] | None`, found `Top[dict[Unknown, Unknown]] | TypedDictTop`

pywin32 (https://github.com/mhammond/pywin32)
- FAILED old=abnormal exit(2) new=abnormal exit(2)

schema_salad (https://github.com/common-workflow-language/schema_salad)
- src/schema_salad/avro/schema.py:802:34 error[invalid-argument-type] Argument to function `is_subtype` is incorrect: Expected `None | str | int | ... omitted 6 union elements`, found `object`
- src/schema_salad/avro/schema.py:804:44 error[invalid-argument-type] Method `__getitem__` of type `bound method Top[dict[Unknown, Unknown]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["names"]` on object of type `Top[dict[Unknown, Unknown]]`
- src/schema_salad/avro/schema.py:806:33 error[invalid-argument-type] Method `__getitem__` of type `bound method Top[dict[Unknown, Unknown]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["extends"]` on object of type `Top[dict[Unknown, Unknown]]`
- src/schema_salad/avro/schema.py:808:25 error[invalid-argument-type] Argument to bound method `dict.get` is incorrect: Expected `Never`, found `Literal["type"]`
- src/schema_salad/avro/schema.py:808:56 error[invalid-argument-type] Argument to bound method `dict.get` is incorrect: Expected `Never`, found `Literal["type"]`
- src/schema_salad/avro/schema.py:811:38 error[invalid-argument-type] Argument to function `is_subtype` is incorrect: Expected `None | str | int | ... omitted 6 union elements`, found `object`
- src/schema_salad/avro/schema.py:811:58 error[invalid-argument-type] Method `__getitem__` of type `bound method Top[dict[Unknown, Unknown]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["values"]` on object of type `Top[dict[Unknown, Unknown]]`
- src/schema_salad/avro/schema.py:813:38 error[invalid-argument-type] Method `__getitem__` of type `bound method Top[dict[Unknown, Unknown]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["symbols"]` on object of type `Top[dict[Unknown, Unknown]]`
- src/schema_salad/avro/schema.py:813:59 error[invalid-argument-type] Method `__getitem__` of type `bound method Top[dict[Unknown, Unknown]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["symbols"]` on object of type `Top[dict[Unknown, Unknown]]`
- src/schema_salad/avro/schema.py:815:57 error[invalid-argument-type] Method `__getitem__` of type `bound method Top[dict[Unknown, Unknown]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["fields"]` on object of type `Top[dict[Unknown, Unknown]]`

schemathesis (https://github.com/schemathesis/schemathesis)
- src/schemathesis/core/error_feedback/parsers/confluent.py:52:27 error[invalid-argument-type] Argument to bound method `dict.get` is incorrect: Expected `Never`, found `Literal["error_code"]`
- src/schemathesis/core/error_feedback/parsers/confluent.py:57:24 error[invalid-argument-type] Argument to bound method `dict.get` is incorrect: Expected `Never`, found `Literal["message"]`
- src/schemathesis/core/error_feedback/parsers/drf.py:172:59 error[invalid-argument-type] Method `__getitem__` of type `bound method Top[dict[Unknown, Unknown]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["detail"]` on object of type `Top[dict[Unknown, Unknown]]`
- src/schemathesis/core/error_feedback/parsers/rails.py:215:32 error[invalid-argument-type] Argument to bound method `dict.get` is incorrect: Expected `Never`, found `Literal["message"]`
+ src/schemathesis/core/error_feedback/parsers/jackson.py:181:41 error[invalid-argument-type] Argument to function `_carrier_strings` is incorrect: Expected `dict[Unknown, Unknown]`, found `Top[dict[Unknown, Unknown]] | TypedDictTop`
- src/schemathesis/config/_diff_base.py:44:49 error[invalid-argument-type] Method `__getitem__` of type `bound method Top[dict[Unknown, Unknown]].__getitem__(key: Never, /) -> object` cannot be called with key of type `object` on object of type `Top[dict[Unknown, Unknown]]`
- src/schemathesis/config/_diff_base.py:64:33 error[invalid-argument-type] Argument to bound method `dict.get` is incorrect: Expected `Never`, found `object`
- src/schemathesis/core/error_feedback/parsers/ajv.py:187:34 error[invalid-argument-type] Argument to bound method `dict.get` is incorrect: Expected `Never`, found `Literal["keyword"]`
- src/schemathesis/core/error_feedback/parsers/ajv.py:195:26 error[invalid-argument-type] Argument to bound method `dict.get` is incorrect: Expected `Never`, found `Literal["errors"]`
+ src/schemathesis/core/error_feedback/parsers/ajv.py:198:12 error[invalid-return-type] Return type does not match returned value: expected `list[dict[Unknown, Unknown]] | None`, found `Top[list[Unknown]] & ~AlwaysFalsy`
- src/schemathesis/core/error_feedback/parsers/ajv.py:331:48 error[invalid-argument-type] Method `__getitem__` of type `bound method Top[dict[Unknown, Unknown]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["message"]` on object of type `Top[dict[Unknown, Unknown]]`
- src/schemathesis/core/error_feedback/parsers/aspnet.py:162:23 error[invalid-argument-type] Argument to bound method `dict.get` is incorrect: Expected `Never`, found `Literal["errors"]`
+ src/schemathesis/core/error_feedback/parsers/aspnet.py:170:12 error[invalid-return-type] Return type does not match returned value: expected `Mapping[str, Sequence[object]] | None`, found `(Top[dict[Unknown, Unknown]] & ~AlwaysFalsy) | (TypedDictTop & ~AlwaysFalsy)`
- src/schemathesis/core/error_feedback/parsers/go_validator.py:178:24 error[invalid-argument-type] Argument to bound method `dict.get` is incorrect: Expected `Never`, found `Literal["error"]`
- src/schemathesis/core/error_feedback/parsers/laravel.py:133:32 error[invalid-argument-type] Argument to bound method `dict.get` is incorrect: Expected `Never`, found `Literal["message"]`
- src/schemathesis/core/error_feedback/parsers/pydantic.py:147:27 error[invalid-argument-type] Argument to bound method `dict.get` is incorrect: Expected `Never`, found `Literal["detail"]`
- src/schemathesis/core/error_feedback/parsers/pydantic.py:162:27 error[invalid-argument-type] Argument to bound method `dict.get` is incorrect: Expected `Never`, found `Literal["detail"]`
+ src/schemathesis/core/error_feedback/parsers/pydantic.py:181:37 error[invalid-argument-type] Argument is incorrect: Expected `dict[Unknown, Unknown]`, found `Top[dict[Unknown, Unknown]] | TypedDictTop`
+ src/schemathesis/core/error_feedback/parsers/spring.py:268:72 error[invalid-argument-type] Argument to function `SpringParser._extract_top_level_message` is incorrect: Expected `dict[Unknown, Unknown]`, found `Top[dict[Unknown, Unknown]] | TypedDictTop`
+ src/schemathesis/core/error_feedback/parsers/spring.py:269:76 error[invalid-argument-type] Argument to function `SpringParser._extract_unexpected_properties` is incorrect: Expected `dict[Unknown, Unknown]`, found `Top[dict[Unknown, Unknown]] | TypedDictTop`
- src/schemathesis/core/error_feedback/parsers/spring.py:231:32 error[invalid-argument-type] Argument to bound method `dict.get` is incorrect: Expected `Never`, found `Literal["detail"]`
- src/schemathesis/core/error_feedback/parsers/symfony.py:193:59 error[invalid-argument-type] Argument to bound method `dict.get` is incorrect: Expected `Never`, found `Literal["propertyPath"]`
- src/schemathesis/core/error_feedback/parsers/symfony.py:203:31 error[invalid-argument-type] Argument to bound method `dict.get` is incorrect: Expected `Never`, found `Literal["violations"]`
- src/schemathesis/core/error_feedback/parsers/zod.py:46:30 error[invalid-argument-type] Argument to bound method `dict.get` is incorrect: Expected `Never`, found `Literal["issues", "errors"]`
+ src/schemathesis/core/error_feedback/parsers/zod.py:48:20 error[invalid-return-type] Return type does not match returned value: expected `list[dict[Unknown, Unknown]] | None`, found `object`
- src/schemathesis/generation/hypothesis/_response_matching.py:23:70 error[unresolved-attribute] Object of type `object` has no attribute `lower`
- src/schemathesis/openapi/checks.py:151:31 error[invalid-argument-type] Argument to function `unbundle` is incorrect: Expected `dict[str, Any] | bool | list[dict[str, Any] | bool]`, found `dict[Unknown, Unknown] | (Unresolvable & Top[dict[Unknown, Unknown]]) | bool | dict[str, Any] | dict[object, object]`
+ src/schemathesis/openapi/checks.py:151:31 error[invalid-argument-type] Argument to function `unbundle` is incorrect: Expected `dict[str, Any] | bool | list[dict[str, Any] | bool]`, found `dict[Unknown, Unknown] | (Unresolvable & Top[dict[Unknown, Unknown]]) | bool | dict[str, Any] | dict[Unknown | str, Unknown]`
- src/schemathesis/openapi/checks.py:173:13 error[invalid-argument-type] Argument to `JsonSchemaError.__init__` is incorrect: Expected `dict[str, Any] | bool`, found `dict[Unknown, Unknown] | (Unresolvable & Top[dict[Unknown, Unknown]]) | dict[str, Any] | dict[object, object]`
+ src/schemathesis/openapi/checks.py:173:13 error[invalid-argument-type] Argument to `JsonSchemaError.__init__` is incorrect: Expected `dict[str, Any] | bool`, found `dict[Unknown, Unknown] | (Unresolvable & Top[dict[Unknown, Unknown]]) | dict[str, Any] | dict[Unknown | str, Unknown]`
- src/schemathesis/resources/repository.py:279:25 error[invalid-argument-type] Argument to bound method `dict.get` is incorrect: Expected `Never`, found `str`
- src/schemathesis/specs/openapi/adapter/responses.py:418:16 error[invalid-return-type] Return type does not match returned value: expected `str | None`, found `object`
- src/schemathesis/specs/openapi/adapter/responses.py:431:16 error[invalid-return-type] Return type does not match returned value: expected `str | None`, found `object`
- src/schemathesis/specs/openapi/converter.py:233:28 error[invalid-argument-type] Argument to bound method `dict.get` is incorrect: Expected `Never`, found `Literal["$ref"]`

scikit-build-core (https://github.com/scikit-build/scikit-build-core)
- src/scikit_build_core/_vendor/pyproject_metadata/pyproject.py:90:12 error[invalid-return-type] Return type does not match returned value: expected `dict[str, str] | None`, found `Top[dict[Unknown, Unknown]]`
+ src/scikit_build_core/_vendor/pyproject_metadata/pyproject.py:90:12 error[invalid-return-type] Return type does not match returned value: expected `dict[str, str] | None`, found `Top[dict[Unknown, Unknown]] | TypedDictTop`
- src/scikit_build_core/metadata/__init__.py:108:51 error[unresolved-attribute] Object of type `object` has no attribute `items`
- src/scikit_build_core/metadata/__init__.py:89:24 error[invalid-argument-type] Argument is incorrect: Expected `str`, found `object`

scipy (https://github.com/scipy/scipy)
- scipy/_lib/_util.py:1022:13 error[unsupported-operator] Operator `+` is not supported between objects of type `_S@map` and `Unknown | Literal[1]`
- scipy/_lib/_util.py:1022:21 error[invalid-argument-type] Argument to constructor `map.__new__` is incorrect: Expected `(object, /) -> int`, found `def len(obj: Sized, /) -> int`

setuptools (https://github.com/pypa/setuptools)
- setuptools/_distutils/command/build_ext.py:430:38 error[invalid-argument-type] Argument to bound method `dict.get` is incorrect: Expected `Never`, found `Literal["include_dirs", "library_dirs", "libraries", "extra_objects", "extra_compile_args", "extra_link_args"]`
- setuptools/_distutils/command/build_ext.py:418:39 error[invalid-argument-type] Method `__getitem__` of type `bound method Top[dict[Unknown, Unknown]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["sources"]` on object of type `Top[dict[Unknown, Unknown]]`
+ setuptools/_distutils/command/build_ext.py:435:13 error[invalid-assignment] Object of type `object` is not assignable to attribute `runtime_library_dirs` of type `list[str] | list[Unknown]`

sockeye (https://github.com/awslabs/sockeye)
- sockeye/inference.py:410:32 error[invalid-argument-type] Argument is incorrect: Expected `RestrictLexicon | None`, found `object`

spack (https://github.com/spack/spack)
- lib/spack/spack/vendor/jinja2/filters.py:219:50 error[invalid-assignment] Object of type `dict_items[object, object]` is not assignable to `Iterable[tuple[str, Any]]`

streamlit (https://github.com/streamlit/streamlit)
+ lib/streamlit/components/v2/bidi_component/main.py:508:44 warning[unused-ignore-comment] Unused `ty: ignore` directive

sympy (https://github.com/sympy/sympy)
- sympy/ntheory/tests/test_factor_.py:62:13 error[unsupported-operator] Operator `*=` is not supported between objects of type `Literal[1]` and `object`
- sympy/ntheory/tests/test_factor_.py:64:16 error[unsupported-operator] Operator `%` is not supported between objects of type `~AlwaysFalsy & ~Literal[1]` and `Literal[2]`
- sympy/ntheory/tests/test_factor_.py:65:17 error[unsupported-operator] Operator `*=` is not supported between objects of type `Literal[1]` and `object`
- sympy/ntheory/tests/test_factor_.py:66:33 error[unsupported-operator] Operator `//` is not supported between objects of type `~AlwaysFalsy & ~Literal[1]` and `Literal[2]`
+ sympy/series/order.py:306:20 error[unresolved-attribute] Attribute `expr` is not defined on `Expr` in union `Unknown | Expr`

typeshed-stats (https://github.com/AlexWaygood/typeshed-stats)
+ src/typeshed_stats/gather.py:433:12 error[invalid-return-type] Return type does not match returned value: expected `Mapping[str, object]`, found `Top[dict[Unknown, Unknown]] | TypedDictTop`

werkzeug (https://github.com/pallets/werkzeug)
- src/werkzeug/http.py:365:18 error[not-subscriptable] Cannot subscript object of type `object` with no `__getitem__` method
- src/werkzeug/_internal.py:42:12 error[invalid-return-type] Return type does not match returned value: expected `dict[str, Any]`, found `(Any & Top[dict[Unknown, Unknown]]) | dict[str, Any] | (Request & Top[dict[Unknown, Unknown]])`
+ src/werkzeug/_internal.py:42:12 error[invalid-return-type] Return type does not match returned value: expected `dict[str, Any]`, found `(Any & Top[dict[Unknown, Unknown]]) | dict[str, Any] | (Request & Top[dict[Unknown, Unknown]]) | (Any & TypedDictTop)`

xarray (https://github.com/pydata/xarray)
- xarray/core/common.py:1707:17 error[no-matching-overload] No overload of bound method `dict.get` matches arguments
+ xarray/core/common.py:1707:17 error[no-matching-overload] No overload of bound method `Mapping.get` matches arguments
- xarray/core/dataarray.py:474:9 error[invalid-assignment] Object of type `(Sequence[Sequence[Unknown] | Index[Any] | DataArray | Variable | ndarray[tuple[Any, ...], dtype[Any]]] & Top[dict[Unknown, Unknown]]) | (Mapping[Unknown, Unknown] & Top[dict[Unknown, Unknown]]) | dict[Unknown, Variable]` is not assignable to attribute `_coords` of type `dict[Any, Variable]`
+ xarray/core/dataarray.py:474:9 error[invalid-assignment] Object of type `(Sequence[Sequence[Unknown] | Index[Any] | DataArray | Variable | ndarray[tuple[Any, ...], dtype[Any]]] & Top[dict[Unknown, Unknown]]) | (Mapping[Unknown, Unknown] & Top[dict[Unknown, Unknown]]) | (Mapping[Unknown, Unknown] & TypedDictTop) | dict[Unknown, Variable]` is not assignable to attribute `_coords` of type `dict[Any, Variable]`

xarray-dataclasses (https://github.com/astropenguin/xarray-dataclasses)
- xarray_dataclasses/dataarray.py:187:27 error[invalid-argument-type] Method `__getitem__` of type `bound method Top[dict[Unknown, Unknown]].__getitem__(key: Never, /) -> object` cannot be called with key of type `str` on object of type `Top[dict[Unknown, Unknown]]`

zulip (https://github.com/zulip/zulip)
- zerver/lib/push_notifications.py:608:23 error[invalid-argument-type] Method `__getitem__` of type `bound method Top[dict[Unknown, Unknown]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["apple_devices"]` on object of type `Top[dict[Unknown, Unknown]]`
- zerver/lib/push_notifications.py:650:33 error[invalid-argument-type] Method `__getitem__` of type `bound method Top[dict[Unknown, Unknown]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["expected_end_timestamp"]` on object of type `Top[dict[Unknown, Unknown]]`
- zerver/lib/validator.py:264:34 error[invalid-argument-type] Method `__getitem__` of type `bound method Top[dict[Unknown, Unknown]].__getitem__(key: Never, /) -> object` cannot be called with key of type `str` on object of type `Top[dict[Unknown, Unknown]]`
- zerver/lib/validator.py:440:19 error[invalid-argument-type] Method `__getitem__` of type `bound method Top[dict[Unknown, Unknown]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["widget_type"]` on object of type `Top[dict[Unknown, Unknown]]`
- zerver/lib/validator.py:450:12 error[invalid-argument-type] Method `__getitem__` of type `bound method Top[dict[Unknown, Unknown]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["type"]` on object of type `Top[dict[Unknown, Unknown]]`
- zerver/lib/validator.py:500:8 error[invalid-argument-type] Method `__getitem__` of type `bound method Top[dict[Unknown, Unknown]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["type"]` on object of type `Top[dict[Unknown, Unknown]]`
- zerver/lib/validator.py:513:8 error[invalid-argument-type] Method `__getitem__` of type `bound method Top[dict[Unknown, Unknown]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["type"]` on object of type `Top[dict[Unknown, Unknown]]`
- zerver/lib/validator.py:524:58 error[invalid-argument-type] Method `__getitem__` of type `bound method Top[dict[Unknown, Unknown]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["type"]` on object of type `Top[dict[Unknown, Unknown]]`
- zerver/lib/validator.py:532:8 error[invalid-argument-type] Method `__getitem__` of type `bound method Top[dict[Unknown, Unknown]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["type"]` on object of type `Top[dict[Unknown, Unknown]]`
- zerver/lib/validator.py:545:8 error[invalid-argument-type] Method `__getitem__` of type `bound method Top[dict[Unknown, Unknown]].__getitem__(key: Never, /) -> object` cannot be called with key of type `Literal["type"]` on object of type `Top[dict[Unknown, Unknown]]`
- zerver/openapi/openapi.py:50:38 error[invalid-argument-type] Argument to function `naively_merge` is incorrect: Expected `dict[str, object]`, found `Top[dict[Unknown, Unknown]]`
+ zerver/openapi/openapi.py:50:38 error[invalid-argument-type] Argument to function `naively_merge` is incorrect: Expected `dict[str, object]`, found `Top[dict[Unknown, Unknown]] | TypedDictTop`
- zerver/openapi/openapi.py:50:47 error[invalid-argument-type] Argument to function `naively_merge` is incorrect: Expected `dict[str, object]`, found `Top[dict[Unknown, Unknown]]`
+ zerver/openapi/openapi.py:50:47 error[invalid-argument-type] Argument to function `naively_merge` is incorrect: Expected `dict[str, object]`, found `Top[dict[Unknown, Unknown]] | TypedDictTop`
- zerver/openapi/openapi.py:56:41 error[invalid-argument-type] Argument to function `naively_merge_allOf_dict` is incorrect: Expected `dict[str, object]`, found `Top[dict[Unknown, Unknown]]`
+ zerver/openapi/openapi.py:56:41 error[invalid-argument-type] Argument to function `naively_merge_allOf_dict` is incorrect: Expected `dict[str, object]`, found `Top[dict[Unknown, Unknown]] | TypedDictTop`

Full report with detailed diff (timing results)

@charliermarsh charliermarsh force-pushed the charlie/td-narrow branch 6 times, most recently from 6490850 to f2f91f3 Compare March 17, 2026 00:06
@charliermarsh charliermarsh changed the base branch from charlie/td-narrow-split2 to charlie/td-specialize-2 March 27, 2026 01:26
@charliermarsh charliermarsh force-pushed the charlie/td-specialize-2 branch 4 times, most recently from aa5ab5e to 0f94f5a Compare March 30, 2026 00:32
Base automatically changed from charlie/td-specialize-2 to main March 30, 2026 00:50
@charliermarsh charliermarsh force-pushed the charlie/td-narrow branch 2 times, most recently from 14747c4 to ce6654d Compare April 2, 2026 21:21
@charliermarsh charliermarsh marked this pull request as ready for review April 2, 2026 21:34
@astral-sh-bot astral-sh-bot Bot requested a review from AlexWaygood April 2, 2026 21:34

/// Top-materialized `dict`s can project read-only members through `Mapping` so lookups
/// preserve observer signatures without also loosening mutation APIs.
fn dict_top_readonly_projection(
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I would like to avoid this, it feels a bit off...

/// `Mapping` is intentionally excluded: `TypedDict` is already statically compatible with
/// `Mapping[str, object]`, so the extra `TypedDictTop` arm would simplify away during
/// intersection and is not needed.
fn class_literal_matches_typed_dict_runtime_supertype<'db>(
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Also feels a bit off...

@charliermarsh charliermarsh changed the title [ty] Narrow TypedDicts through isinstance(..., dict) [ty] Narrow TypedDicts through isinstance(..., dict) Apr 2, 2026
@charliermarsh charliermarsh force-pushed the charlie/td-narrow branch 2 times, most recently from d3bc10b to e8e8b2b Compare April 7, 2026 19:20
Copy link
Copy Markdown
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.

just a partial review of tests so far, but I need to go and I figured I may as well send you what I have so far!

Comment thread crates/ty_python_semantic/resources/mdtest/narrow/isinstance.md Outdated
Comment thread crates/ty_python_semantic/resources/mdtest/narrow/isinstance.md Outdated
Comment thread crates/ty_python_semantic/resources/mdtest/narrow/isinstance.md Outdated
Comment thread crates/ty_python_semantic/resources/mdtest/narrow/isinstance.md Outdated
Comment thread crates/ty_python_semantic/resources/mdtest/narrow/isinstance.md
@charliermarsh charliermarsh force-pushed the charlie/td-narrow branch 4 times, most recently from 9a152a7 to 78a5cb8 Compare April 10, 2026 18:57
Copy link
Copy Markdown
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.

A couple more nits from skimming. I still haven't properly dug into the changes in narrow.rs yet

if isinstance(value, dict):
pass
else:
reveal_type(value) # revealed: Vulnerability & ~Top[dict[Unknown, Unknown]]
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

shouldn't this be

Suggested change
reveal_type(value) # revealed: Vulnerability & ~Top[dict[Unknown, Unknown]]
reveal_type(value) # revealed: Vulnerability & ~Top[dict[Unknown, Unknown]] & ~TypedDictTop

? the fact that we know it's not an instance of dict at runtime means that we can also exclude all TypedDict types in the else branch here as well as excluding all dict types

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I think Vulnerability is disjoint from TypedDictTop...? Because it's a regular nominal class?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Ah, of course! Thanks

Comment on lines +901 to +903
def narrow_dict_items(value: dict[str, Any] | Iterable[tuple[str, Any]]) -> None:
if isinstance(value, dict):
value.clear()
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

the narrowed type of value in this branch could just as well be a TypedDict instance as a dict instance, so surely we should emit an error on the .clear() call here?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This seems like it would cause a lot of problems in practice though, right...? I feel like this came up in a conversation once before...

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

it might do... it also might not... I'd be curious to see the ecosystem report both ways!

I do think the principled thing to do here would be to be consistent about this, and have the type of value be dict[str, Any] | TypedDictTop in this branch, and therefore disallow the .clear() call. But I am struggling to think right now of any concrete problems that would arise from the way you're currently doing it, so maybe it's okay

I feel like this came up in a conversation once before...

yeah, and I thought the consensus from that was that it might be unpopular with users, but that I was right 😆

Comment thread crates/ty_python_semantic/src/types/narrow.rs Outdated
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.

isinstance(..., dict) and top materialization result in false positive on .get() call Account for TypedDicts in narrowing of isinstance(..., dict)

3 participants