Skip to content

[ty] WIP: Simplify assignability rules for typevars#19971

Closed
dcreager wants to merge 4 commits intomainfrom
dcreager/non-inferable
Closed

[ty] WIP: Simplify assignability rules for typevars#19971
dcreager wants to merge 4 commits intomainfrom
dcreager/non-inferable

Conversation

@dcreager
Copy link
Member

Pushing this up mostly to see what the ecosystem impact is. If it's good, this will make #19838 much easier, and I'll write up a better description for this!

@github-actions
Copy link
Contributor

github-actions bot commented Aug 18, 2025

Diagnostic diff on typing conformance tests

No changes detected when running ty on typing conformance tests ✅

@dcreager dcreager added internal An internal refactor or improvement ty Multi-file analysis & type inference ecosystem-analyzer labels Aug 18, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Aug 18, 2025

mypy_primer results

Changes were detected when running on open source projects
DateType (https://github.com/glyph/DateType)
+ src/datetype/__init__.py:474:25: error[invalid-argument-type] Argument to class `Time` is incorrect: Expected `tzinfo | None`, found `_GMaybeTZDT@DateTime`
+ src/datetype/__init__.py:479:10: error[invalid-argument-type] Argument to class `DateTime` is incorrect: Expected `tzinfo | None`, found `_FuncOptionalTZ@fromtimestamp`
+ src/datetype/__init__.py:485:42: error[invalid-argument-type] Argument to class `DateTime` is incorrect: Expected `tzinfo | None`, found `_FuncOptionalTZ@now`
+ src/datetype/__init__.py:500:36: error[invalid-argument-type] Argument to class `Time` is incorrect: Expected `tzinfo | None`, found `_FuncOptionalTZ@combine`
+ src/datetype/__init__.py:501:14: error[invalid-argument-type] Argument to class `DateTime` is incorrect: Expected `tzinfo | None`, found `_FuncOptionalTZ@combine`
+ src/datetype/__init__.py:507:14: error[invalid-argument-type] Argument to class `DateTime` is incorrect: Expected `tzinfo | None`, found `_FuncOptionalTZ@combine`
- Found 8 diagnostics
+ Found 14 diagnostics

anyio (https://github.com/agronholm/anyio)
+ src/anyio/_core/_contextmanagers.py:14:37: error[invalid-argument-type] Argument to class `AbstractContextManager` is incorrect: Expected `bool | None`, found `_ExitT_co@_SupportsCtxMgr`
+ src/anyio/_core/_contextmanagers.py:20:10: error[invalid-argument-type] Argument to class `AbstractAsyncContextManager` is incorrect: Expected `bool | None`, found `_ExitT_co@_SupportsAsyncCtxMgr`
+ src/anyio/_core/_contextmanagers.py:76:15: error[invalid-argument-type] Argument to class `_SupportsCtxMgr` is incorrect: Expected `bool | None`, found `_ExitT_co@__exit__`
+ src/anyio/_core/_contextmanagers.py:169:15: error[invalid-argument-type] Argument to class `_SupportsAsyncCtxMgr` is incorrect: Expected `bool | None`, found `_ExitT_co@__aexit__`
+ src/anyio/streams/memory.py:39:5: error[invalid-assignment] Object of type `dataclasses.Field[Unknown]` is not assignable to `T_Item@MemoryObjectItemReceiver`
- Found 222 diagnostics
+ Found 227 diagnostics

hydra-zen (https://github.com/mit-ll-responsible-ai/hydra-zen)
- src/hydra_zen/structured_configs/_implementations.py:1074:60: warning[unused-ignore-comment] Unused blanket `type: ignore` directive
+ src/hydra_zen/structured_configs/_implementations.py:1075:16: error[invalid-return-type] Return type does not match returned value: expected `_T@_mutable_value`, found `dataclasses.Field[Unknown]`

strawberry (https://github.com/strawberry-graphql/strawberry)
+ strawberry/schema/schema_converter.py:120:22: error[invalid-argument-type] Argument to class `FieldConverterProtocol` is incorrect: Expected `GraphQLField | GraphQLInputField`, found `FieldType@_get_thunk_mapping`
- Found 377 diagnostics
+ Found 378 diagnostics

kopf (https://github.com/nolar/kopf)
+ kopf/_core/engines/daemons.py:51:5: error[invalid-assignment] Object of type `dataclasses.Field[int | float]` is not assignable to `int | float`
- Found 59 diagnostics
+ Found 60 diagnostics

optuna (https://github.com/optuna/optuna)
- optuna/importance/_fanova/_tree.py:78:16: error[invalid-return-type] Return type does not match returned value: expected `int | float`, found `floating[Any]`
- optuna/importance/_fanova/_tree.py:142:16: error[invalid-return-type] Return type does not match returned value: expected `tuple[int | float, int | float]`, found `tuple[floating[Any], Unknown]`
- optuna/visualization/_rank.py:299:32: error[non-subscriptable] Cannot subscript object of type `floating[Any]` with no `__getitem__` method
- optuna/visualization/_rank.py:299:67: error[invalid-argument-type] Argument to function `len` is incorrect: Expected `Sized`, found `floating[Any]`
- Found 559 diagnostics
+ Found 555 diagnostics

itsdangerous (https://github.com/pallets/itsdangerous)
+ src/itsdangerous/serializer.py:219:26: error[invalid-argument-type] Argument to class `_PDataSerializer` is incorrect: Expected `str | bytes`, found `_TSerialized@Serializer`
+ src/itsdangerous/timed.py:170:23: error[invalid-argument-type] Argument to class `Serializer` is incorrect: Expected `str | bytes`, found `_TSerialized@TimedSerializer`
- Found 8 diagnostics
+ Found 10 diagnostics

dragonchain (https://github.com/dragonchain/dragonchain)
- dragonchain/lib/database/redis_utest.py:102:9: warning[possibly-unbound-attribute] Attribute `assert_called_once_with` on type `Unknown | (bound method Redis[Unknown].set(name: @Todo(Support for `typing.TypeAlias`), value: @Todo(Support for `typing.TypeAlias`), ex: None | int | float | timedelta = None, px: None | int | float | timedelta = None, nx: bool = Literal[False], xx: bool = Literal[False], keepttl: bool = Literal[False], get: bool = Literal[False], exat: @Todo(Support for `typing.TypeAlias`) | None = None, pxat: @Todo(Support for `typing.TypeAlias`) | None = None) -> bool | None)` is possibly unbound
- dragonchain/lib/database/redis_utest.py:106:9: warning[possibly-unbound-attribute] Attribute `assert_called_once_with` on type `Unknown | (bound method Redis[Unknown].set(name: @Todo(Support for `typing.TypeAlias`), value: @Todo(Support for `typing.TypeAlias`), ex: None | int | float | timedelta = None, px: None | int | float | timedelta = None, nx: bool = Literal[False], xx: bool = Literal[False], keepttl: bool = Literal[False], get: bool = Literal[False], exat: @Todo(Support for `typing.TypeAlias`) | None = None, pxat: @Todo(Support for `typing.TypeAlias`) | None = None) -> bool | None)` is possibly unbound
- dragonchain/lib/database/redis_utest.py:110:9: warning[possibly-unbound-attribute] Attribute `assert_called_once_with` on type `Unknown | (bound method Redis[Unknown].get(name: @Todo(Support for `typing.TypeAlias`)) -> Unknown | None)` is possibly unbound
- dragonchain/lib/database/redis_utest.py:114:9: warning[possibly-unbound-attribute] Attribute `assert_called_once_with` on type `Unknown | (bound method Redis[Unknown].delete(*names: @Todo(Support for `typing.TypeAlias`)) -> int)` is possibly unbound
- dragonchain/lib/database/redis_utest.py:122:9: warning[possibly-unbound-attribute] Attribute `assert_called_once` on type `Unknown | (bound method Redis[Unknown].flushall(asynchronous: bool = Literal[False], **kwargs: @Todo(Support for `typing.TypeAlias`)) -> bool)` is possibly unbound
- dragonchain/lib/database/redis_utest.py:126:9: warning[possibly-unbound-attribute] Attribute `assert_called_once_with` on type `Unknown | (bound method Redis[Unknown].hdel(name: @Todo(Support for `typing.TypeAlias`), *keys: @Todo(Support for `typing.TypeAlias`)) -> int)` is possibly unbound
- dragonchain/lib/database/redis_utest.py:130:9: warning[possibly-unbound-attribute] Attribute `assert_called_once_with` on type `Unknown | (bound method Redis[Unknown].lpush(name: @Todo(Support for `typing.TypeAlias`), *values: @Todo(Support for `typing.TypeAlias`)) -> int)` is possibly unbound
- dragonchain/lib/database/redis_utest.py:134:9: warning[possibly-unbound-attribute] Attribute `assert_called_once_with` on type `Unknown | (bound method Redis[Unknown].rpush(name: @Todo(Support for `typing.TypeAlias`), *values: @Todo(Support for `typing.TypeAlias`)) -> int)` is possibly unbound
- dragonchain/lib/database/redis_utest.py:138:9: warning[possibly-unbound-attribute] Attribute `assert_called_once_with` on type `Unknown | (bound method Redis[Unknown].delete(*names: @Todo(Support for `typing.TypeAlias`)) -> int)` is possibly unbound
- dragonchain/lib/database/redis_utest.py:142:9: warning[possibly-unbound-attribute] Attribute `assert_called_once_with` on type `Unknown | (Overload[(name: @Todo(Support for `typing.TypeAlias`), key: @Todo(Support for `typing.TypeAlias`), value: @Todo(Support for `typing.TypeAlias`), mapping: Mapping[@Todo(Support for `typing.TypeAlias`), @Todo(Support for `typing.TypeAlias`)] | None = None, items: @Todo(Support for `typing.TypeAlias`) | None = None) -> int, (name: @Todo(Support for `typing.TypeAlias`), key: None, value: None, mapping: Mapping[@Todo(Support for `typing.TypeAlias`), @Todo(Support for `typing.TypeAlias`)], items: @Todo(Support for `typing.TypeAlias`) | None = None) -> int, (name: @Todo(Support for `typing.TypeAlias`), *, mapping: Mapping[@Todo(Support for `typing.TypeAlias`), @Todo(Support for `typing.TypeAlias`)], items: @Todo(Support for `typing.TypeAlias`) | None = None) -> int])` is possibly unbound
- dragonchain/lib/database/redis_utest.py:146:9: warning[possibly-unbound-attribute] Attribute `assert_called_once_with` on type `Unknown | (Overload[(keys: @Todo(Support for `typing.TypeAlias`) | Iterable[@Todo(Support for `typing.TypeAlias`)], timeout: Literal[0] | None = Literal[0]) -> tuple[Unknown, Unknown], (keys: @Todo(Support for `typing.TypeAlias`) | Iterable[@Todo(Support for `typing.TypeAlias`)], timeout: int | float) -> tuple[Unknown, Unknown] | None])` is possibly unbound
- dragonchain/lib/database/redis_utest.py:150:9: warning[possibly-unbound-attribute] Attribute `assert_called_once_with` on type `Unknown | (bound method Redis[Unknown].brpoplpush(src, dst, timeout: int | None = Literal[0]) -> Unknown)` is possibly unbound
- dragonchain/lib/database/redis_utest.py:154:9: warning[possibly-unbound-attribute] Attribute `assert_called_once_with` on type `Unknown | (bound method Redis[Unknown].get(name: @Todo(Support for `typing.TypeAlias`)) -> Unknown | None)` is possibly unbound
- dragonchain/lib/database/redis_utest.py:158:9: warning[possibly-unbound-attribute] Attribute `assert_called_once_with` on type `Unknown | (bound method Redis[Unknown].lindex(name: @Todo(Support for `typing.TypeAlias`), index: int) -> Unknown | None)` is possibly unbound
- dragonchain/lib/database/redis_utest.py:162:9: warning[possibly-unbound-attribute] Attribute `assert_called_once_with` on type `Unknown | (bound method Redis[Unknown].set(name: @Todo(Support for `typing.TypeAlias`), value: @Todo(Support for `typing.TypeAlias`), ex: None | int | float | timedelta = None, px: None | int | float | timedelta = None, nx: bool = Literal[False], xx: bool = Literal[False], keepttl: bool = Literal[False], get: bool = Literal[False], exat: @Todo(Support for `typing.TypeAlias`) | None = None, pxat: @Todo(Support for `typing.TypeAlias`) | None = None) -> bool | None)` is possibly unbound
- dragonchain/lib/database/redis_utest.py:166:9: warning[possibly-unbound-attribute] Attribute `assert_called_once_with` on type `Unknown | (bound method Redis[Unknown].ltrim(name: @Todo(Support for `typing.TypeAlias`), start: int, end: int) -> bool)` is possibly unbound
- dragonchain/lib/database/redis_utest.py:170:9: warning[possibly-unbound-attribute] Attribute `assert_called_once_with` on type `Unknown | (bound method Redis[Unknown].hget(name: @Todo(Support for `typing.TypeAlias`), key: @Todo(Support for `typing.TypeAlias`)) -> Unknown | None)` is possibly unbound
- dragonchain/lib/database/redis_utest.py:174:9: warning[possibly-unbound-attribute] Attribute `assert_called_once_with` on type `Unknown | (bound method Redis[Unknown].sadd(name: @Todo(Support for `typing.TypeAlias`), *values: @Todo(Support for `typing.TypeAlias`)) -> int)` is possibly unbound
- dragonchain/lib/database/redis_utest.py:178:9: warning[possibly-unbound-attribute] Attribute `assert_called_once_with` on type `Unknown | (bound method Redis[Unknown].sismember(name: @Todo(Support for `typing.TypeAlias`), value: @Todo(Support for `typing.TypeAlias`)) -> bool)` is possibly unbound
- dragonchain/lib/database/redis_utest.py:182:9: warning[possibly-unbound-attribute] Attribute `assert_called_once_with` on type `Unknown | (bound method Redis[Unknown].smembers(name: @Todo(Support for `typing.TypeAlias`)) -> set[Unknown])` is possibly unbound
- dragonchain/lib/database/redis_utest.py:186:9: warning[possibly-unbound-attribute] Attribute `assert_called_once_with` on type `Unknown | (bound method Redis[Unknown].srem(name: @Todo(Support for `typing.TypeAlias`), *values: @Todo(Support for `typing.TypeAlias`)) -> int)` is possibly unbound
- dragonchain/lib/database/redis_utest.py:190:9: warning[possibly-unbound-attribute] Attribute `assert_called_once_with` on type `Unknown | (bound method Redis[Unknown].lrange(name: @Todo(Support for `typing.TypeAlias`), start: int, end: int) -> list[Unknown])` is possibly unbound
- dragonchain/lib/database/redis_utest.py:194:9: warning[possibly-unbound-attribute] Attribute `pipelineassert_called_once_with` on type `Unknown | Redis[Unknown]` is possibly unbound
- dragonchain/lib/database/redis_utest.py:198:9: warning[possibly-unbound-attribute] Attribute `assert_called_once_with` on type `Unknown | (bound method Redis[Unknown].llen(name: @Todo(Support for `typing.TypeAlias`)) -> int)` is possibly unbound
- dragonchain/lib/database/redis_utest.py:202:9: warning[possibly-unbound-attribute] Attribute `assert_called_once_with` on type `Unknown | (bound method Redis[Unknown].rpoplpush(src, dst) -> Unknown)` is possibly unbound
- dragonchain/lib/database/redis_utest.py:206:9: warning[possibly-unbound-attribute] Attribute `assert_called_once_with` on type `Unknown | (bound method Redis[Unknown].lpop(name, count: int | None = None) -> Unknown)` is possibly unbound
- dragonchain/lib/database/redis_utest.py:210:9: warning[possibly-unbound-attribute] Attribute `assert_called_once_with` on type `Unknown | (bound method Redis[Unknown].hgetall(name: @Todo(Support for `typing.TypeAlias`)) -> dict[Unknown, Unknown])` is possibly unbound
- dragonchain/lib/database/redis_utest.py:214:9: warning[possibly-unbound-attribute] Attribute `assert_called_once_with` on type `Unknown | (bound method Redis[Unknown].hexists(name: @Todo(Support for `typing.TypeAlias`), key: @Todo(Support for `typing.TypeAlias`)) -> bool)` is possibly unbound
- dragonchain/lib/database/redis_utest.py:218:9: warning[possibly-unbound-attribute] Attribute `assert_called_once_with` on type `Unknown | (bound method Redis[Unknown].zadd(name: @Todo(Support for `typing.TypeAlias`), mapping: Mapping[@Todo(Support for `typing.TypeAlias`), @Todo(Support for `typing.TypeAlias`)], nx: bool = Literal[False], xx: bool = Literal[False], ch: bool = Literal[False], incr: bool = Literal[False], gt: @Todo(Support for `typing.TypeAlias`) | None = Literal[False], lt: @Todo(Support for `typing.TypeAlias`) | None = Literal[False]) -> int)` is possibly unbound
- Found 306 diagnostics
+ Found 277 diagnostics

bokeh (https://github.com/bokeh/bokeh)
- src/bokeh/palettes.py:1676:63: error[invalid-argument-type] Argument to function `__new__` is incorrect: Expected `Iterable[Unknown]`, found `float64`
- Found 839 diagnostics
+ Found 838 diagnostics

django-stubs (https://github.com/typeddjango/django-stubs)
+ django-stubs/db/models/expressions.pyi:245:25: error[invalid-argument-type] Argument to class `ExpressionWrapper` is incorrect: Expected `Q | Combinable`, found `_E@NegatedExpression`
- Found 442 diagnostics
+ Found 443 diagnostics

mitmproxy (https://github.com/mitmproxy/mitmproxy)
+ mitmproxy/connection.py:193:5: error[invalid-assignment] Object of type `dataclasses.Field[int | float]` is not assignable to `int | float`
+ mitmproxy/contentviews/__init__.py:67:26: error[invalid-argument-type] Argument to function `get_data` is incorrect: Expected `Message | TCPMessage | UDPMessage | WebSocketMessage | DNSMessage`, found `ContentviewMessage`
+ mitmproxy/contentviews/__init__.py:77:30: error[invalid-argument-type] Argument to function `make_metadata` is incorrect: Expected `Message | TCPMessage | UDPMessage | WebSocketMessage | DNSMessage`, found `ContentviewMessage`
+ mitmproxy/contentviews/__init__.py:125:30: error[invalid-argument-type] Argument to function `make_metadata` is incorrect: Expected `Message | TCPMessage | UDPMessage | WebSocketMessage | DNSMessage`, found `ContentviewMessage`
+ mitmproxy/flow.py:32:5: error[invalid-assignment] Object of type `dataclasses.Field[int | float]` is not assignable to `int | float`
- Found 1822 diagnostics
+ Found 1827 diagnostics

discord.py (https://github.com/Rapptz/discord.py)
+ discord/asset.py:174:39: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `str | None`, found `str | None | Any | under_cached_property[Unknown]`
+ discord/asset.py:428:19: error[no-matching-overload] No overload of function `splitext` matches arguments
+ discord/asset.py:513:19: error[no-matching-overload] No overload of function `splitext` matches arguments
- discord/ext/commands/core.py:128:35: error[too-many-positional-arguments] Too many positional arguments to class `Group`: expected 1, got 3
- discord/ext/commands/core.py:815:31: error[too-many-positional-arguments] Too many positional arguments to class `Group`: expected 1, got 3
- discord/ext/commands/core.py:833:39: error[too-many-positional-arguments] Too many positional arguments to class `Group`: expected 1, got 3
+ discord/ext/commands/core.py:1498:15: error[invalid-argument-type] Argument to class `GroupMixin` is incorrect: Expected `Cog | None`, found `CogT@GroupMixin`
+ discord/ext/commands/core.py:1515:15: error[invalid-argument-type] Argument to class `GroupMixin` is incorrect: Expected `Cog | None`, found `CogT@GroupMixin`
- discord/ext/commands/core.py:1568:9: error[too-many-positional-arguments] Too many positional arguments to class `Group`: expected 1, got 3
+ discord/ext/commands/core.py:1557:15: error[invalid-argument-type] Argument to class `GroupMixin` is incorrect: Expected `Cog | None`, found `CogT@GroupMixin`
+ discord/ext/commands/core.py:1574:15: error[invalid-argument-type] Argument to class `GroupMixin` is incorrect: Expected `Cog | None`, found `CogT@GroupMixin`
+ discord/ext/commands/core.py:1615:13: error[invalid-argument-type] Argument to class `GroupMixin` is incorrect: Expected `Cog | None`, found `CogT@Group`
- discord/ext/commands/core.py:1746:91: error[too-many-positional-arguments] Too many positional arguments to class `Group`: expected 1, got 3
- discord/ext/commands/core.py:1750:85: error[too-many-positional-arguments] Too many positional arguments to class `Group`: expected 1, got 3
+ discord/ext/commands/help.py:503:66: warning[unused-ignore-comment] Unused blanket `type: ignore` directive
- discord/ext/commands/help.py:849:44: error[too-many-positional-arguments] Too many positional arguments to class `Group`: expected 1, got 3
- discord/ext/commands/help.py:1303:44: error[too-many-positional-arguments] Too many positional arguments to class `Group`: expected 1, got 3
- discord/ext/commands/help.py:1589:44: error[too-many-positional-arguments] Too many positional arguments to class `Group`: expected 1, got 3
- discord/ext/commands/hybrid.py:88:35: error[too-many-positional-arguments] Too many positional arguments to class `Group`: expected 1, got 3
- discord/ext/commands/hybrid.py:601:19: error[too-many-positional-arguments] Too many positional arguments to class `Group`: expected 1, got 3
+ discord/utils.py:893:20: error[non-subscriptable] Cannot subscript object of type `under_cached_property[Unknown]` with no `__getitem__` method
+ discord/utils.py:894:24: warning[possibly-unbound-attribute] Attribute `get` on type `Unknown | under_cached_property[Unknown]` is possibly unbound

aiohttp (https://github.com/aio-libs/aiohttp)
+ aiohttp/connector.py:1413:12: warning[possibly-unbound-attribute] Attribute `endswith` on type `(Unknown & ~None) | under_cached_property[Unknown]` is possibly unbound
+ aiohttp/connector.py:1414:20: warning[possibly-unbound-attribute] Attribute `rstrip` on type `(Unknown & ~None) | under_cached_property[Unknown]` is possibly unbound
+ aiohttp/connector.py:1435:17: warning[possibly-unbound-attribute] Attribute `rstrip` on type `(Unknown & ~AlwaysFalsy) | (str & ~AlwaysFalsy) | (Unknown & ~None) | under_cached_property[Unknown] | Unknown` is possibly unbound
+ aiohttp/cookiejar.py:237:47: error[invalid-argument-type] Argument to function `is_ip_address` is incorrect: Expected `str | None`, found `Unknown | under_cached_property[Unknown]`
+ aiohttp/cookiejar.py:276:24: warning[possibly-unbound-attribute] Attribute `startswith` on type `Unknown | under_cached_property[Unknown]` is possibly unbound
+ aiohttp/cookiejar.py:280:34: error[non-subscriptable] Cannot subscript object of type `under_cached_property[Unknown]` with no `__getitem__` method
+ aiohttp/cookiejar.py:280:43: warning[possibly-unbound-attribute] Attribute `rfind` on type `Unknown | under_cached_property[Unknown]` is possibly unbound
+ aiohttp/cookiejar.py:350:26: error[invalid-argument-type] Argument to function `is_ip_address` is incorrect: Expected `str | None`, found `(Unknown & ~AlwaysFalsy) | (under_cached_property[Unknown] & ~AlwaysFalsy) | Literal[""]`
+ aiohttp/cookiejar.py:357:26: warning[possibly-unbound-attribute] Attribute `split` on type `(Unknown & ~AlwaysFalsy) | (under_cached_property[Unknown] & ~AlwaysFalsy) | Literal[""]` is possibly unbound
+ aiohttp/cookiejar.py:361:38: warning[possibly-unbound-attribute] Attribute `split` on type `Unknown | under_cached_property[Unknown]` is possibly unbound
+ aiohttp/cookiejar.py:365:24: error[invalid-argument-type] Argument to function `len` is incorrect: Expected `Sized`, found `Unknown | under_cached_property[Unknown]`
+ aiohttp/helpers.py:199:43: error[invalid-argument-type] Argument to function `__new__` is incorrect: Expected `str`, found `(Unknown & ~AlwaysFalsy) | (under_cached_property[Unknown] & ~AlwaysFalsy) | Literal[""]`
+ aiohttp/helpers.py:199:59: error[invalid-argument-type] Argument to function `__new__` is incorrect: Expected `str`, found `(Unknown & ~AlwaysFalsy) | (under_cached_property[Unknown] & ~AlwaysFalsy) | Literal[""]`
+ aiohttp/helpers.py:310:46: error[invalid-argument-type] Argument to function `proxy_bypass` is incorrect: Expected `str`, found `(Unknown & ~None) | under_cached_property[Unknown]`
+ aiohttp/helpers.py:315:22: error[invalid-argument-type] Method `__getitem__` of type `bound method dict[str, ProxyInfo].__getitem__(key: str, /) -> ProxyInfo` cannot be called with key of type `Unknown | under_cached_property[Unknown]` on object of type `dict[str, ProxyInfo]`
+ aiohttp/web_urldispatcher.py:814:55: warning[possibly-unbound-attribute] Attribute `split` on type `(Unknown & ~None) | under_cached_property[Unknown]` is possibly unbound
+ aiohttp/web_urldispatcher.py:817:20: error[invalid-return-type] Return type does not match returned value: expected `str`, found `(Unknown & ~None) | under_cached_property[Unknown]`
+ aiohttp/web_urldispatcher.py:1260:12: error[invalid-return-type] Return type does not match returned value: expected `str`, found `Unknown | under_cached_property[Unknown]`
- Found 209 diagnostics
+ Found 227 diagnostics

prefect (https://github.com/PrefectHQ/prefect)
+ src/prefect/server/orchestration/rules.py:535:44: error[invalid-argument-type] Argument to class `OrchestrationContext` is incorrect: Expected `FlowRunPolicy | TaskRunPolicy`, found `RP@BaseOrchestrationRule`
+ src/prefect/server/orchestration/rules.py:628:18: error[invalid-argument-type] Argument to class `OrchestrationContext` is incorrect: Expected `FlowRunPolicy | TaskRunPolicy`, found `RP@__init__`
+ src/prefect/server/orchestration/rules.py:637:35: error[invalid-argument-type] Argument to class `OrchestrationContext` is incorrect: Expected `FlowRunPolicy | TaskRunPolicy`, found `RP@__aenter__`
+ src/prefect/server/orchestration/rules.py:700:18: error[invalid-argument-type] Argument to class `OrchestrationContext` is incorrect: Expected `FlowRunPolicy | TaskRunPolicy`, found `RP@before_transition`
+ src/prefect/server/orchestration/rules.py:731:18: error[invalid-argument-type] Argument to class `OrchestrationContext` is incorrect: Expected `FlowRunPolicy | TaskRunPolicy`, found `RP@after_transition`
+ src/prefect/server/orchestration/rules.py:751:18: error[invalid-argument-type] Argument to class `OrchestrationContext` is incorrect: Expected `FlowRunPolicy | TaskRunPolicy`, found `RP@cleanup`
+ src/prefect/server/orchestration/rules.py:970:44: error[invalid-argument-type] Argument to class `OrchestrationContext` is incorrect: Expected `FlowRunPolicy | TaskRunPolicy`, found `RP@BaseUniversalTransform`
+ src/prefect/server/orchestration/rules.py:1003:18: error[invalid-argument-type] Argument to class `OrchestrationContext` is incorrect: Expected `FlowRunPolicy | TaskRunPolicy`, found `RP@__init__`
+ src/prefect/server/orchestration/rules.py:1011:35: error[invalid-argument-type] Argument to class `OrchestrationContext` is incorrect: Expected `FlowRunPolicy | TaskRunPolicy`, found `RP@__aenter__`
+ src/prefect/server/orchestration/rules.py:1044:48: error[invalid-argument-type] Argument to class `OrchestrationContext` is incorrect: Expected `FlowRunPolicy | TaskRunPolicy`, found `RP@before_transition`
+ src/prefect/server/orchestration/rules.py:1055:47: error[invalid-argument-type] Argument to class `OrchestrationContext` is incorrect: Expected `FlowRunPolicy | TaskRunPolicy`, found `RP@after_transition`
- Found 2971 diagnostics
+ Found 2982 diagnostics

scikit-learn (https://github.com/scikit-learn/scikit-learn)
- sklearn/calibration.py:1297:30: error[non-subscriptable] Cannot subscript object of type `floating[Any]` with no `__getitem__` method
- sklearn/calibration.py:1299:66: error[invalid-argument-type] Argument to function `len` is incorrect: Expected `Sized`, found `floating[Any] | @Todo(unknown type subscript)`
- sklearn/calibration.py:1300:66: error[invalid-argument-type] Argument to function `len` is incorrect: Expected `Sized`, found `floating[Any] | @Todo(unknown type subscript)`
- sklearn/calibration.py:1301:51: error[invalid-argument-type] Argument to function `len` is incorrect: Expected `Sized`, found `floating[Any] | @Todo(unknown type subscript)`
- sklearn/gaussian_process/_gpc.py:472:24: error[index-out-of-bounds] Index 0 is out of bounds for tuple `tuple[()]` with length 0
- sklearn/metrics/tests/test_regression.py:567:17: error[not-iterable] Object of type `floating[Any]` is not iterable
- sklearn/preprocessing/_polynomial.py:1116:31: warning[possibly-unbound-attribute] Attribute `tolil` on type `csr_array[float64, tuple[int, int]] | float64` is possibly unbound
- sklearn/preprocessing/_polynomial.py:1174:34: warning[possibly-unbound-attribute] Attribute `tocsr` on type `csr_array[float64, tuple[int, int]] | float64 | Unknown | lil_array[float64]` is possibly unbound
- sklearn/preprocessing/_polynomial.py:1197:38: warning[possibly-unbound-attribute] Attribute `tolil` on type `csr_array[float64, tuple[int, int]] | float64 | Unknown | lil_array[float64]` is possibly unbound
- sklearn/preprocessing/_polynomial.py:1212:38: warning[possibly-unbound-attribute] Attribute `tolil` on type `csr_array[float64, tuple[int, int]] | float64 | Unknown | lil_array[float64]` is possibly unbound
- sklearn/preprocessing/_polynomial.py:1245:42: warning[possibly-unbound-attribute] Attribute `tolil` on type `csr_array[float64, tuple[int, int]] | float64 | Unknown | lil_array[float64]` is possibly unbound
- sklearn/preprocessing/_polynomial.py:1261:42: warning[possibly-unbound-attribute] Attribute `tolil` on type `csr_array[float64, tuple[int, int]] | float64 | Unknown | lil_array[float64]` is possibly unbound
- sklearn/preprocessing/_polynomial.py:1271:30: warning[possibly-unbound-attribute] Attribute `tocsr` on type `csr_array[float64, tuple[int, int]] | float64 | Unknown | lil_array[float64] | csr_array[float64, @Todo(Support for `typing.TypeAlias`)]` is possibly unbound
- sklearn/preprocessing/tests/test_data.py:1602:11: error[non-subscriptable] Cannot subscript object of type `floating[Any]` with no `__getitem__` method
- sklearn/preprocessing/tests/test_data.py:1602:18: error[non-subscriptable] Cannot subscript object of type `floating[Any]` with no `__getitem__` method
- Found 2020 diagnostics
+ Found 2005 diagnostics

dd-trace-py (https://github.com/DataDog/dd-trace-py)
+ ddtrace/debugging/_signal/model.py:82:5: error[invalid-assignment] Object of type `dataclasses.Field[int | float]` is not assignable to `int | float`
+ ddtrace/ext/test_visibility/api.py:38:59: error[invalid-argument-type] Argument to bound method `get_item_by_id` is incorrect: Argument type `TestVisibilityItemId@_get_item_tag` does not satisfy upper bound of type variable `TestVisibilityItemId`
+ ddtrace/ext/test_visibility/api.py:42:52: error[invalid-argument-type] Argument to bound method `get_item_by_id` is incorrect: Argument type `TestVisibilityItemId@_set_item_tag` does not satisfy upper bound of type variable `TestVisibilityItemId`
+ ddtrace/ext/test_visibility/api.py:46:52: error[invalid-argument-type] Argument to bound method `get_item_by_id` is incorrect: Argument type `TestVisibilityItemId@_set_item_tags` does not satisfy upper bound of type variable `TestVisibilityItemId`
+ ddtrace/ext/test_visibility/api.py:50:52: error[invalid-argument-type] Argument to bound method `get_item_by_id` is incorrect: Argument type `TestVisibilityItemId@_delete_item_tag` does not satisfy upper bound of type variable `TestVisibilityItemId`
+ ddtrace/ext/test_visibility/api.py:54:52: error[invalid-argument-type] Argument to bound method `get_item_by_id` is incorrect: Argument type `TestVisibilityItemId@_delete_item_tags` does not satisfy upper bound of type variable `TestVisibilityItemId`
+ ddtrace/ext/test_visibility/api.py:58:59: error[invalid-argument-type] Argument to bound method `get_item_by_id` is incorrect: Argument type `TestVisibilityItemId@_is_item_finished` does not satisfy upper bound of type variable `TestVisibilityItemId`
+ ddtrace/ext/test_visibility/api.py:108:30: error[invalid-argument-type] Argument to function `_get_item_tag` is incorrect: Argument type `TestVisibilityItemId@get_tag` does not satisfy upper bound of type variable `TestVisibilityItemId`
+ ddtrace/ext/test_visibility/api.py:112:23: error[invalid-argument-type] Argument to function `_set_item_tag` is incorrect: Argument type `TestVisibilityItemId@set_tag` does not satisfy upper bound of type variable `TestVisibilityItemId`
+ ddtrace/ext/test_visibility/api.py:116:24: error[invalid-argument-type] Argument to function `_set_item_tags` is incorrect: Argument type `TestVisibilityItemId@set_tags` does not satisfy upper bound of type variable `TestVisibilityItemId`
+ ddtrace/ext/test_visibility/api.py:120:26: error[invalid-argument-type] Argument to function `_delete_item_tag` is incorrect: Argument type `TestVisibilityItemId@delete_tag` does not satisfy upper bound of type variable `TestVisibilityItemId`
+ ddtrace/ext/test_visibility/api.py:124:27: error[invalid-argument-type] Argument to function `_delete_item_tags` is incorrect: Argument type `TestVisibilityItemId@delete_tags` does not satisfy upper bound of type variable `TestVisibilityItemId`
+ ddtrace/ext/test_visibility/api.py:128:34: error[invalid-argument-type] Argument to function `_is_item_finished` is incorrect: Argument type `TestVisibilityItemId@is_finished` does not satisfy upper bound of type variable `TestVisibilityItemId`
+ ddtrace/internal/ci_visibility/recorder.py:902:39: error[invalid-argument-type] Argument to function `_is_item_itr_skippable` is incorrect: Argument type `TestVisibilityItemId@is_item_itr_skippable` does not satisfy upper bound of type variable `TestVisibilityItemId`
+ ddtrace/internal/endpoints.py:36:5: error[invalid-assignment] Object of type `dataclasses.Field[int | float]` is not assignable to `int | float`
+ ddtrace/internal/rate_limiter.py:202:5: error[invalid-assignment] Object of type `dataclasses.Field[int | float]` is not assignable to `int | float`
+ ddtrace/internal/test_visibility/api.py:27:59: error[invalid-argument-type] Argument to bound method `get_item_by_id` is incorrect: Argument type `TestVisibilityItemId@_get_item_span | TestId` does not satisfy upper bound of type variable `TestVisibilityItemId`
+ ddtrace/internal/test_visibility/api.py:48:63: error[invalid-argument-type] Argument to bound method `get_item_by_id` is incorrect: Argument type `TestVisibilityItemId@stash_get` does not satisfy upper bound of type variable `TestVisibilityItemId`
+ ddtrace/internal/test_visibility/api.py:55:56: error[invalid-argument-type] Argument to bound method `get_item_by_id` is incorrect: Argument type `TestVisibilityItemId@stash_delete` does not satisfy upper bound of type variable `TestVisibilityItemId`
- Found 6483 diagnostics
+ Found 6502 diagnostics

scipy (https://github.com/scipy/scipy)
- scipy/integrate/_quadrature.py:498:33: error[non-subscriptable] Cannot subscript object of type `float64` with no `__getitem__` method
- scipy/integrate/_quadrature.py:499:33: error[non-subscriptable] Cannot subscript object of type `float64` with no `__getitem__` method
- scipy/signal/tests/test_signaltools.py:3170:22: error[non-subscriptable] Cannot subscript object of type `floating[Any]` with no `__getitem__` method
- scipy/sparse/linalg/_isolve/iterative.py:564:16: error[non-subscriptable] Cannot subscript object of type `float64` with no `__getitem__` method
- scipy/stats/_continuous_distns.py:1507:25: error[not-iterable] Object of type `floating[Any]` is not iterable
- scipy/stats/_continuous_distns.py:6011:25: error[not-iterable] Object of type `floating[Any]` is not iterable
- scipy/stats/_continuous_distns.py:9657:25: error[not-iterable] Object of type `floating[Any]` is not iterable
- scipy/stats/_continuous_distns.py:12464:29: error[not-iterable] Object of type `floating[Any]` is not iterable
- scipy/stats/_multicomp.py:428:12: error[invalid-return-type] Return type does not match returned value: expected `tuple[ndarray[Unknown, Unknown], int | float, ndarray[Unknown, Unknown], ndarray[Unknown, Unknown]]`, found `tuple[Any, Any, floating[Any], @Todo(unknown type subscript)]`
- scipy/stats/_qmc.py:458:16: error[invalid-return-type] Return type does not match returned value: expected `int | float`, found `floating[Any]`
- scipy/stats/tests/test_quantile.py:33:5: warning[possibly-unbound-implicit-call] Method `__setitem__` of type `Unknown | floating[Any]` is possibly unbound
- Found 6394 diagnostics
+ Found 6383 diagnostics
No memory usage changes detected ✅

@github-actions
Copy link
Contributor

ecosystem-analyzer results

Lint rule Added Removed Changed
invalid-argument-type 57 5 0
possibly-unbound-attribute 9 29 0
too-many-positional-arguments 0 11 0
non-subscriptable 2 8 0
invalid-assignment 7 0 0
invalid-return-type 3 4 0
not-iterable 0 5 0
no-matching-overload 2 0 0
unused-ignore-comment 1 1 0
index-out-of-bounds 0 1 0
possibly-unbound-implicit-call 0 1 0
Total 81 65 0

Full report with detailed diff

@dcreager dcreager closed this Oct 2, 2025
@dcreager dcreager deleted the dcreager/non-inferable branch October 2, 2025 00:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ecosystem-analyzer internal An internal refactor or improvement ty Multi-file analysis & type inference

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant