ruff icon indicating copy to clipboard operation
ruff copied to clipboard

[ty] Make special cases for subscript inference exhaustive

Open AlexWaygood opened this issue 1 week ago • 3 comments

Summary

Fixes https://github.com/astral-sh/ty/issues/2015. We weren't recursing into the value of a type alias (or the bounds/constraints of a typevar) when we should have been.

Test Plan

added mdtests

AlexWaygood avatar Dec 17 '25 19:12 AlexWaygood

Diagnostic diff on typing conformance tests

No changes detected when running ty on typing conformance tests ✅

astral-sh-bot[bot] avatar Dec 17 '25 19:12 astral-sh-bot[bot]

mypy_primer results

Changes were detected when running on open source projects
pip (https://github.com/pypa/pip)
- src/pip/_vendor/msgpack/fallback.py:426:13: error[invalid-assignment] Not enough values to unpack: Expected 3
- src/pip/_vendor/msgpack/fallback.py:437:13: error[invalid-assignment] Not enough values to unpack: Expected 3
- src/pip/_vendor/msgpack/fallback.py:445:13: error[invalid-assignment] Too many values to unpack: Expected 2
- src/pip/_vendor/msgpack/fallback.py:453:13: error[invalid-assignment] Not enough values to unpack: Expected 3
- src/pip/_vendor/msgpack/fallback.py:460:13: error[invalid-assignment] Not enough values to unpack: Expected 3
- src/pip/_vendor/msgpack/fallback.py:471:13: error[invalid-assignment] Not enough values to unpack: Expected 3
- src/pip/_vendor/msgpack/fallback.py:478:13: error[invalid-assignment] Not enough values to unpack: Expected 3
- src/pip/_vendor/pygments/lexers/python.py:410:26: error[non-subscriptable] Cannot subscript object of type `Self@analyse_text` with no `__getitem__` method
+ src/pip/_vendor/pygments/lexers/python.py:410:26: error[non-subscriptable] Cannot subscript object of type `PythonLexer` with no `__getitem__` method
- src/pip/_vendor/pygments/lexers/python.py:1198:17: error[non-subscriptable] Cannot subscript object of type `Self@analyse_text` with no `__getitem__` method
+ src/pip/_vendor/pygments/lexers/python.py:1198:17: error[non-subscriptable] Cannot subscript object of type `NumPyLexer` with no `__getitem__` method
- Found 613 diagnostics
+ Found 606 diagnostics

spack (https://github.com/spack/spack)
- lib/spack/spack/solver/asp.py:2650:13: error[invalid-argument-type] Method `__getitem__` of type `bound method dict[GitVersion | StandardVersion, list[Provenance]].__getitem__(key: GitVersion | StandardVersion, /) -> list[Provenance]` cannot be called with key of type `(Unknown & ~None) | ConcreteVersion` on object of type `dict[GitVersion | StandardVersion, list[Provenance]]`
+ lib/spack/spack/solver/asp.py:2650:13: error[invalid-argument-type] Method `__getitem__` of type `bound method dict[GitVersion | StandardVersion, list[Provenance]].__getitem__(key: GitVersion | StandardVersion, /) -> list[Provenance]` cannot be called with key of type `ConcreteVersion` on object of type `dict[GitVersion | StandardVersion, list[Provenance]]`
- lib/spack/spack/solver/asp.py:3363:21: error[invalid-argument-type] Method `__getitem__` of type `bound method dict[GitVersion | StandardVersion, list[Provenance]].__getitem__(key: GitVersion | StandardVersion, /) -> list[Provenance]` cannot be called with key of type `(Unknown & ~AlwaysFalsy) | (ConcreteVersion & ~AlwaysFalsy)` on object of type `dict[GitVersion | StandardVersion, list[Provenance]]`
- Found 4297 diagnostics
+ Found 4296 diagnostics

aiortc (https://github.com/aiortc/aiortc)
- src/aiortc/rtcpeerconnection.py:1237:17: error[invalid-argument-type] Method `__getitem__` of type `Overload[(i: SupportsIndex, /) -> MediaDescription, (s: slice[Any, Any, Any], /) -> list[MediaDescription]]` cannot be called with key of type `int | None` on object of type `list[MediaDescription]`
+ src/aiortc/rtcpeerconnection.py:1237:17: error[invalid-argument-type] Method `__getitem__` of type `Overload[(i: SupportsIndex, /) -> MediaDescription, (s: slice[Any, Any, Any], /) -> list[MediaDescription]]` cannot be called with key of type `None` on object of type `list[MediaDescription]`

scrapy (https://github.com/scrapy/scrapy)
- scrapy/cmdline.py:186:11: error[invalid-argument-type] Method `__getitem__` of type `bound method dict[str, ScrapyCommand].__getitem__(key: str, /) -> ScrapyCommand` cannot be called with key of type `str | None` on object of type `dict[str, ScrapyCommand]`
+ scrapy/cmdline.py:186:11: error[invalid-argument-type] Method `__getitem__` of type `bound method dict[str, ScrapyCommand].__getitem__(key: str, /) -> ScrapyCommand` cannot be called with key of type `None` on object of type `dict[str, ScrapyCommand]`
- tests/test_feedexport.py:1678:20: error[invalid-argument-type] Method `__getitem__` of type `bound method dict[str, Any].__getitem__(key: str, /) -> Any` cannot be called with key of type `Unknown | str | None | bytes | int` on object of type `dict[str, Any]`
+ tests/test_feedexport.py:1678:20: error[invalid-argument-type] Method `__getitem__` of type `bound method dict[str, Any].__getitem__(key: str, /) -> Any` cannot be called with key of type `None` on object of type `dict[str, Any]`
+ tests/test_feedexport.py:1678:20: error[invalid-argument-type] Method `__getitem__` of type `bound method dict[str, Any].__getitem__(key: str, /) -> Any` cannot be called with key of type `bytes` on object of type `dict[str, Any]`
+ tests/test_feedexport.py:1678:20: error[invalid-argument-type] Method `__getitem__` of type `bound method dict[str, Any].__getitem__(key: str, /) -> Any` cannot be called with key of type `int` on object of type `dict[str, Any]`
- tests/test_feedexport.py:1777:20: error[invalid-argument-type] Method `__getitem__` of type `bound method dict[str, Any].__getitem__(key: str, /) -> Any` cannot be called with key of type `Unknown | str | dict[Unknown | str, Unknown | bool]` on object of type `dict[str, Any]`
+ tests/test_feedexport.py:1777:20: error[invalid-argument-type] Method `__getitem__` of type `bound method dict[str, Any].__getitem__(key: str, /) -> Any` cannot be called with key of type `dict[Unknown | str, Unknown | bool]` on object of type `dict[str, Any]`
- Found 1794 diagnostics
+ Found 1796 diagnostics

paasta (https://github.com/yelp/paasta)
- paasta_tools/contrib/bounce_log_latency_parser.py:48:54: error[invalid-argument-type] Method `__getitem__` of type `Overload[(i: SupportsIndex, /) -> Unknown, (s: slice[Any, Any, Any], /) -> list[Unknown]]` cannot be called with key of type `int | float` on object of type `list[Unknown]`
+ paasta_tools/contrib/bounce_log_latency_parser.py:48:54: error[invalid-argument-type] Method `__getitem__` of type `Overload[(i: SupportsIndex, /) -> Unknown, (s: slice[Any, Any, Any], /) -> list[Unknown]]` cannot be called with key of type `float` on object of type `list[Unknown]`
- paasta_tools/contrib/bounce_log_latency_parser.py:49:43: error[invalid-argument-type] Method `__getitem__` of type `Overload[(i: SupportsIndex, /) -> Unknown, (s: slice[Any, Any, Any], /) -> list[Unknown]]` cannot be called with key of type `int | float` on object of type `list[Unknown]`
+ paasta_tools/contrib/bounce_log_latency_parser.py:49:43: error[invalid-argument-type] Method `__getitem__` of type `Overload[(i: SupportsIndex, /) -> Unknown, (s: slice[Any, Any, Any], /) -> list[Unknown]]` cannot be called with key of type `float` on object of type `list[Unknown]`
- paasta_tools/contrib/bounce_log_latency_parser.py:50:43: error[invalid-argument-type] Method `__getitem__` of type `Overload[(i: SupportsIndex, /) -> Unknown, (s: slice[Any, Any, Any], /) -> list[Unknown]]` cannot be called with key of type `int | float` on object of type `list[Unknown]`
+ paasta_tools/contrib/bounce_log_latency_parser.py:50:43: error[invalid-argument-type] Method `__getitem__` of type `Overload[(i: SupportsIndex, /) -> Unknown, (s: slice[Any, Any, Any], /) -> list[Unknown]]` cannot be called with key of type `float` on object of type `list[Unknown]`
- paasta_tools/metrics/metrics_lib.py:91:12: error[invalid-argument-type] Method `__getitem__` of type `bound method dict[str, @Todo].__getitem__(key: str, /) -> @Todo` cannot be called with key of type `str | None` on object of type `dict[str, @Todo]`
+ paasta_tools/metrics/metrics_lib.py:91:12: error[invalid-argument-type] Method `__getitem__` of type `bound method dict[str, @Todo].__getitem__(key: str, /) -> @Todo` cannot be called with key of type `None` on object of type `dict[str, @Todo]`
- paasta_tools/paastaapi/api_client.py:720:21: warning[possibly-missing-attribute] Attribute `append` may be missing on object of type `Unknown | None | dict[Unknown, Unknown] | list[Unknown]`
- paasta_tools/paastaapi/api_client.py:722:21: error[invalid-assignment] Cannot assign to a subscript on an object of type `None`
- paasta_tools/tron_tools.py:194:24: error[non-subscriptable] Cannot subscript object of type `None` with no `__getitem__` method
- Found 1106 diagnostics
+ Found 1103 diagnostics

kopf (https://github.com/nolar/kopf)
+ kopf/_cogs/structs/patches.py:116:41: warning[unused-ignore-comment] Unused blanket `type: ignore` directive
- Found 263 diagnostics
+ Found 264 diagnostics

dulwich (https://github.com/dulwich/dulwich)
- dulwich/bitmap.py:852:23: error[invalid-argument-type] Method `__getitem__` of type `bound method BaseObjectStore.__getitem__(sha1: ObjectID | RawObjectID) -> ShaFile` cannot be called with key of type `Unknown | bytes` on object of type `BaseObjectStore`
+ dulwich/bitmap.py:852:23: error[invalid-argument-type] Method `__getitem__` of type `bound method BaseObjectStore.__getitem__(sha1: ObjectID | RawObjectID) -> ShaFile` cannot be called with key of type `bytes` on object of type `BaseObjectStore`
- dulwich/filter_branch.py:483:46: error[invalid-argument-type] Method `__getitem__` of type `bound method dict[ObjectID, ObjectID].__getitem__(key: ObjectID, /) -> ObjectID` cannot be called with key of type `Unknown | bytes` on object of type `dict[ObjectID, ObjectID]`
+ dulwich/filter_branch.py:483:46: error[invalid-argument-type] Method `__getitem__` of type `bound method dict[ObjectID, ObjectID].__getitem__(key: ObjectID, /) -> ObjectID` cannot be called with key of type `bytes` on object of type `dict[ObjectID, ObjectID]`
- dulwich/object_store.py:252:19: error[invalid-argument-type] Method `__getitem__` of type `bound method ObjectContainer.__getitem__(sha1: ObjectID | RawObjectID) -> ShaFile` cannot be called with key of type `Unknown | bytes` on object of type `ObjectContainer`
+ dulwich/object_store.py:252:19: error[invalid-argument-type] Method `__getitem__` of type `bound method ObjectContainer.__getitem__(sha1: ObjectID | RawObjectID) -> ShaFile` cannot be called with key of type `bytes` on object of type `ObjectContainer`
- dulwich/object_store.py:307:23: error[invalid-argument-type] Method `__getitem__` of type `bound method ObjectContainer.__getitem__(sha1: ObjectID | RawObjectID) -> ShaFile` cannot be called with key of type `Unknown | bytes` on object of type `ObjectContainer`
+ dulwich/object_store.py:307:23: error[invalid-argument-type] Method `__getitem__` of type `bound method ObjectContainer.__getitem__(sha1: ObjectID | RawObjectID) -> ShaFile` cannot be called with key of type `bytes` on object of type `ObjectContainer`
- dulwich/objectspec.py:512:23: error[invalid-argument-type] Method `__getitem__` of type `bound method PackCapableObjectStore.__getitem__(sha1: ObjectID | RawObjectID) -> ShaFile` cannot be called with key of type `Unknown | bytes` on object of type `PackCapableObjectStore`
+ dulwich/objectspec.py:512:23: error[invalid-argument-type] Method `__getitem__` of type `bound method PackCapableObjectStore.__getitem__(sha1: ObjectID | RawObjectID) -> ShaFile` cannot be called with key of type `bytes` on object of type `PackCapableObjectStore`

ignite (https://github.com/pytorch/ignite)
- tests/ignite/distributed/utils/__init__.py:484:24: error[non-subscriptable] Cannot subscript object of type `int` with no `__getitem__` method
- tests/ignite/distributed/utils/__init__.py:484:24: error[non-subscriptable] Cannot subscript object of type `float` with no `__getitem__` method
- tests/ignite/distributed/utils/__init__.py:484:24: warning[possibly-missing-attribute] Attribute `item` may be missing on object of type `Unknown | int | float | str`
- Found 2054 diagnostics
+ Found 2051 diagnostics

sockeye (https://github.com/awslabs/sockeye)
- sockeye/data_io.py:506:28: error[invalid-argument-type] Method `__getitem__` of type `Overload[(i: SupportsIndex, /) -> int | Unknown, (s: slice[Any, Any, Any], /) -> list[int | Unknown]]` cannot be called with key of type `int | None` on object of type `list[int | Unknown]`
+ sockeye/data_io.py:506:28: error[invalid-argument-type] Method `__getitem__` of type `Overload[(i: SupportsIndex, /) -> int | Unknown, (s: slice[Any, Any, Any], /) -> list[int | Unknown]]` cannot be called with key of type `None` on object of type `list[int | Unknown]`
- sockeye/data_io.py:508:17: error[invalid-argument-type] Method `__getitem__` of type `Overload[(i: SupportsIndex, /) -> Unknown, (s: slice[Any, Any, Any], /) -> list[Unknown]]` cannot be called with key of type `int | None` on object of type `list[Unknown]`
+ sockeye/data_io.py:508:17: error[invalid-argument-type] Method `__getitem__` of type `Overload[(i: SupportsIndex, /) -> Unknown, (s: slice[Any, Any, Any], /) -> list[Unknown]]` cannot be called with key of type `None` on object of type `list[Unknown]`
- sockeye/data_io.py:513:21: error[invalid-argument-type] Method `__getitem__` of type `Overload[(i: SupportsIndex, /) -> Unknown, (s: slice[Any, Any, Any], /) -> list[Unknown]]` cannot be called with key of type `int | None` on object of type `list[Unknown]`
+ sockeye/data_io.py:513:21: error[invalid-argument-type] Method `__getitem__` of type `Overload[(i: SupportsIndex, /) -> Unknown, (s: slice[Any, Any, Any], /) -> list[Unknown]]` cannot be called with key of type `None` on object of type `list[Unknown]`
- sockeye/data_io.py:517:21: error[invalid-argument-type] Method `__getitem__` of type `Overload[(i: SupportsIndex, /) -> Unknown, (s: slice[Any, Any, Any], /) -> list[Unknown]]` cannot be called with key of type `int | None` on object of type `list[Unknown]`
+ sockeye/data_io.py:517:21: error[invalid-argument-type] Method `__getitem__` of type `Overload[(i: SupportsIndex, /) -> Unknown, (s: slice[Any, Any, Any], /) -> list[Unknown]]` cannot be called with key of type `None` on object of type `list[Unknown]`
- sockeye/data_io.py:519:17: error[invalid-argument-type] Method `__getitem__` of type `Overload[(i: SupportsIndex, /) -> Unknown, (s: slice[Any, Any, Any], /) -> list[Unknown]]` cannot be called with key of type `int | None` on object of type `list[Unknown]`
+ sockeye/data_io.py:519:17: error[invalid-argument-type] Method `__getitem__` of type `Overload[(i: SupportsIndex, /) -> Unknown, (s: slice[Any, Any, Any], /) -> list[Unknown]]` cannot be called with key of type `None` on object of type `list[Unknown]`
- sockeye/data_io.py:522:13: error[invalid-argument-type] Method `__getitem__` of type `Overload[(i: SupportsIndex, /) -> int | Unknown, (s: slice[Any, Any, Any], /) -> list[int | Unknown]]` cannot be called with key of type `int | None` on object of type `list[int | Unknown]`
+ sockeye/data_io.py:522:13: error[invalid-argument-type] Method `__getitem__` of type `Overload[(i: SupportsIndex, /) -> int | Unknown, (s: slice[Any, Any, Any], /) -> list[int | Unknown]]` cannot be called with key of type `None` on object of type `list[int | Unknown]`

tornado (https://github.com/tornadoweb/tornado)
- tornado/gen.py:255:62: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `None | Awaitable[Unknown] | list[Awaitable[Unknown]] | dict[Any, Awaitable[Unknown]] | Future[Unknown]`, found `_T@next | _T@next | _VT@next`
+ tornado/gen.py:255:62: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `None | Awaitable[Unknown] | list[Awaitable[Unknown]] | dict[Any, Awaitable[Unknown]] | Future[Unknown]`, found `_T@next | _VT@next | _T@next`

cki-lib (https://gitlab.com/cki-project/cki-lib)
- tests/test_misc.py:166:26: error[invalid-argument-type] Method `__getitem__` of type `bound method _Environ[str].__getitem__(key: str) -> str` cannot be called with key of type `None | str` on object of type `_Environ[str]`
+ tests/test_misc.py:166:26: error[invalid-argument-type] Method `__getitem__` of type `bound method _Environ[str].__getitem__(key: str) -> str` cannot be called with key of type `None` on object of type `_Environ[str]`

pandera (https://github.com/pandera-dev/pandera)
- pandera/engines/pandas_engine.py:1271:24: error[invalid-argument-type] Method `__getitem__` of type `bound method dict[str, Any].__getitem__(key: str, /) -> Any` cannot be called with key of type `int | str` on object of type `dict[str, Any]`
+ pandera/engines/pandas_engine.py:1271:24: error[invalid-argument-type] Method `__getitem__` of type `bound method dict[str, Any].__getitem__(key: str, /) -> Any` cannot be called with key of type `int` on object of type `dict[str, Any]`
- pandera/engines/pandas_engine.py:1390:25: error[invalid-argument-type] Method `__getitem__` of type `Overload[(idx: int | signedinteger[_64Bit] | integer[Any] | signedinteger[_8Bit]) -> Unknown, (idx: Index[Any] | Series[Any] | slice[Any, Any, Any] | ndarray[tuple[Any, ...], dtype[integer[Any]]]) -> Series[Unknown], (idx: str | bytes | date | ... omitted 10 union elements) -> Unknown, (idx: Series[builtins.bool] | ndarray[tuple[Any, ...], dtype[numpy.bool[builtins.bool]]] | list[builtins.bool] | ... omitted 7 union elements) -> Series[Unknown]]` cannot be called with key of type `Series[bool] | DataFrame` on object of type `Series[Unknown]`
+ pandera/engines/pandas_engine.py:1390:25: error[invalid-argument-type] Method `__getitem__` of type `Overload[(idx: int | signedinteger[_64Bit] | integer[Any] | signedinteger[_8Bit]) -> Unknown, (idx: Index[Any] | Series[Any] | slice[Any, Any, Any] | ndarray[tuple[Any, ...], dtype[integer[Any]]]) -> Series[Unknown], (idx: str | bytes | date | ... omitted 10 union elements) -> Unknown, (idx: Series[builtins.bool] | ndarray[tuple[Any, ...], dtype[numpy.bool[builtins.bool]]] | list[builtins.bool] | ... omitted 7 union elements) -> Series[Unknown]]` cannot be called with key of type `DataFrame` on object of type `Series[Unknown]`

freqtrade (https://github.com/freqtrade/freqtrade)
- freqtrade/optimize/analysis/lookahead.py:84:30: error[invalid-argument-type] Method `__getitem__` of type `Overload[(idx: int | signedinteger[_64Bit] | integer[Any] | signedinteger[_8Bit]) -> Any, (key: Index[Any] | Series[Any] | slice[Any, Any, Any] | ndarray[tuple[Any, ...], dtype[integer[Any]]]) -> Series[Any]]` cannot be called with key of type `int | slice[Any, Any, Any] | ndarray[tuple[int], dtype[numpy.bool[builtins.bool]]]` on object of type `_iLocIndexerSeries[Any]`
+ freqtrade/optimize/analysis/lookahead.py:84:30: error[invalid-argument-type] Method `__getitem__` of type `Overload[(idx: int | signedinteger[_64Bit] | integer[Any] | signedinteger[_8Bit]) -> Any, (key: Index[Any] | Series[Any] | slice[Any, Any, Any] | ndarray[tuple[Any, ...], dtype[integer[Any]]]) -> Series[Any]]` cannot be called with key of type `ndarray[tuple[int], dtype[numpy.bool[builtins.bool]]]` on object of type `_iLocIndexerSeries[Any]`
- freqtrade/optimize/analysis/recursive.py:51:25: error[invalid-argument-type] Method `__getitem__` of type `bound method dict[str, DataFrame].__getitem__(key: str, /) -> DataFrame` cannot be called with key of type `str | None` on object of type `dict[str, DataFrame]`
+ freqtrade/optimize/analysis/recursive.py:51:25: error[invalid-argument-type] Method `__getitem__` of type `bound method dict[str, DataFrame].__getitem__(key: str, /) -> DataFrame` cannot be called with key of type `None` on object of type `dict[str, DataFrame]`
- freqtrade/optimize/analysis/recursive.py:54:29: error[invalid-argument-type] Method `__getitem__` of type `bound method dict[str, DataFrame].__getitem__(key: str, /) -> DataFrame` cannot be called with key of type `str | None` on object of type `dict[str, DataFrame]`
+ freqtrade/optimize/analysis/recursive.py:54:29: error[invalid-argument-type] Method `__getitem__` of type `bound method dict[str, DataFrame].__getitem__(key: str, /) -> DataFrame` cannot be called with key of type `None` on object of type `dict[str, DataFrame]`
- freqtrade/optimize/analysis/recursive.py:96:25: error[invalid-argument-type] Method `__getitem__` of type `bound method dict[str, DataFrame].__getitem__(key: str, /) -> DataFrame` cannot be called with key of type `str | None` on object of type `dict[str, DataFrame]`
+ freqtrade/optimize/analysis/recursive.py:96:25: error[invalid-argument-type] Method `__getitem__` of type `bound method dict[str, DataFrame].__getitem__(key: str, /) -> DataFrame` cannot be called with key of type `None` on object of type `dict[str, DataFrame]`
- freqtrade/optimize/analysis/recursive.py:98:24: error[invalid-argument-type] Method `__getitem__` of type `bound method dict[str, DataFrame].__getitem__(key: str, /) -> DataFrame` cannot be called with key of type `str | None` on object of type `dict[str, DataFrame]`
+ freqtrade/optimize/analysis/recursive.py:98:24: error[invalid-argument-type] Method `__getitem__` of type `bound method dict[str, DataFrame].__getitem__(key: str, /) -> DataFrame` cannot be called with key of type `None` on object of type `dict[str, DataFrame]`
- freqtrade/optimize/analysis/recursive.py:99:26: error[invalid-argument-type] Method `__getitem__` of type `bound method dict[str, DataFrame].__getitem__(key: str, /) -> DataFrame` cannot be called with key of type `str | None` on object of type `dict[str, DataFrame]`
+ freqtrade/optimize/analysis/recursive.py:99:26: error[invalid-argument-type] Method `__getitem__` of type `bound method dict[str, DataFrame].__getitem__(key: str, /) -> DataFrame` cannot be called with key of type `None` on object of type `dict[str, DataFrame]`

Tanjun (https://github.com/FasterSpeeding/Tanjun)
- tanjun/annotations.py:2520:30: error[invalid-argument-type] Argument is incorrect: Expected `<special-form 'typing.Self'>`, found `Self@add_to_slash_cmds`
- tanjun/clients.py:2668:17: error[invalid-argument-type] Method `__getitem__` of type `bound method dict[str, ModuleType].__getitem__(key: str, /) -> ModuleType` cannot be called with key of type `str | Path` on object of type `dict[str, ModuleType]`
+ tanjun/clients.py:2668:17: error[invalid-argument-type] Method `__getitem__` of type `bound method dict[str, ModuleType].__getitem__(key: str, /) -> ModuleType` cannot be called with key of type `Path` on object of type `dict[str, ModuleType]`
- tanjun/clients.py:2668:17: error[invalid-argument-type] Method `__getitem__` of type `bound method dict[Path, ModuleType].__getitem__(key: Path, /) -> ModuleType` cannot be called with key of type `str | Path` on object of type `dict[Path, ModuleType]`
+ tanjun/clients.py:2668:17: error[invalid-argument-type] Method `__getitem__` of type `bound method dict[Path, ModuleType].__getitem__(key: Path, /) -> ModuleType` cannot be called with key of type `str` on object of type `dict[Path, ModuleType]`
- Found 150 diagnostics
+ Found 149 diagnostics

sphinx (https://github.com/sphinx-doc/sphinx)
- sphinx/environment/collectors/toctree.py:170:41: error[unresolved-attribute] Object of type `Node` has no attribute `append`
- Found 340 diagnostics
+ Found 339 diagnostics

meson (https://github.com/mesonbuild/meson)
+ mesonbuild/build.py:1108:41: error[invalid-argument-type] Method `__getitem__` of type `bound method dict[str, Compiler].__getitem__(key: str, /) -> Compiler` cannot be called with key of type `int` on object of type `dict[str, Compiler]`
- mesonbuild/build.py:1108:41: error[invalid-argument-type] Method `__getitem__` of type `bound method dict[str, Compiler].__getitem__(key: str, /) -> Compiler` cannot be called with key of type `str | Unknown | int | list[str]` on object of type `dict[str, Compiler]`
+ mesonbuild/build.py:1108:41: error[invalid-argument-type] Method `__getitem__` of type `bound method dict[str, Compiler].__getitem__(key: str, /) -> Compiler` cannot be called with key of type `list[str]` on object of type `dict[str, Compiler]`
- mesonbuild/build.py:1346:27: error[invalid-key] TypedDict `StaticLibraryKeywordArguments` can only be subscripted with a string literal key, got key of type `Literal["pic", "pie"]`
- mesonbuild/build.py:1346:27: error[invalid-key] TypedDict `ExecutableKeywordArguments` can only be subscripted with a string literal key, got key of type `Literal["pic", "pie"]`
+ mesonbuild/build.py:1346:27: error[invalid-key] Unknown key "pie" for TypedDict `StaticLibraryKeywordArguments` - did you mean "pic"?
+ mesonbuild/build.py:1346:27: error[invalid-key] Unknown key "pic" for TypedDict `ExecutableKeywordArguments` - did you mean "pie"?
- mesonbuild/cargo/interpreter.py:453:18: error[invalid-argument-type] Method `__getitem__` of type `bound method dict[str, WorkspaceState].__getitem__(key: str, /) -> WorkspaceState` cannot be called with key of type `str | None` on object of type `dict[str, WorkspaceState]`
+ mesonbuild/cargo/interpreter.py:453:18: error[invalid-argument-type] Method `__getitem__` of type `bound method dict[str, WorkspaceState].__getitem__(key: str, /) -> WorkspaceState` cannot be called with key of type `None` on object of type `dict[str, WorkspaceState]`
- mesonbuild/interpreter/interpreter.py:2639:36: error[invalid-key] TypedDict `ConfigureFile` can only be subscripted with a string literal key, got key of type `Unknown | str`
+ mesonbuild/interpreter/interpreter.py:2639:36: error[invalid-key] TypedDict `ConfigureFile` can only be subscripted with a string literal key, got key of type `str`
- mesonbuild/interpreter/interpreter.py:3603:20: error[invalid-return-type] Return type does not match returned value: expected `Sequence[Divergent] | int | dict[str, Divergent] | ... omitted 5 union elements`, found `InterpreterObject`

mongo-python-driver (https://github.com/mongodb/mongo-python-driver)
- bson/json_util.py:1015:9: error[invalid-assignment] Invalid subscript assignment with key of type `object` and value of type `(Any, JSONOptions, /) -> Any` on object of type `dict[int, (Any, JSONOptions, /) -> Any]`
+ bson/json_util.py:1015:9: error[invalid-assignment] Invalid subscript assignment with key of type `object` and value of type `@Todo` on object of type `dict[int, (Any, JSONOptions, /) -> Any]`

apprise (https://github.com/caronc/apprise)
+ apprise/plugins/twist.py:534:32: error[non-subscriptable] Cannot subscript object of type `set[Unknown]` with no `__getitem__` method
- Found 2647 diagnostics
+ Found 2648 diagnostics

prefect (https://github.com/PrefectHQ/prefect)
- src/integrations/prefect-dbt/prefect_dbt/cli/configs/base.py:211:19: error[invalid-argument-type] Method `__getitem__` of type `bound method dict[str, Any].__getitem__(key: str, /) -> Any` cannot be called with key of type `str | None | (@Todo & ~Literal["config"])` on object of type `dict[str, Any]`
+ src/integrations/prefect-dbt/prefect_dbt/cli/configs/base.py:211:19: error[invalid-argument-type] Method `__getitem__` of type `bound method dict[str, Any].__getitem__(key: str, /) -> Any` cannot be called with key of type `None` on object of type `dict[str, Any]`

cwltool (https://github.com/common-workflow-language/cwltool)
- cwltool/main.py:1331:50: error[invalid-argument-type] Argument to function `remove_at_id` is incorrect: Expected `MutableMapping[str, None | int | str | ... omitted 3 union elements]`, found `(int & Top[MutableMapping[Unknown, Unknown]]) | (str & Top[MutableMapping[Unknown, Unknown]]) | (float & Top[MutableMapping[Unknown, Unknown]]) | (MutableSequence[Divergent] & Top[MutableMapping[Unknown, Unknown]]) | MutableMapping[str, Divergent]`
- cwltool/main.py:1335: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]]`
- Found 239 diagnostics
+ Found 237 diagnostics

cloud-init (https://github.com/canonical/cloud-init)
- cloudinit/cmd/main.py:109:25: error[non-subscriptable] Cannot subscript object of type `Iterable[Any]` with no `__getitem__` method
- cloudinit/cmd/main.py:109:25: error[non-subscriptable] Cannot subscript object of type `None` with no `__getitem__` method
- cloudinit/config/cc_growpart.py:214:12: error[invalid-return-type] Return type does not match returned value: expected `Resizer`, found `None | (ResizeGrowPart & ~AlwaysFalsy) | (ResizeGrowFS & ~AlwaysFalsy) | (ResizeGpart & ~AlwaysFalsy) | (Unknown & ~AlwaysFalsy)`
+ cloudinit/config/cc_growpart.py:214:12: error[invalid-return-type] Return type does not match returned value: expected `Resizer`, found `None | (ResizeGrowPart & ~AlwaysFalsy) | (ResizeGrowFS & ~AlwaysFalsy) | (ResizeGpart & ~AlwaysFalsy) | (@Todo & ~AlwaysFalsy)`
- tests/unittests/test_ds_identify.py:983:9: error[invalid-assignment] Cannot assign to a subscript on an object of type `str`
- Found 1183 diagnostics
+ Found 1180 diagnostics

xarray (https://github.com/pydata/xarray)
- xarray/core/dataarray.py:5737:16: error[invalid-return-type] Return type does not match returned value: expected `T_Xarray@map_blocks`, found `T_Xarray@map_blocks | DataArray | Dataset`
+ xarray/core/dataarray.py:5737:16: error[invalid-return-type] Return type does not match returned value: expected `T_Xarray@map_blocks`, found `DataArray | Dataset`
- xarray/core/dataset.py:8866:16: error[invalid-return-type] Return type does not match returned value: expected `T_Xarray@map_blocks`, found `T_Xarray@map_blocks | DataArray | Dataset`
+ xarray/core/dataset.py:8866:16: error[invalid-return-type] Return type does not match returned value: expected `T_Xarray@map_blocks`, found `DataArray | Dataset`

manticore (https://github.com/trailofbits/manticore)
- manticore/native/state.py:136:17: error[invalid-argument-type] Method `__getitem__` of type `bound method dict[int | None, set[(StateBase, /) -> None]].__getitem__(key: int | None, /) -> set[(StateBase, /) -> None]` cannot be called with key of type `int | str | None | (Any & ~str)` on object of type `dict[int | None, set[(StateBase, /) -> None]]`
+ manticore/native/state.py:136:17: error[invalid-argument-type] Method `__getitem__` of type `bound method dict[int | None, set[(StateBase, /) -> None]].__getitem__(key: int | None, /) -> set[(StateBase, /) -> None]` cannot be called with key of type `str` on object of type `dict[int | None, set[(StateBase, /) -> None]]`
- manticore/platforms/decree.py:158:31: error[invalid-argument-type] Method `__getitem__` of type `Overload[(i: SupportsIndex, /) -> Unknown, (s: slice[Any, Any, Any], /) -> list[Unknown]]` cannot be called with key of type `Unknown | int | None` on object of type `list[Unknown]`
+ manticore/platforms/decree.py:158:31: error[invalid-argument-type] Method `__getitem__` of type `Overload[(i: SupportsIndex, /) -> Unknown, (s: slice[Any, Any, Any], /) -> list[Unknown]]` cannot be called with key of type `None` on object of type `list[Unknown]`
- manticore/platforms/decree.py:168:16: error[invalid-argument-type] Method `__getitem__` of type `Overload[(i: SupportsIndex, /) -> Unknown, (s: slice[Any, Any, Any], /) -> list[Unknown]]` cannot be called with key of type `Unknown | int | None` on object of type `list[Unknown]`
+ manticore/platforms/decree.py:168:16: error[invalid-argument-type] Method `__getitem__` of type `Overload[(i: SupportsIndex, /) -> Unknown, (s: slice[Any, Any, Any], /) -> list[Unknown]]` cannot be called with key of type `None` on object of type `list[Unknown]`
- manticore/platforms/linux.py:1021:32: error[invalid-argument-type] Method `__getitem__` of type `Overload[(i: SupportsIndex, /) -> Cpu, (s: slice[Any, Any, Any], /) -> list[Cpu]]` cannot be called with key of type `int | None` on object of type `list[Cpu]`
+ manticore/platforms/linux.py:1021:32: error[invalid-argument-type] Method `__getitem__` of type `Overload[(i: SupportsIndex, /) -> Cpu, (s: slice[Any, Any, Any], /) -> list[Cpu]]` cannot be called with key of type `None` on object of type `list[Cpu]`

openlibrary (https://github.com/internetarchive/openlibrary)
+ openlibrary/catalog/marc/tests/test_marc.py:73:16: error[non-subscriptable] Cannot subscript object of type `None` with no `__getitem__` method
+ openlibrary/core/observations.py:585:21: error[invalid-argument-type] Method `__getitem__` of type `Overload[(i: SupportsIndex, /) -> Unknown, (s: slice[Any, Any, Any], /) -> list[Unknown]]` cannot be called with key of type `str` on object of type `list[Unknown]`
+ openlibrary/core/observations.py:585:21: error[invalid-argument-type] Method `__getitem__` of type `Overload[(i: SupportsIndex, /) -> Unknown, (s: slice[Any, Any, Any], /) -> list[Unknown]]` cannot be called with key of type `list[Unknown | int]` on object of type `list[Unknown]`
- openlibrary/core/observations.py:585:21: error[invalid-argument-type] Method `__getitem__` of type `Overload[(i: SupportsIndex, /) -> Unknown, (s: slice[Any, Any, Any], /) -> list[Unknown]]` cannot be called with key of type `Unknown | int | str | list[Unknown | int] | list[Unknown | dict[Unknown | str, Unknown | int | str]]` on object of type `list[Unknown]`
+ openlibrary/core/observations.py:585:21: error[invalid-argument-type] Method `__getitem__` of type `Overload[(i: SupportsIndex, /) -> Unknown, (s: slice[Any, Any, Any], /) -> list[Unknown]]` cannot be called with key of type `list[Unknown | dict[Unknown | str, Unknown | int | str]]` on object of type `list[Unknown]`
- openlibrary/plugins/importapi/import_opds.py:64:30: error[call-non-callable] Object of type `str` is not callable
- openlibrary/plugins/importapi/import_rdf.py:82:30: error[call-non-callable] Object of type `str` is not callable
- Found 1152 diagnostics
+ Found 1153 diagnostics

strawberry (https://github.com/strawberry-graphql/strawberry)
+ strawberry/codegen/query_codegen.py:544:84: warning[unused-ignore-comment] Unused blanket `type: ignore` directive
- Found 393 diagnostics
+ Found 394 diagnostics

setuptools (https://github.com/pypa/setuptools)
- setuptools/_distutils/util.py:154:43: error[invalid-argument-type] Method `__getitem__` of type `(Overload[(key: SupportsIndex | slice[Any, Any, Any], /) -> LiteralString, (key: SupportsIndex | slice[Any, Any, Any], /) -> str]) | (Overload[(key: SupportsIndex, /) -> int, (key: slice[Any, Any, Any], /) -> bytes])` cannot be called with key of type `slice[Literal[1], None, None]` on object of type `AnyStr@change_root`
- setuptools/_vendor/backports/tarfile/__init__.py:1573:29: warning[possibly-missing-attribute] Attribute `rstrip` may be missing on object of type `Unknown | float | int`
+ setuptools/_vendor/backports/tarfile/__init__.py:1573:29: warning[possibly-missing-attribute] Attribute `rstrip` may be missing on object of type `Unknown | Literal[0]`
- Found 1275 diagnostics
+ Found 1274 diagnostics

pycryptodome (https://github.com/Legrandin/pycryptodome)
- lib/Crypto/SelfTest/Protocol/test_KDF.py:332:35: error[invalid-argument-type] Argument to function `HKDF` is incorrect: Expected `int`, found `Unknown | ModuleType | str | int | None`
+ lib/Crypto/SelfTest/Protocol/test_KDF.py:332:35: error[invalid-argument-type] Argument to function `HKDF` is incorrect: Expected `int`, found `Unknown | int | ModuleType`
- lib/Crypto/SelfTest/Protocol/test_KDF.py:332:50: error[invalid-argument-type] Argument to function `HKDF` is incorrect: Expected `ModuleType`, found `Unknown | ModuleType | str | int | None`
+ lib/Crypto/SelfTest/Protocol/test_KDF.py:332:50: error[invalid-argument-type] Argument to function `HKDF` is incorrect: Expected `ModuleType`, found `Unknown | int | ModuleType`

pywin32 (https://github.com/mhammond/pywin32)
- com/win32com/client/__init__.py:515:49: error[unresolved-attribute] Object of type `com_record` has no attribute `__name__`
+ com/win32comext/axdebug/codecontainer.py:94:14: error[non-subscriptable] Cannot subscript object of type `None` with no `__getitem__` method
- com/win32comext/shell/demos/servers/shell_view.py:674:28: error[non-subscriptable] Cannot subscript object of type `None` with no `__getitem__` method
- com/win32comext/shell/demos/servers/shell_view.py:743:26: error[non-subscriptable] Cannot subscript object of type `None` with no `__getitem__` method
- Found 2714 diagnostics
+ Found 2712 diagnostics

dd-trace-py (https://github.com/DataDog/dd-trace-py)
- ddtrace/contrib/internal/ray/span_manager.py:217:13: error[invalid-argument-type] Method `__getitem__` of type `bound method dict[str, dict[tuple[int, int], Span]].__getitem__(key: str, /) -> dict[tuple[int, int], Span]` cannot be called with key of type `str | None` on object of type `dict[str, dict[tuple[int, int], Span]]`
+ ddtrace/contrib/internal/ray/span_manager.py:217:13: error[invalid-argument-type] Method `__getitem__` of type `bound method dict[str, dict[tuple[int, int], Span]].__getitem__(key: str, /) -> dict[tuple[int, int], Span]` cannot be called with key of type `None` on object of type `dict[str, dict[tuple[int, int], Span]]`
+ ddtrace/vendor/ply/lex.py:314:16: error[non-subscriptable] Cannot subscript object of type `None` with no `__getitem__` method
+ ddtrace/vendor/ply/lex.py:368:20: error[non-subscriptable] Cannot subscript object of type `None` with no `__getitem__` method
+ ddtrace/vendor/ply/lex.py:370:33: error[non-subscriptable] Cannot subscript object of type `None` with no `__getitem__` method
+ ddtrace/vendor/ply/lex.py:389:84: error[non-subscriptable] Cannot subscript object of type `None` with no `__getitem__` method
+ ddtrace/vendor/ply/lex.py:396:72: error[non-subscriptable] Cannot subscript object of type `None` with no `__getitem__` method
- ddtrace/vendor/ply/yacc.py:245:20: error[non-subscriptable] Cannot subscript object of type `None` with no `__getitem__` method
- ddtrace/vendor/psutil/_common.py:869:17: error[invalid-argument-type] Method `__getitem__` of type `bound method dict[str, str].__getitem__(key: str, /) -> str` cannot be called with key of type `Unknown | None` on object of type `dict[str, str]`
+ ddtrace/vendor/psutil/_common.py:869:17: error[invalid-argument-type] Method `__getitem__` of type `bound method dict[str, str].__getitem__(key: str, /) -> str` cannot be called with key of type `None` on object of type `dict[str, str]`
- ddtrace/vendor/psutil/_common.py:895:21: error[invalid-argument-type] Method `__getitem__` of type `bound method dict[str, int].__getitem__(key: str, /) -> int` cannot be called with key of type `Unknown | None` on object of type `dict[str, int]`
+ ddtrace/vendor/psutil/_common.py:895:21: error[invalid-argument-type] Method `__getitem__` of type `bound method dict[str, int].__getitem__(key: str, /) -> int` cannot be called with key of type `None` on object of type `dict[str, int]`
- Found 8317 diagnostics
+ Found 8321 diagnostics

bokeh (https://github.com/bokeh/bokeh)
+ src/bokeh/models/sources.py:613:26: error[non-subscriptable] Cannot subscript object of type `Property[Any]` with no `__getitem__` method
- Found 895 diagnostics
+ Found 896 diagnostics

ibis (https://github.com/ibis-project/ibis)
- ibis/backends/mysql/datatypes.py:72:23: error[invalid-argument-type] Argument to function `issubclass` is incorrect: Expected `type`, found `Unknown | <class 'Decimal'> | <class 'Int8'> | ... omitted 14 union elements`
- Found 4574 diagnostics
+ Found 4573 diagnostics

scikit-learn (https://github.com/scikit-learn/scikit-learn)
- sklearn/compose/_column_transformer.py:1236:37: error[non-subscriptable] Cannot subscript object of type `object` with no `__getitem__` method
- sklearn/metrics/tests/test_classification.py:174:42: warning[possibly-missing-attribute] Attribute `keys` may be missing on object of type `Unknown | dict[Unknown | str, Unknown | float | int] | float`
- sklearn/metrics/tests/test_classification.py:175:27: error[not-iterable] Object of type `Unknown | dict[Unknown | str, Unknown | float | int] | float` may not be iterable
- sklearn/metrics/tests/test_classification.py:176:37: error[non-subscriptable] Cannot subscript object of type `float` with no `__getitem__` method
+ sklearn/model_selection/tests/test_classification_threshold.py:393:20: error[non-subscriptable] Cannot subscript object of type `None` with no `__getitem__` method
- sklearn/preprocessing/_encoders.py:1574:44: error[non-subscriptable] Cannot subscript object of type `object` with no `__getitem__` method
- Found 2431 diagnostics
+ Found 2427 diagnostics

pandas (https://github.com/pandas-dev/pandas)
+ pandas/core/arrays/_mixins.py:374:16: error[invalid-return-type] Return type does not match returned value: expected `Self@fillna`, found `NDArrayBackedExtensionArray`
+ pandas/core/arrays/arrow/array.py:1940:70: warning[unused-ignore-comment] Unused blanket `type: ignore` directive
+ pandas/core/arrays/base.py:1167:24: error[invalid-return-type] Return type does not match returned value: expected `Self@_pad_or_backfill`, found `ExtensionArray`
+ pandas/core/arrays/base.py:1248:16: error[invalid-return-type] Return type does not match returned value: expected `Self@fillna`, found `ExtensionArray`
+ pandas/core/arrays/base.py:2046:16: error[invalid-return-type] Return type does not match returned value: expected `Self@transpose`, found `ExtensionArray`
+ pandas/core/arrays/masked.py:328:16: error[invalid-return-type] Return type does not match returned value: expected `Self@fillna`, found `BaseMaskedArray`
- pandas/core/arrays/sparse/array.py:951:17: error[invalid-argument-type] Method `__getitem__` of type `Overload[(key: ndarray[tuple[Any, ...], dtype[integer[Any] | numpy.bool[builtins.bool]]] | tuple[ndarray[tuple[Any, ...], dtype[integer[Any] | numpy.bool[builtins.bool]]], ...], /) -> ndarray[tuple[Any, ...], dtype[signedinteger[_64Bit]]], (key: SupportsIndex | tuple[SupportsIndex, ...], /) -> Any, (key: SupportsIndex | slice[Any, Any, Any] | EllipsisType | ... omitted 5 union elements, /) -> ndarray[tuple[Any, ...], dtype[signedinteger[_64Bit]]], (key: str, /) -> ndarray[tuple[Any, ...], dtype[Any]], (key: list[str], /) -> ndarray[tuple[Any, ...], dtype[void]]]` cannot be called with key of type `Unknown | ExtensionArray | ndarray[tuple[Any, ...], dtype[Any]]` on object of type `ndarray[tuple[Any, ...], dtype[signedinteger[_64Bit]]]`
+ pandas/core/arrays/sparse/array.py:951:17: error[invalid-argument-type] Method `__getitem__` of type `Overload[(key: ndarray[tuple[Any, ...], dtype[integer[Any] | numpy.bool[builtins.bool]]] | tuple[ndarray[tuple[Any, ...], dtype[integer[Any] | numpy.bool[builtins.bool]]], ...], /) -> ndarray[tuple[Any, ...], dtype[signedinteger[_64Bit]]], (key: SupportsIndex | tuple[SupportsIndex, ...], /) -> Any, (key: SupportsIndex | slice[Any, Any, Any] | EllipsisType | ... omitted 5 union elements, /) -> ndarray[tuple[Any, ...], dtype[signedinteger[_64Bit]]], (key: str, /) -> ndarray[tuple[Any, ...], dtype[Any]], (key: list[str], /) -> ndarray[tuple[Any, ...], dtype[void]]]` cannot be called with key of type `ExtensionArray` on object of type `ndarray[tuple[Any, ...], dtype[signedinteger[_64Bit]]]`
+ pandas/core/arrays/string_.py:1017:39: warning[unused-ignore-comment] Unused blanket `type: ignore` directive
- pandas/io/pytables.py:4145:13: error[invalid-argument-type] Method `__getitem__` of type `Overload[(i: SupportsIndex, /) -> Index, (s: slice[Any, Any, Any], /) -> list[Index]]` cannot be called with key of type `int | Unknown | None` on object of type `list[Index]`
+ pandas/io/pytables.py:4145:13: error[invalid-argument-type] Method `__getitem__` of type `Overload[(i: SupportsIndex, /) -> Index, (s: slice[Any, Any, Any], /) -> list[Index]]` cannot be called with key of type `None` on object of type `list[Index]`
+ pandas/tests/io/pytables/test_store.py:1001:44: error[non-subscriptable] Cannot subscript object of type `GenericFixed` with no `__getitem__` method
- Found 3740 diagnostics
+ Found 3748 diagnostics

jax (https://github.com/google/jax)
- jax/_src/pallas/fuser/block_spec.py:424:39: error[invalid-argument-type] Argument to function `_block_shapes_equal` is incorrect: Expected `tuple[int | Element | Squeezed | ... omitted 3 union elements] | None`, found `Sequence[Element | Squeezed | Blocked | ... omitted 3 union elements] | None`
+ jax/_src/pallas/fuser/block_spec.py:2395:43: error[non-subscriptable] Cannot subscript object of type `None` with no `__getitem__` method
+ jax/_src/pallas/fuser/block_spec.py:2398:32: error[non-subscriptable] Cannot subscript object of type `None` with no `__getitem__` method
+ jax/_src/tree_util.py:295:31: error[invalid-argument-type] Argument to bound method `register_node` is incorrect: Expected `(Hashable, Iterable[object], /) -> T@register_pytree_node`, found `(_AuxData@register_pytree_node, _Children@register_pytree_node, /) -> T@register_pytree_node`
+ jax/_src/tree_util.py:298:31: error[invalid-argument-type] Argument to bound method `register_node` is incorrect: Expected `(Hashable, Iterable[object], /) -> T@register_pytree_node`, found `(_AuxData@register_pytree_node, _Children@register_pytree_node, /) -> T@register_pytree_node`
+ jax/_src/tree_util.py:301:31: error[invalid-argument-type] Argument to bound method `register_node` is incorrect: Expected `(Hashable, Iterable[object], /) -> T@register_pytree_node`, found `(_AuxData@register_pytree_node, _Children@register_pytree_node, /) -> T@register_pytree_node`
- Found 2789 diagnostics
+ Found 2793 diagnostics

static-frame (https://github.com/static-frame/static-frame)
+ static_frame/core/bus.py:671:16: error[invalid-return-type] Return type does not match returned value: expected `InterGetItemLocReduces[Bus[Any], object_]`, found `InterGetItemLocReduces[Bus[Any] | Top[Index[Any]] | Top[Series[Any, Any]] | ... omitted 7 union elements, object_]`
- static_frame/core/bus.py:675:16: error[invalid-return-type] Return type does not match returned value: expected `InterGetItemILocReduces[Bus[Any], object_]`, found `InterGetItemILocReduces[Bus[Any], object_ | Self@iloc]`
+ static_frame/core/bus.py:675:16: error[invalid-return-type] Return type does not match returned value: expected `InterGetItemILocReduces[Bus[Any], object_]`, found `InterGetItemILocReduces[Bus[Any] | Top[Index[Any]] | TypeBlocks | ... omitted 7 union elements, generic[object]]`
- static_frame/core/container_util.py:1765:19: error[invalid-argument-type] Method `__getitem__` of type `Overload[(index: int) -> Sequence[Hashable], (index: slice[Any, Any, Any]) -> Sequence[Sequence[Hashable]]]` cannot be called with key of type `int | (list[int] & Top[integer[Any]])` on object of type `Sequence[Sequence[Hashable]]`
- static_frame/core/container_util.py:1780:20: error[invalid-argument-type] Method `__getitem__` of type `Overload[(index: int) -> Hashable, (index: slice[Any, Any, Any]) -> Sequence[Hashable]]` cannot be called with key of type `int | (list[int] & Top[integer[Any]])` on object of type `Sequence[Hashable]`
+ static_frame/core/index_hierarchy.py:2153:41: warning[unused-ignore-comment] Unused blanket `type: ignore` directive
- static_frame/core/series.py:772:16: error[invalid-return-type] Return type does not match returned value: expected `InterGetItemILocReduces[Series[Any, Any], TVDtype@Series]`, found `InterGetItemILocReduces[Series[Any, Any] | Top[Index[Any]] | TypeBlocks | ... omitted 6 union elements, generic[object]]`
+ static_frame/core/series.py:772:16: error[invalid-return-type] Return type does not match returned value: expected `InterGetItemILocReduces[Series[Any, Any], TVDtype@Series]`, found `InterGetItemILocReduces[Series[Any, Any] | TypeBlocks | Batch | ... omitted 6 union elements, generic[object]]`
- static_frame/core/series.py:4072:16: error[invalid-return-type] Return type does not match returned value: expected `InterGetItemILocReduces[SeriesHE[Any, Any], TVDtype@SeriesHE]`, found `InterGetItemILocReduces[SeriesHE[Any, Any] | TypeBlocks | Batch | ... omitted 7 union elements, generic[object]]`
+ static_frame/core/series.py:4072:16: error[invalid-return-type] Return type does not match returned value: expected `InterGetItemILocReduces[SeriesHE[Any, Any], TVDtype@SeriesHE]`, found `InterGetItemILocReduces[SeriesHE[Any, Any], generic[object]]`

sympy (https://github.com/sympy/sympy)
- sympy/codegen/cfunctions.py:521:20: error[unsupported-operator] Operator `*` is not supported between objects of type `Literal[2]` and `Basic`
+ sympy/codegen/cfunctions.py:521:20: error[unsupported-operator] Operator `*` is not supported between objects of type `Literal[2]` and `Basic | Unknown`
+ sympy/combinatorics/perm_groups.py:4186:30: error[non-subscriptable] Cannot subscript object of type `None` with no `__getitem__` method
- sympy/combinatorics/perm_groups.py:4233:38: error[invalid-argument-type] Argument to function `len` is incorrect: Expected `Sized`, found `Unknown | None`
- sympy/combinatorics/perm_groups.py:4236:29: error[non-subscriptable] Cannot subscript object of type `None` with no `__getitem__` method
- sympy/combinatorics/perm_groups.py:4241:26: error[non-subscriptable] Cannot subscript object of type `None` with no `__getitem__` method
- sympy/combinatorics/perm_groups.py:4243:65: error[non-subscriptable] Cannot subscript object of type `None` with no `__getitem__` method
- sympy/combinatorics/permutations.py:2280:34: error[invalid-argument-type] Method `__getitem__` of type `Overload[(i: SupportsIndex, /) -> Unknown | None, (s: slice[Any, Any, Any], /) -> list[Unknown | None]]` cannot be called with key of type `Unknown | None` on object of type `list[Unknown | None]`
+ sympy/combinatorics/permutations.py:2280:34: error[invalid-argument-type] Method `__getitem__` of type `Overload[(i: SupportsIndex, /) -> Unknown | None, (s: slice[Any, Any, Any], /) -> list[Unknown | None]]` cannot be called with key of type `None` on object of type `list[Unknown | None]`
- sympy/core/function.py:778:12: error[unresolved-attribute] Object of type `Basic` has no attribute `_diff_wrt`
+ sympy/core/function.py:778:12: warning[possibly-missing-attribute] Attribute `_diff_wrt` may be missing on object of type `Unknown | Basic`
+ sympy/holonomic/holonomic.py:686:48: error[non-subscriptable] Cannot subscript object of type `None` with no `__getitem__` method
+ sympy/holonomic/holonomic.py:686:48: error[non-subscriptable] Cannot subscript object of type `None` with no `_

... (truncated 277 lines) ...

No memory usage changes detected ✅

astral-sh-bot[bot] avatar Dec 17 '25 19:12 astral-sh-bot[bot]

ecosystem-analyzer results

Lint rule Added Removed Changed
invalid-argument-type 6 14 55
non-subscriptable 0 23 39
invalid-key 3 0 55
invalid-return-type 6 2 8
invalid-assignment 0 9 6
possibly-missing-attribute 2 3 1
unused-ignore-comment 6 0 0
call-non-callable 0 5 0
unresolved-attribute 0 4 0
not-iterable 0 2 0
type-assertion-failure 0 0 2
index-out-of-bounds 1 0 0
no-matching-overload 0 1 0
unsupported-operator 0 0 1
Total 24 63 167

Full report with detailed diff (timing results)

astral-sh-bot[bot] avatar Dec 17 '25 19:12 astral-sh-bot[bot]