Skip to content

[ty] Update SpecializationBuilder hook to get both lower/upper bounds#23848

Merged
dcreager merged 21 commits intomainfrom
dcreager/solutions-hook
Mar 24, 2026
Merged

[ty] Update SpecializationBuilder hook to get both lower/upper bounds#23848
dcreager merged 21 commits intomainfrom
dcreager/solutions-hook

Conversation

@dcreager
Copy link
Copy Markdown
Member

@dcreager dcreager commented Mar 10, 2026

This is a refactoring in support of astral-sh/ty#2799. The eventual goal is to use a ConstraintSet to hold the pending specialization being built in SpecializationBuilder. That will automatically cause us to combine mappings with union or intersection as appropriate.

This PR removes several methods from the SpecializationBuilder API:

  • mapped is removed in favor of a new build_with that applies the mapping while constructing the specialization. The callback is updated to receive the typevar's lower/upper bound from (eventually) the constraint set solution. (For now, we just give it both types from the pending hash map.)

  • infer_reverse and friends are removed in favor of constructing a constraint set directly via when_constraint_set_assignable_to. The reverse inference was used to apply our inference logic with the formal/actual reversed. Constraint set assignability handles that just fine.

  • type_mappings and into_type_mappings are also removed. These were used to consume the resut of the infer_reverse calls. We can replace that by consuming the constraint set created by the assignability check. This requires a solutions wrapper that takes in a similar hook callback as above.

@dcreager dcreager added internal An internal refactor or improvement ty Multi-file analysis & type inference labels Mar 10, 2026
@astral-sh-bot
Copy link
Copy Markdown

astral-sh-bot bot commented Mar 10, 2026

Typing conformance results

No changes detected ✅

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

@astral-sh-bot
Copy link
Copy Markdown

astral-sh-bot bot commented Mar 10, 2026

mypy_primer results

Changes were detected when running on open source projects
aioredis (https://github.com/aio-libs/aioredis)
- aioredis/client.py:4114:55: error[invalid-assignment] Object of type `dict[bytes | str | memoryview[int], Any | None]` is not assignable to `dict[bytes | str | memoryview[int], (dict[str, str], /) -> Awaitable[None]]`
+ aioredis/client.py:4114:55: error[invalid-assignment] Object of type `dict[Unknown, Any | None]` is not assignable to `dict[bytes | str | memoryview[int], (dict[str, str], /) -> Awaitable[None]]`

anyio (https://github.com/agronholm/anyio)
- src/anyio/_core/_fileio.py:190:22: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `IO[str]`, found `TextIOWrapper[_WrappedBuffer] | BinaryIO | IO[Any]`
- src/anyio/_core/_fileio.py:634:26: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `IO[str]`, found `TextIOWrapper[_WrappedBuffer] | BinaryIO | IO[Any]`
- Found 92 diagnostics
+ Found 90 diagnostics

paasta (https://github.com/yelp/paasta)
- paasta_tools/tron_tools.py:572:16: error[invalid-return-type] Return type does not match returned value: expected `dict[str, FieldSelectorConfig]`, found `dict[str, FieldSelectorConfig | dict[str, str]]`
+ paasta_tools/tron_tools.py:572:16: error[invalid-return-type] Return type does not match returned value: expected `dict[str, FieldSelectorConfig]`, found `dict[str | FieldSelectorConfig, FieldSelectorConfig | dict[str, str]]`

mongo-python-driver (https://github.com/mongodb/mongo-python-driver)
- bson/json_util.py:1002: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:1002:9: error[invalid-assignment] Invalid subscript assignment with key of type `object` and value of type `type | ((Any, JSONOptions, /) -> Any)` on object of type `dict[int, (Any, JSONOptions, /) -> Any]`

xarray (https://github.com/pydata/xarray)
- xarray/core/groupby.py:501:36: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `DataArray`, found `T_DataWithCoords@_resolve_group`
- Found 1713 diagnostics
+ Found 1712 diagnostics

prefect (https://github.com/PrefectHQ/prefect)
+ src/prefect/_internal/concurrency/api.py:41:16: error[invalid-return-type] Return type does not match returned value: expected `Call[T@cast_to_call]`, found `Call[Awaitable[T@cast_to_call] | T@cast_to_call]`
+ src/prefect/runtime/flow_run.py:70:5: error[invalid-assignment] Object of type `dict[<class 'bool'> | <class 'int'> | <class 'float'> | ... omitted 3 union elements, ((x) -> Unknown) | <class 'int'> | <class 'float'> | <class 'str'> | ((dt: str) -> datetime)]` is not assignable to `dict[type[int | float | str | Unknown] | <class 'NoneType'>, (Any, /) -> Any]`
- Found 5890 diagnostics
+ Found 5892 diagnostics

dd-trace-py (https://github.com/DataDog/dd-trace-py)
- setup.py:1291:5: error[invalid-argument-type] Argument to function `setup` is incorrect: Expected `_MutableDictLike[str, type[Command]]`, found `dict[str, <class 'CustomBuildExt'> | <class 'LibraryDownloader'> | <class 'CustomBuildRust'> | <class 'CleanLibraries'> | <class 'ExtensionHashes'>]`
- Found 9284 diagnostics
+ Found 9283 diagnostics

ibis (https://github.com/ibis-project/ibis)
- ibis/backends/athena/__init__.py:583:13: error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown]`
+ ibis/backends/athena/__init__.py:583:13: error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown | DataType]`
- ibis/backends/bigquery/datatypes.py:67:27: error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown]`
+ ibis/backends/bigquery/datatypes.py:67:27: error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, DataType]`
- ibis/backends/bigquery/tests/unit/test_compiler.py:273:26: error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown]`
+ ibis/backends/bigquery/tests/unit/test_compiler.py:273:26: error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[str, str]`
- ibis/backends/databricks/__init__.py:82:9: error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown]`
+ ibis/backends/databricks/__init__.py:82:9: error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Any, DataType]`
- ibis/backends/databricks/__init__.py:608:13: error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown]`
+ ibis/backends/databricks/__init__.py:608:13: error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown | DataType]`
- ibis/backends/databricks/tests/test_datatypes.py:19:9: error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown]`
+ ibis/backends/databricks/tests/test_datatypes.py:19:9: error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[str, str | Struct]`
- ibis/backends/datafusion/__init__.py:544:13: error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown]`
+ ibis/backends/datafusion/__init__.py:544:13: error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[str, DataType]`
- ibis/backends/duckdb/__init__.py:340:13: error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown]`
+ ibis/backends/duckdb/__init__.py:340:13: error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown | DataType]`
- ibis/backends/duckdb/__init__.py:1734:13: error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown]`
+ ibis/backends/duckdb/__init__.py:1734:13: error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown | DataType]`
- ibis/backends/exasol/__init__.py:274:13: error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown]`
+ ibis/backends/exasol/__init__.py:274:13: error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown | DataType]`
- ibis/backends/flink/tests/test_ddl.py:262:9: error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown]`
+ ibis/backends/flink/tests/test_ddl.py:262:9: error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[str, Unknown]`
- ibis/backends/flink/tests/test_ddl.py:456:30: error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown]`
+ ibis/backends/flink/tests/test_ddl.py:456:30: error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[str, String | Int64 | Float64]`
- ibis/backends/flink/tests/test_ddl.py:484:34: error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown]`
+ ibis/backends/flink/tests/test_ddl.py:484:34: error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[str, String | Int64]`
- ibis/backends/flink/tests/test_ddl.py:486:24: error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown]`
+ ibis/backends/flink/tests/test_ddl.py:486:24: error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[str, String | Int64 | Float64]`
- ibis/backends/materialize/__init__.py:395:17: error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown]`
+ ibis/backends/materialize/__init__.py:395:17: error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown | DataType]`
- ibis/backends/materialize/__init__.py:438:13: error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown]`
+ ibis/backends/materialize/__init__.py:438:13: error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown | DataType]`
- ibis/backends/oracle/tests/test_datatypes.py:29:45: error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown]`
+ ibis/backends/oracle/tests/test_datatypes.py:29:45: error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[str, str]`
- ibis/backends/oracle/tests/test_datatypes.py:53:9: error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown]`
+ ibis/backends/oracle/tests/test_datatypes.py:53:9: error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[str, str]`
- ibis/backends/polars/rewrites.py:33:13: error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown]`
+ ibis/backends/polars/rewrites.py:33:13: error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, DataType]`
- ibis/backends/postgres/__init__.py:497:13: error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown]`
+ ibis/backends/postgres/__init__.py:497:13: error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown | DataType]`
- ibis/backends/risingwave/__init__.py:309:13: error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown]`
+ ibis/backends/risingwave/__init__.py:309:13: error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown | DataType]`
- ibis/backends/snowflake/__init__.py:575:13: error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown]`
+ ibis/backends/snowflake/__init__.py:575:13: error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown | DataType]`
- ibis/backends/snowflake/__init__.py:591:13: error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown]`
+ ibis/backends/snowflake/__init__.py:591:13: error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown | DataType]`
- ibis/backends/sqlite/__init__.py:276:13: error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown]`
+ ibis/backends/sqlite/__init__.py:276:13: error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Any, DataType]`
- ibis/backends/tests/test_join.py:214:57: error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown]`
+ ibis/backends/tests/test_join.py:214:57: error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[str, str]`
- ibis/backends/trino/__init__.py:184:13: error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown]`
+ ibis/backends/trino/__init__.py:184:13: error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown | DataType]`
- ibis/backends/trino/__init__.py:345:13: error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown]`
+ ibis/backends/trino/__init__.py:345:13: error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown | DataType]`
- ibis/expr/tests/test_api.py:20:28: error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown]`
+ ibis/expr/tests/test_api.py:20:28: error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[str, str]`
- ibis/expr/tests/test_format.py:366:24: error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, Value[Unknown, Any]]`, found `dict[Unknown, Unknown]`
+ ibis/expr/tests/test_format.py:366:24: error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, Value[Unknown, Any]]`, found `dict[str, Unknown]`
- ibis/expr/tests/test_newrels.py:66:9: error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown]`
+ ibis/expr/tests/test_newrels.py:66:9: error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[str, Boolean | Int64 | Float64 | String]`
- ibis/expr/tests/test_newrels.py:86:39: error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown]`
+ ibis/expr/tests/test_newrels.py:86:39: error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[str, Int64]`
- ibis/expr/tests/test_newrels.py:91:39: error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown]`
+ ibis/expr/tests/test_newrels.py:91:39: error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[str, Int64]`
- ibis/expr/tests/test_newrels.py:96:39: error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown]`
+ ibis/expr/tests/test_newrels.py:96:39: error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[str, Int64]`
- ibis/expr/tests/test_newrels.py:107:39: error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown]`
+ ibis/expr/tests/test_newrels.py:107:39: error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[str, Int64]`
- ibis/expr/tests/test_newrels.py:116:9: error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown]`
+ ibis/expr/tests/test_newrels.py:116:9: error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[str, Int8 | Float64 | Int32]`
- ibis/expr/tests/test_schema.py:124:9: error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown]`
+ ibis/expr/tests/test_schema.py:124:9: error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[str, Int64 | String | Float64 | Boolean]`
- ibis/expr/tests/test_schema.py:181:9: error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown]`
+ ibis/expr/tests/test_schema.py:181:9: error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[str, str]`
- ibis/expr/tests/test_schema.py:233:5: error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown]`
+ ibis/expr/tests/test_schema.py:233:5: error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[str, str]`
- ibis/expr/tests/test_schema.py:326:20: error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown]`
+ ibis/expr/tests/test_schema.py:326:20: error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[str, Int64 | Array[Unknown]]`
- ibis/expr/tests/test_schema.py:334:20: error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown]`
+ ibis/expr/tests/test_schema.py:334:20: error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[str, String | Int64 | Float64]`
- ibis/expr/tests/test_schema.py:335:20: error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown]`
+ ibis/expr/tests/test_schema.py:335:20: error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[str, String | Float64 | Boolean | Date]`
- ibis/expr/tests/test_schema.py:336:20: error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown]`
+ ibis/expr/tests/test_schema.py:336:20: error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[str, Int64 | Float64 | String]`
- ibis/expr/tests/test_schema.py:337:20: error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown]`
+ ibis/expr/tests/test_schema.py:337:20: error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[str, Int64 | Float64 | String | Boolean]`
- ibis/expr/tests/test_schema.py:339:32: error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown]`
+ ibis/expr/tests/test_schema.py:339:32: error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[str, String | Float64]`
- ibis/expr/tests/test_schema.py:341:9: error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown]`
+ ibis/expr/tests/test_schema.py:341:9: error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[str, String | Int64 | Float64 | Boolean | Date]`
- ibis/expr/tests/test_schema.py:343:32: error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown]`
+ ibis/expr/tests/test_schema.py:343:32: error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[str, Int64]`
- ibis/expr/tests/test_schema.py:344:32: error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown]`
+ ibis/expr/tests/test_schema.py:344:32: error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[str, Boolean | Date]`
- ibis/expr/tests/test_schema.py:345:32: error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown]`
+ ibis/expr/tests/test_schema.py:345:32: error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[str, Int64 | Boolean | Date]`
- ibis/expr/tests/test_schema.py:374:28: error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown]`
+ ibis/expr/tests/test_schema.py:374:28: error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[str, Int64 | String | Boolean]`
- ibis/expr/tests/test_schema.py:385:30: error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown]`
+ ibis/expr/tests/test_schema.py:385:30: error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[str, Int64 | String | Boolean]`
- ibis/expr/tests/test_schema.py:402:38: error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown]`
+ ibis/expr/tests/test_schema.py:402:38: error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[str, Int64 | String | Boolean]`
- ibis/expr/tests/test_schema.py:431:9: error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown]`
+ ibis/expr/tests/test_schema.py:431:9: error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[str, Int64 | String | Timestamp]`
- ibis/expr/tests/test_schema.py:594:9: error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown]`
+ ibis/expr/tests/test_schema.py:594:9: error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[str, Int64 | Int32 | Int16 | ... omitted 14 union elements]`
- ibis/expr/types/generic.py:1554:35: error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, Value[Unknown, Any]]`, found `dict[Unknown, Unknown]`
+ ibis/expr/types/generic.py:1554:35: error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, Value[Unknown, Any]]`, found `dict[Unknown, Value[Unknown, Any]]`
- ibis/expr/types/generic.py:1774:35: error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, Value[Unknown, Any]]`, found `dict[Unknown, Unknown]`
+ ibis/expr/types/generic.py:1774:35: error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, Value[Unknown, Any]]`, found `dict[Unknown, Value[Unknown, Any]]`
- ibis/formats/pandas.py:168:55: error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown]`
+ ibis/formats/pandas.py:168:55: error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[str, Unknown]`
- ibis/formats/polars.py:156:43: error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown]`
+ ibis/formats/polars.py:156:43: error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, DataType]`
- ibis/formats/polars.py:162:43: error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown]`
+ ibis/formats/polars.py:162:43: error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, DataType]`
- ibis/formats/tests/test_pandas.py:125:9: error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown]`
+ ibis/formats/tests/test_pandas.py:125:9: error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[str, Int64 | String | Boolean | Float64]`
- ibis/formats/tests/test_pandas.py:152:9: error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown]`
+ ibis/formats/tests/test_pandas.py:152:9: error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[str, Int64 | String | Boolean | Float64]`
- ibis/formats/tests/test_pandas.py:441:27: error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown]`
+ ibis/formats/tests/test_pandas.py:441:27: error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[str, Unknown]`
- ibis/formats/tests/test_pandas.py:457:25: error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown]`
+ ibis/formats/tests/test_pandas.py:457:25: error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[str, str]`
- ibis/tests/expr/test_table.py:1161:28: error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown]`
+ ibis/tests/expr/test_table.py:1161:28: error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[str, str]`
- ibis/tests/expr/test_table.py:1224:29: error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown]`
+ ibis/tests/expr/test_table.py:1224:29: error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[str, str]`

pandas (https://github.com/pandas-dev/pandas)
- pandas/tests/io/formats/style/test_style.py:781:9: error[invalid-assignment] Object of type `dict[tuple[int, int], list[tuple[str, str | int | float]]]` is not assignable to attribute `ctx` of type `defaultdict[tuple[int, int], list[tuple[str, str | int | float]]]`
- pandas/tests/io/formats/style/test_style.py:793:9: error[invalid-assignment] Object of type `dict[tuple[int, int], list[tuple[str, str | int | float]]]` is not assignable to attribute `ctx` of type `defaultdict[tuple[int, int], list[tuple[str, str | int | float]]]`
+ pandas/tests/io/formats/style/test_style.py:781:9: error[invalid-assignment] Object of type `dict[tuple[int, int], list[tuple[str, str]]]` is not assignable to attribute `ctx` of type `defaultdict[tuple[int, int], list[tuple[str, str | int | float]]]`
+ pandas/tests/io/formats/style/test_style.py:793:9: error[invalid-assignment] Object of type `dict[tuple[int, int], list[tuple[str, str]]]` is not assignable to attribute `ctx` of type `defaultdict[tuple[int, int], list[tuple[str, str | int | float]]]`

core (https://github.com/home-assistant/core)
+ homeassistant/core.py:624:43: error[invalid-argument-type] Argument to bound method `async_create_task` is incorrect: Expected `Coroutine[Any, Any, _R@async_add_job]`, found `(((...) -> Coroutine[Any, Any, _R@async_add_job] | _R@async_add_job) & Coroutine[object, Never, object]) | Coroutine[Any, Any, _R@async_add_job]`
+ homeassistant/core.py:951:43: error[invalid-argument-type] Argument to bound method `async_create_task` is incorrect: Expected `Coroutine[Any, Any, _R@async_run_job]`, found `(((...) -> Coroutine[Any, Any, _R@async_run_job] | _R@async_run_job) & Coroutine[object, Never, object]) | Coroutine[Any, Any, _R@async_run_job]`
+ homeassistant/helpers/service.py:918:18: error[invalid-assignment] Object of type `object` is not assignable to `ServiceResponse`
- Found 12091 diagnostics
+ Found 12094 diagnostics

pandas-stubs (https://github.com/pandas-dev/pandas-stubs)
+ tests/arrays/test_base_string_.py:100:9: error[type-assertion-failure] Type `ArrowStringArray` does not match asserted type `BaseStringArray[None]`
+ tests/arrays/test_base_string_.py:103:9: error[type-assertion-failure] Type `ArrowStringArray` does not match asserted type `BaseStringArray[None]`
+ tests/arrays/test_base_string_.py:106:9: error[type-assertion-failure] Type `ArrowStringArray` does not match asserted type `BaseStringArray[None]`
+ tests/arrays/test_base_string_.py:109:9: error[type-assertion-failure] Type `ArrowStringArray` does not match asserted type `BaseStringArray[None]`
+ tests/arrays/test_base_string_.py:112:9: error[type-assertion-failure] Type `ArrowStringArray` does not match asserted type `BaseStringArray[None]`
+ tests/arrays/test_base_string_.py:115:9: error[type-assertion-failure] Type `ArrowStringArray` does not match asserted type `BaseStringArray[None]`
+ tests/arrays/test_base_string_.py:118:9: error[type-assertion-failure] Type `ArrowStringArray` does not match asserted type `BaseStringArray[None]`
+ tests/arrays/test_base_string_.py:123:9: error[type-assertion-failure] Type `ArrowStringArray` does not match asserted type `BaseStringArray[None]`
+ tests/arrays/test_base_string_.py:126:9: error[type-assertion-failure] Type `ArrowStringArray` does not match asserted type `BaseStringArray[None]`
+ tests/arrays/test_base_string_.py:143:11: error[type-assertion-failure] Type `ArrowStringArray` does not match asserted type `BaseStringArray[None]`
- tests/arrays/test_string_.py:41:9: error[type-assertion-failure] Type `BaseStringArray[None]` does not match asserted type `StringArray`
+ tests/arrays/test_string_.py:41:9: error[type-assertion-failure] Type `ArrowStringArray` does not match asserted type `StringArray`
- tests/arrays/test_string_.py:44:9: error[type-assertion-failure] Type `BaseStringArray[None]` does not match asserted type `StringArray`
+ tests/arrays/test_string_.py:44:9: error[type-assertion-failure] Type `ArrowStringArray` does not match asserted type `StringArray`
- tests/arrays/test_string_.py:47:9: error[type-assertion-failure] Type `BaseStringArray[None]` does not match asserted type `StringArray`
+ tests/arrays/test_string_.py:47:9: error[type-assertion-failure] Type `ArrowStringArray` does not match asserted type `StringArray`
- tests/arrays/test_string_.py:50:9: error[type-assertion-failure] Type `BaseStringArray[None]` does not match asserted type `StringArray`
+ tests/arrays/test_string_.py:50:9: error[type-assertion-failure] Type `ArrowStringArray` does not match asserted type `StringArray`
- tests/arrays/test_string_.py:53:9: error[type-assertion-failure] Type `BaseStringArray[None]` does not match asserted type `StringArray`
+ tests/arrays/test_string_.py:53:9: error[type-assertion-failure] Type `ArrowStringArray` does not match asserted type `StringArray`
- tests/arrays/test_string_.py:56:9: error[type-assertion-failure] Type `BaseStringArray[None]` does not match asserted type `StringArray`
+ tests/arrays/test_string_.py:56:9: error[type-assertion-failure] Type `ArrowStringArray` does not match asserted type `StringArray`
- tests/arrays/test_string_.py:59:9: error[type-assertion-failure] Type `BaseStringArray[None]` does not match asserted type `StringArray`
+ tests/arrays/test_string_.py:59:9: error[type-assertion-failure] Type `ArrowStringArray` does not match asserted type `StringArray`
- tests/arrays/test_string_.py:67:9: error[type-assertion-failure] Type `BaseStringArray[None]` does not match asserted type `StringArray`
+ tests/arrays/test_string_.py:67:9: error[type-assertion-failure] Type `ArrowStringArray` does not match asserted type `StringArray`
- tests/arrays/test_string_.py:72:9: error[type-assertion-failure] Type `BaseStringArray[None]` does not match asserted type `StringArray`
+ tests/arrays/test_string_.py:72:9: error[type-assertion-failure] Type `ArrowStringArray` does not match asserted type `StringArray`
- tests/arrays/test_string_arrow.py:39:9: error[type-assertion-failure] Type `BaseStringArray[None]` does not match asserted type `ArrowStringArray`
- tests/arrays/test_string_arrow.py:42:9: error[type-assertion-failure] Type `BaseStringArray[None]` does not match asserted type `ArrowStringArray`
- tests/arrays/test_string_arrow.py:45:9: error[type-assertion-failure] Type `BaseStringArray[None]` does not match asserted type `ArrowStringArray`
- tests/arrays/test_string_arrow.py:48:9: error[type-assertion-failure] Type `BaseStringArray[None]` does not match asserted type `ArrowStringArray`
- tests/arrays/test_string_arrow.py:51:9: error[type-assertion-failure] Type `BaseStringArray[None]` does not match asserted type `ArrowStringArray`
- tests/arrays/test_string_arrow.py:56:9: error[type-assertion-failure] Type `BaseStringArray[None]` does not match asserted type `ArrowStringArray`
- tests/arrays/test_string_arrow.py:61:9: error[type-assertion-failure] Type `BaseStringArray[None]` does not match asserted type `ArrowStringArray`
- tests/arrays/test_string_arrow.py:69:9: error[type-assertion-failure] Type `BaseStringArray[None]` does not match asserted type `ArrowStringArray`
- tests/arrays/test_string_arrow.py:77:9: error[type-assertion-failure] Type `BaseStringArray[None]` does not match asserted type `ArrowStringArray`
+ tests/frame/test_frame.py:3813:9: error[type-assertion-failure] Type `Unknown` is not equivalent to `Never`
+ tests/test_groupby.py:137:9: error[type-assertion-failure] Type `Unknown` does not match asserted type `DataFrame`
+ tests/test_groupby.py:138:13: error[no-matching-overload] No overload of bound method `aggregate` matches arguments
+ tests/test_groupby.py:138:13: error[no-matching-overload] No overload of bound method `aggregate` matches arguments
+ tests/test_groupby.py:138:13: error[no-matching-overload] No overload of bound method `aggregate` matches arguments
+ tests/test_groupby.py:168:9: error[no-matching-overload] No overload of bound method `aggregate` matches arguments
+ tests/test_groupby.py:168:9: error[no-matching-overload] No overload of bound method `aggregate` matches arguments
+ tests/test_groupby.py:168:9: error[no-matching-overload] No overload of bound method `aggregate` matches arguments
+ tests/test_groupby.py:172:9: error[no-matching-overload] No overload of bound method `aggregate` matches arguments
+ tests/test_groupby.py:172:9: error[no-matching-overload] No overload of bound method `aggregate` matches arguments
+ tests/test_groupby.py:172:9: error[no-matching-overload] No overload of bound method `aggregate` matches arguments
+ tests/test_groupby.py:176:9: error[no-matching-overload] No overload of bound method `aggregate` matches arguments
+ tests/test_groupby.py:176:9: error[no-matching-overload] No overload of bound method `aggregate` matches arguments
+ tests/test_groupby.py:176:9: error[no-matching-overload] No overload of bound method `aggregate` matches arguments
+ tests/test_resampler.py:109:9: error[type-assertion-failure] Type `Unknown` does not match asserted type `DataFrame`
+ tests/test_resampler.py:110:13: error[no-matching-overload] No overload of bound method `aggregate` matches arguments
+ tests/test_resampler.py:402:9: error[no-matching-overload] No overload of bound method `aggregate` matches arguments
+ tests/test_resampler.py:406:9: error[no-matching-overload] No overload of bound method `aggregate` matches arguments
+ tests/test_resampler.py:410:9: error[no-matching-overload] No overload of bound method `aggregate` matches arguments
- Found 4759 diagnostics
+ Found 4779 diagnostics

meson (https://github.com/mesonbuild/meson)
- mesonbuild/cmake/interpreter.py:1013:70: error[invalid-argument-type] Argument is incorrect: Expected `int`, found `str | int | Path | BaseNode`
+ mesonbuild/mparser.py:683:47: error[invalid-assignment] Object of type `dict[str, str]` is not assignable to `Mapping[str, Literal["==", "!=", "<", "<=", ">=", ... omitted 3 literals]]`
+ mesonbuild/mparser.py:694:47: error[invalid-assignment] Object of type `dict[str, str]` is not assignable to `Mapping[str, Literal["+", "-", "*", "/", "%"]]`
+ mesonbuild/mparser.py:699:47: error[invalid-assignment] Object of type `dict[str, str]` is not assignable to `Mapping[str, Literal["+", "-", "*", "/", "%"]]`
- mesonbuild/mparser.py:725:65: error[invalid-argument-type] Argument is incorrect: Expected `int`, found `None`
- Found 2356 diagnostics
+ Found 2357 diagnostics

@astral-sh-bot
Copy link
Copy Markdown

astral-sh-bot bot commented Mar 10, 2026

Memory usage report

Summary

Project Old New Diff Outcome
flake8 48.16MB 48.13MB -0.06% (30.57kB) ⬇️
trio 116.12MB 115.93MB -0.17% (201.32kB) ⬇️
sphinx 263.10MB 262.80MB -0.11% (303.89kB) ⬇️
prefect 705.17MB 703.68MB -0.21% (1.50MB) ⬇️

Significant changes

Click to expand detailed breakdown

flake8

Name Old New Diff Outcome
StaticClassLiteral<'db>::try_mro_ 335.36kB 322.89kB -3.72% (12.46kB) ⬇️
infer_scope_types_impl 1002.95kB 996.02kB -0.69% (6.93kB) ⬇️
infer_definition_types 1.95MB 1.94MB -0.28% (5.65kB) ⬇️
Specialization 164.64kB 160.72kB -2.38% (3.92kB) ⬇️
UnionType<'db>::from_two_elements_::interned_arguments 48.04kB 51.91kB +8.05% (3.87kB) ⬇️
is_redundant_with_impl::interned_arguments 136.38kB 139.56kB +2.33% (3.18kB) ⬇️
IntersectionType<'db>::from_two_elements_ 1.35kB 4.40kB +225.72% (3.05kB) ⬇️
IntersectionType<'db>::from_two_elements_::interned_arguments 704.00B 3.70kB +437.50% (3.01kB) ⬇️
inferable_typevars_inner 26.00kB 23.00kB -11.54% (3.00kB) ⬇️
infer_expression_types_impl 1.03MB 1.03MB -0.28% (2.93kB) ⬇️
StaticClassLiteral<'db>::try_mro_::interned_arguments 75.94kB 73.12kB -3.70% (2.81kB) ⬇️
UnionType<'db>::from_two_elements_ 80.95kB 83.54kB +3.20% (2.59kB) ⬇️
GenericAlias 73.41kB 71.16kB -3.07% (2.25kB) ⬇️
is_redundant_with_impl 138.26kB 136.18kB -1.50% (2.07kB) ⬇️
Type<'db>::try_call_dunder_get_ 375.43kB 376.75kB +0.35% (1.32kB) ⬇️
... 40 more

trio

Name Old New Diff Outcome
infer_expression_types_impl 6.06MB 6.01MB -0.81% (50.04kB) ⬇️
StaticClassLiteral<'db>::try_mro_ 859.24kB 821.97kB -4.34% (37.27kB) ⬇️
infer_definition_types 7.52MB 7.50MB -0.30% (23.02kB) ⬇️
is_redundant_with_impl::interned_arguments 519.66kB 534.02kB +2.76% (14.35kB) ⬇️
FunctionType 1.49MB 1.48MB -0.86% (13.08kB) ⬇️
Specialization 473.05kB 460.45kB -2.66% (12.59kB) ⬇️
UnionType<'db>::from_two_elements_::interned_arguments 155.12kB 166.63kB +7.42% (11.52kB) ⬇️
CallableType 490.56kB 480.65kB -2.02% (9.91kB) ⬇️
infer_expression_type_impl 1.41MB 1.40MB -0.62% (8.92kB) ⬇️
IntersectionType<'db>::from_two_elements_ 8.98kB 17.66kB +96.61% (8.68kB) ⬇️
UnionType<'db>::from_two_elements_ 272.09kB 280.75kB +3.18% (8.66kB) ⬇️
IntersectionType<'db>::from_two_elements_::interned_arguments 4.55kB 12.98kB +184.91% (8.42kB) ⬇️
infer_scope_types_impl 4.76MB 4.76MB -0.17% (8.18kB) ⬇️
StaticClassLiteral<'db>::try_mro_::interned_arguments 199.76kB 191.67kB -4.05% (8.09kB) ⬇️
Type<'db>::try_call_dunder_get_ 1.37MB 1.36MB -0.55% (7.66kB) ⬇️
... 45 more

sphinx

Name Old New Diff Outcome
infer_expression_types_impl 19.85MB 19.62MB -1.12% (228.44kB) ⬇️
infer_definition_types 24.44MB 24.34MB -0.43% (108.52kB) ⬇️
infer_scope_types_impl 15.55MB 15.50MB -0.33% (52.14kB) ⬇️
UnionType<'db>::from_two_elements_::interned_arguments 743.36kB 783.32kB +5.38% (39.96kB) ⬇️
StaticClassLiteral<'db>::try_mro_ 2.10MB 2.06MB -1.64% (35.15kB) ⬇️
is_redundant_with_impl::interned_arguments 1.99MB 2.02MB +1.68% (34.29kB) ⬇️
UnionType<'db>::from_two_elements_ 1.36MB 1.39MB +2.12% (29.50kB) ⬇️
IntersectionType<'db>::from_two_elements_ 6.71kB 35.03kB +421.64% (28.31kB) ⬇️
IntersectionType<'db>::from_two_elements_::interned_arguments 4.12kB 31.20kB +656.25% (27.07kB) ⬇️
infer_expression_type_impl 3.58MB 3.57MB -0.38% (14.10kB) ⬇️
infer_unpack_types 453.82kB 440.18kB -3.01% (13.64kB) ⬇️
all_negative_narrowing_constraints_for_expression 1.09MB 1.08MB -1.03% (11.51kB) ⬇️
CallableType 932.08kB 942.91kB +1.16% (10.83kB) ⬇️
all_narrowing_constraints_for_expression 2.49MB 2.48MB -0.42% (10.71kB) ⬇️
FunctionType 3.09MB 3.10MB +0.29% (9.05kB) ⬇️
... 50 more

prefect

Name Old New Diff Outcome
infer_definition_types 90.88MB 90.50MB -0.43% (395.85kB) ⬇️
infer_expression_types_impl 56.22MB 55.83MB -0.68% (391.54kB) ⬇️
StaticClassLiteral<'db>::try_mro_ 6.12MB 5.83MB -4.72% (295.90kB) ⬇️
is_redundant_with_impl 5.58MB 5.45MB -2.33% (133.37kB) ⬇️
infer_scope_types_impl 53.60MB 53.49MB -0.20% (111.89kB) ⬇️
infer_expression_type_impl 14.00MB 13.91MB -0.67% (95.72kB) ⬇️
Specialization 2.54MB 2.47MB -2.57% (66.86kB) ⬇️
is_redundant_with_impl::interned_arguments 5.34MB 5.41MB +1.13% (62.05kB) ⬇️
UnionType<'db>::from_two_elements_::interned_arguments 2.39MB 2.45MB +2.49% (60.84kB) ⬇️
StaticClassLiteral<'db>::try_mro_::interned_arguments 1.41MB 1.36MB -4.06% (58.78kB) ⬇️
UnionType<'db>::from_two_elements_ 5.20MB 5.24MB +0.92% (49.05kB) ⬇️
StaticClassLiteral<'db>::implicit_attribute_inner_ 10.06MB 10.02MB -0.40% (41.04kB) ⬇️
GenericAlias 1.18MB 1.14MB -3.32% (40.15kB) ⬇️
Type<'db>::member_lookup_with_policy_ 16.27MB 16.23MB -0.22% (37.09kB) ⬇️
IntersectionType<'db>::from_two_elements_ 7.80kB 42.96kB +451.00% (35.16kB) ⬇️
... 52 more

@dcreager dcreager force-pushed the dcreager/solutions-hook branch from bdbe546 to 38c8dc4 Compare March 10, 2026 00:47
@dcreager dcreager marked this pull request as ready for review March 10, 2026 00:51
@astral-sh-bot
Copy link
Copy Markdown

astral-sh-bot bot commented Mar 10, 2026

ecosystem-analyzer results

Lint rule Added Removed Changed
invalid-argument-type 3 16 64
no-matching-overload 16 35 0
invalid-await 40 0 0
type-assertion-failure 15 9 9
invalid-assignment 5 4 4
invalid-return-type 2 0 1
unused-type-ignore-comment 1 1 0
Total 82 65 78

Large timing changes:

Project Old Time New Time Change
pandera 0.31s 0.73s +139%
mitmproxy 0.26s 0.45s +70%

Changes in flaky projects detected. Raw diff output excludes flaky projects; see the HTML report for details.

Raw diff (183 changes)
aioredis (https://github.com/aio-libs/aioredis)
- aioredis/client.py:4114:55 error[invalid-assignment] Object of type `dict[bytes | str | memoryview[int], Any | None]` is not assignable to `dict[bytes | str | memoryview[int], (dict[str, str], /) -> Awaitable[None]]`
+ aioredis/client.py:4114:55 error[invalid-assignment] Object of type `dict[Unknown, Any | None]` is not assignable to `dict[bytes | str | memoryview[int], (dict[str, str], /) -> Awaitable[None]]`

anyio (https://github.com/agronholm/anyio)
- src/anyio/_core/_fileio.py:190:22 error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `IO[str]`, found `TextIOWrapper[_WrappedBuffer] | BinaryIO | IO[Any]`
- src/anyio/_core/_fileio.py:634:26 error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `IO[str]`, found `TextIOWrapper[_WrappedBuffer] | BinaryIO | IO[Any]`

bokeh (https://github.com/bokeh/bokeh)
- src/bokeh/layouts.py:671:21 error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Iterable[L@_parse_children_arg]`, found `tuple[L@_parse_children_arg | list[L@_parse_children_arg], ...]`
+ src/bokeh/layouts.py:671:16 error[invalid-return-type] Return type does not match returned value: expected `list[L@_parse_children_arg]`, found `list[L@_parse_children_arg | list[L@_parse_children_arg]]`

colour (https://github.com/colour-science/colour)
+ colour/appearance/scam.py:461:73 warning[unused-type-ignore-comment] Unused blanket `type: ignore` directive
- colour/graph/conversion.py:476:19 error[invalid-argument-type] Argument to function `tstack` is incorrect: Expected `_Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | ... omitted 5 union elements`, found `list[int | float | ndarray[tuple[Any, ...], dtype[floating[_16Bit] | floating[_32Bit] | float64]] | None]`
- colour/graph/conversion.py:598:19 error[invalid-argument-type] Argument to function `tstack` is incorrect: Expected `_Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | ... omitted 5 union elements`, found `list[int | float | ndarray[tuple[Any, ...], dtype[floating[_16Bit] | floating[_32Bit] | float64]] | None]`
- colour/graph/conversion.py:728:19 error[invalid-argument-type] Argument to function `tstack` is incorrect: Expected `_Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | ... omitted 5 union elements`, found `list[int | float | ndarray[tuple[Any, ...], dtype[floating[_16Bit] | floating[_32Bit] | float64]] | None]`
- colour/graph/conversion.py:866:19 error[invalid-argument-type] Argument to function `tstack` is incorrect: Expected `_Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | ... omitted 5 union elements`, found `list[int | float | ndarray[tuple[Any, ...], dtype[floating[_16Bit] | floating[_32Bit] | float64]] | None]`
- colour/notation/munsell/centore2014.py:685:21 error[invalid-argument-type] Argument to function `_munsell_specification_to_xyY` is incorrect: Expected `_Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | ... omitted 5 union elements`, found `list[Unknown | ndarray[tuple[Any, ...], dtype[floating[_16Bit] | floating[_32Bit] | float64]] | Divergent | int | float]`
- colour/notation/munsell/centore2014.py:750:13 error[invalid-argument-type] Argument to function `maximum_chroma_from_renotation` is incorrect: Expected `_Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | ... omitted 5 union elements`, found `list[Unknown | ndarray[tuple[Any, ...], dtype[floating[_16Bit] | floating[_32Bit] | float64]] | Divergent | int | float]`
- colour/utilities/tests/test_array.py:2018:29 error[invalid-argument-type] Argument to function `has_only_nan` is incorrect: Expected `_Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | ... omitted 5 union elements`, found `list[None | Unknown]`
- colour/utilities/tests/test_array.py:2020:33 error[invalid-argument-type] Argument to function `has_only_nan` is incorrect: Expected `_Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | ... omitted 5 union elements`, found `list[bool | None]`

core (https://github.com/home-assistant/core)
+ homeassistant/helpers/service.py:917:18 error[invalid-assignment] Object of type `object` is not assignable to `ServiceResponse`

dd-trace-py (https://github.com/DataDog/dd-trace-py)
- setup.py:1330:5 error[invalid-argument-type] Argument to function `setup` is incorrect: Expected `_MutableDictLike[str, type[Command]]`, found `dict[str, <class 'CustomBuildExt'> | <class 'LibraryDownloader'> | <class 'CustomBuildRust'> | <class 'CleanLibraries'> | <class 'ExtensionHashes'>]`

ibis (https://github.com/ibis-project/ibis)
- ibis/backends/athena/__init__.py:583:13 error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown]`
+ ibis/backends/athena/__init__.py:583:13 error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown | DataType]`
- ibis/backends/bigquery/datatypes.py:67:27 error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown]`
+ ibis/backends/bigquery/datatypes.py:67:27 error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, DataType]`
- ibis/backends/bigquery/tests/unit/test_compiler.py:273:26 error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown]`
+ ibis/backends/bigquery/tests/unit/test_compiler.py:273:26 error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[str, str]`
- ibis/backends/databricks/__init__.py:82:9 error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown]`
+ ibis/backends/databricks/__init__.py:82:9 error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Any, DataType]`
- ibis/backends/databricks/__init__.py:608:13 error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown]`
+ ibis/backends/databricks/__init__.py:608:13 error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown | DataType]`
- ibis/backends/databricks/tests/test_datatypes.py:19:9 error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown]`
+ ibis/backends/databricks/tests/test_datatypes.py:19:9 error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[str, str | Struct]`
- ibis/backends/datafusion/__init__.py:544:13 error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown]`
+ ibis/backends/datafusion/__init__.py:544:13 error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[str, DataType]`
- ibis/backends/duckdb/__init__.py:340:13 error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown]`
+ ibis/backends/duckdb/__init__.py:340:13 error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown | DataType]`
- ibis/backends/duckdb/__init__.py:1734:13 error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown]`
+ ibis/backends/duckdb/__init__.py:1734:13 error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown | DataType]`
- ibis/backends/exasol/__init__.py:274:13 error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown]`
+ ibis/backends/exasol/__init__.py:274:13 error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown | DataType]`
- ibis/backends/flink/tests/test_ddl.py:262:9 error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown]`
+ ibis/backends/flink/tests/test_ddl.py:262:9 error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[str, Unknown]`
- ibis/backends/flink/tests/test_ddl.py:456:30 error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown]`
+ ibis/backends/flink/tests/test_ddl.py:456:30 error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[str, String | Int64 | Float64]`
- ibis/backends/flink/tests/test_ddl.py:484:34 error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown]`
+ ibis/backends/flink/tests/test_ddl.py:484:34 error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[str, String | Int64]`
- ibis/backends/flink/tests/test_ddl.py:486:24 error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown]`
+ ibis/backends/flink/tests/test_ddl.py:486:24 error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[str, String | Int64 | Float64]`
- ibis/backends/materialize/__init__.py:395:17 error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown]`
+ ibis/backends/materialize/__init__.py:395:17 error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown | DataType]`
- ibis/backends/materialize/__init__.py:438:13 error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown]`
+ ibis/backends/materialize/__init__.py:438:13 error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown | DataType]`
- ibis/backends/oracle/tests/test_datatypes.py:29:45 error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown]`
+ ibis/backends/oracle/tests/test_datatypes.py:29:45 error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[str, str]`
- ibis/backends/oracle/tests/test_datatypes.py:53:9 error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown]`
+ ibis/backends/oracle/tests/test_datatypes.py:53:9 error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[str, str]`
- ibis/backends/polars/rewrites.py:33:13 error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown]`
+ ibis/backends/polars/rewrites.py:33:13 error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, DataType]`
- ibis/backends/postgres/__init__.py:497:13 error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown]`
+ ibis/backends/postgres/__init__.py:497:13 error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown | DataType]`
- ibis/backends/risingwave/__init__.py:309:13 error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown]`
+ ibis/backends/risingwave/__init__.py:309:13 error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown | DataType]`
- ibis/backends/snowflake/__init__.py:575:13 error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown]`
+ ibis/backends/snowflake/__init__.py:575:13 error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown | DataType]`
- ibis/backends/snowflake/__init__.py:591:13 error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown]`
+ ibis/backends/snowflake/__init__.py:591:13 error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown | DataType]`
- ibis/backends/sqlite/__init__.py:276:13 error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown]`
+ ibis/backends/sqlite/__init__.py:276:13 error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Any, DataType]`
- ibis/backends/tests/test_join.py:214:57 error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown]`
+ ibis/backends/tests/test_join.py:214:57 error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[str, str]`
- ibis/backends/trino/__init__.py:184:13 error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown]`
+ ibis/backends/trino/__init__.py:184:13 error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown | DataType]`
- ibis/backends/trino/__init__.py:345:13 error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown]`
+ ibis/backends/trino/__init__.py:345:13 error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown | DataType]`
- ibis/expr/tests/test_api.py:20:28 error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown]`
+ ibis/expr/tests/test_api.py:20:28 error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[str, str]`
- ibis/expr/tests/test_format.py:366:24 error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, Value[Unknown, Any]]`, found `dict[Unknown, Unknown]`
+ ibis/expr/tests/test_format.py:366:24 error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, Value[Unknown, Any]]`, found `dict[str, Unknown]`
- ibis/expr/tests/test_newrels.py:66:9 error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown]`
+ ibis/expr/tests/test_newrels.py:66:9 error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[str, Boolean | Int64 | Float64 | String]`
- ibis/expr/tests/test_newrels.py:86:39 error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown]`
+ ibis/expr/tests/test_newrels.py:86:39 error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[str, Int64]`
- ibis/expr/tests/test_newrels.py:91:39 error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown]`
+ ibis/expr/tests/test_newrels.py:91:39 error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[str, Int64]`
- ibis/expr/tests/test_newrels.py:96:39 error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown]`
+ ibis/expr/tests/test_newrels.py:96:39 error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[str, Int64]`
- ibis/expr/tests/test_newrels.py:107:39 error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown]`
+ ibis/expr/tests/test_newrels.py:107:39 error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[str, Int64]`
- ibis/expr/tests/test_newrels.py:116:9 error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown]`
+ ibis/expr/tests/test_newrels.py:116:9 error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[str, Int8 | Float64 | Int32]`
- ibis/expr/tests/test_schema.py:124:9 error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown]`
+ ibis/expr/tests/test_schema.py:124:9 error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[str, Int64 | String | Float64 | Boolean]`
- ibis/expr/tests/test_schema.py:181:9 error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown]`
+ ibis/expr/tests/test_schema.py:181:9 error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[str, str]`
- ibis/expr/tests/test_schema.py:233:5 error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown]`
+ ibis/expr/tests/test_schema.py:233:5 error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[str, str]`
- ibis/expr/tests/test_schema.py:326:20 error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown]`
+ ibis/expr/tests/test_schema.py:326:20 error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[str, Int64 | Array[Unknown]]`
- ibis/expr/tests/test_schema.py:334:20 error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown]`
+ ibis/expr/tests/test_schema.py:334:20 error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[str, String | Int64 | Float64]`
- ibis/expr/tests/test_schema.py:335:20 error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown]`
+ ibis/expr/tests/test_schema.py:335:20 error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[str, String | Float64 | Boolean | Date]`
- ibis/expr/tests/test_schema.py:336:20 error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown]`
+ ibis/expr/tests/test_schema.py:336:20 error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[str, Int64 | Float64 | String]`
- ibis/expr/tests/test_schema.py:337:20 error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown]`
+ ibis/expr/tests/test_schema.py:337:20 error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[str, Int64 | Float64 | String | Boolean]`
- ibis/expr/tests/test_schema.py:339:32 error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown]`
+ ibis/expr/tests/test_schema.py:339:32 error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[str, String | Float64]`
- ibis/expr/tests/test_schema.py:341:9 error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown]`
+ ibis/expr/tests/test_schema.py:341:9 error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[str, String | Int64 | Float64 | Boolean | Date]`
- ibis/expr/tests/test_schema.py:343:32 error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown]`
+ ibis/expr/tests/test_schema.py:343:32 error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[str, Int64]`
- ibis/expr/tests/test_schema.py:344:32 error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown]`
+ ibis/expr/tests/test_schema.py:344:32 error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[str, Boolean | Date]`
- ibis/expr/tests/test_schema.py:345:32 error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown]`
+ ibis/expr/tests/test_schema.py:345:32 error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[str, Int64 | Boolean | Date]`
- ibis/expr/tests/test_schema.py:374:28 error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown]`
+ ibis/expr/tests/test_schema.py:374:28 error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[str, Int64 | String | Boolean]`
- ibis/expr/tests/test_schema.py:385:30 error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown]`
+ ibis/expr/tests/test_schema.py:385:30 error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[str, Int64 | String | Boolean]`
- ibis/expr/tests/test_schema.py:402:38 error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown]`
+ ibis/expr/tests/test_schema.py:402:38 error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[str, Int64 | String | Boolean]`
- ibis/expr/tests/test_schema.py:431:9 error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown]`
+ ibis/expr/tests/test_schema.py:431:9 error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[str, Int64 | String | Timestamp]`
- ibis/expr/tests/test_schema.py:594:9 error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown]`
+ ibis/expr/tests/test_schema.py:594:9 error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[str, Int64 | Int32 | Int16 | ... omitted 14 union elements]`
- ibis/expr/types/generic.py:1554:35 error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, Value[Unknown, Any]]`, found `dict[Unknown, Unknown]`
+ ibis/expr/types/generic.py:1554:35 error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, Value[Unknown, Any]]`, found `dict[Unknown, Value[Unknown, Any]]`
- ibis/expr/types/generic.py:1774:35 error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, Value[Unknown, Any]]`, found `dict[Unknown, Unknown]`
+ ibis/expr/types/generic.py:1774:35 error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, Value[Unknown, Any]]`, found `dict[Unknown, Value[Unknown, Any]]`
- ibis/formats/pandas.py:168:55 error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown]`
+ ibis/formats/pandas.py:168:55 error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[str, Unknown]`
- ibis/formats/polars.py:156:43 error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown]`
+ ibis/formats/polars.py:156:43 error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, DataType]`
- ibis/formats/polars.py:162:43 error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown]`
+ ibis/formats/polars.py:162:43 error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, DataType]`
- ibis/formats/tests/test_pandas.py:125:9 error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown]`
+ ibis/formats/tests/test_pandas.py:125:9 error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[str, Int64 | String | Boolean | Float64]`
- ibis/formats/tests/test_pandas.py:152:9 error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown]`
+ ibis/formats/tests/test_pandas.py:152:9 error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[str, Int64 | String | Boolean | Float64]`
- ibis/formats/tests/test_pandas.py:441:27 error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown]`
+ ibis/formats/tests/test_pandas.py:441:27 error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[str, Unknown]`
- ibis/formats/tests/test_pandas.py:457:25 error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown]`
+ ibis/formats/tests/test_pandas.py:457:25 error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[str, str]`
- ibis/tests/expr/test_table.py:1161:28 error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown]`
+ ibis/tests/expr/test_table.py:1161:28 error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[str, str]`
- ibis/tests/expr/test_table.py:1224:29 error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[Unknown, Unknown]`
+ ibis/tests/expr/test_table.py:1224:29 error[invalid-argument-type] Argument is incorrect: Expected `FrozenOrderedDict[str, DataType]`, found `dict[str, str]`

meson (https://github.com/mesonbuild/meson)
- mesonbuild/cmake/interpreter.py:1013:70 error[invalid-argument-type] Argument is incorrect: Expected `int`, found `str | int | Path | BaseNode`
+ mesonbuild/interpreter/type_checking.py:1021:9 error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `dict[str | ContainerTypeInfo | type, str | tuple[str, str]] | None`, found `dict[str, str]`
+ mesonbuild/interpreter/type_checking.py:1024:9 error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `dict[str | ContainerTypeInfo | type, str | tuple[str, str]] | None`, found `dict[str, tuple[str, str]]`
+ mesonbuild/interpreter/type_checking.py:1071:5 error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `dict[str | ContainerTypeInfo | type, str | tuple[str, str]] | None`, found `dict[str, tuple[str, str]]`
+ mesonbuild/mparser.py:683:47 error[invalid-assignment] Object of type `dict[str, str]` is not assignable to `Mapping[str, Literal["==", "!=", "<", "<=", ">=", ... omitted 3 literals]]`
+ mesonbuild/mparser.py:694:47 error[invalid-assignment] Object of type `dict[str, str]` is not assignable to `Mapping[str, Literal["+", "-", "*", "/", "%"]]`
+ mesonbuild/mparser.py:699:47 error[invalid-assignment] Object of type `dict[str, str]` is not assignable to `Mapping[str, Literal["+", "-", "*", "/", "%"]]`
- mesonbuild/mparser.py:725:65 error[invalid-argument-type] Argument is incorrect: Expected `int`, found `None`

mongo-python-driver (https://github.com/mongodb/mongo-python-driver)
- bson/json_util.py:1002: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:1002:9 error[invalid-assignment] Invalid subscript assignment with key of type `object` and value of type `type | ((Any, JSONOptions, /) -> Any)` on object of type `dict[int, (Any, JSONOptions, /) -> Any]`

paasta (https://github.com/yelp/paasta)
- paasta_tools/tron_tools.py:572:16 error[invalid-return-type] Return type does not match returned value: expected `dict[str, FieldSelectorConfig]`, found `dict[str, FieldSelectorConfig | dict[str, str]]`
+ paasta_tools/tron_tools.py:572:16 error[invalid-return-type] Return type does not match returned value: expected `dict[str, FieldSelectorConfig]`, found `dict[str | FieldSelectorConfig, FieldSelectorConfig | dict[str, str]]`

pandas (https://github.com/pandas-dev/pandas)
- pandas/core/dtypes/dtypes.py:983:24 error[no-matching-overload] No overload of function `amax` matches arguments
- pandas/plotting/_matplotlib/core.py:1206:19 error[no-matching-overload] No overload of function `tile` matches arguments
- pandas/tests/frame/methods/test_diff.py:278:22 error[no-matching-overload] No overload of function `repeat` matches arguments
- pandas/tests/frame/methods/test_diff.py:279:22 error[no-matching-overload] No overload of function `tile` matches arguments
- pandas/tests/groupby/test_groupby_dropna.py:648:14 error[no-matching-overload] No overload of bound method `choice` matches arguments
- pandas/tests/groupby/test_groupby_dropna.py:673:14 error[no-matching-overload] No overload of bound method `choice` matches arguments
- pandas/tests/groupby/test_groupby_dropna.py:685:14 error[no-matching-overload] No overload of bound method `choice` matches arguments
- pandas/tests/groupby/test_groupby_dropna.py:510:24 error[no-matching-overload] No overload of bound method `choice` matches arguments
- pandas/tests/groupby/test_groupby_dropna.py:596:24 error[no-matching-overload] No overload of bound method `choice` matches arguments
- pandas/tests/io/formats/style/test_style.py:781:9 error[invalid-assignment] Object of type `dict[tuple[int, int], list[tuple[str, str | int | float]]]` is not assignable to attribute `ctx` of type `defaultdict[tuple[int, int], list[tuple[str, str | int | float]]]`
+ pandas/tests/io/formats/style/test_style.py:781:9 error[invalid-assignment] Object of type `dict[tuple[int, int], list[tuple[str, str]]]` is not assignable to attribute `ctx` of type `defaultdict[tuple[int, int], list[tuple[str, str | int | float]]]`
- pandas/tests/io/formats/style/test_style.py:793:9 error[invalid-assignment] Object of type `dict[tuple[int, int], list[tuple[str, str | int | float]]]` is not assignable to attribute `ctx` of type `defaultdict[tuple[int, int], list[tuple[str, str | int | float]]]`
+ pandas/tests/io/formats/style/test_style.py:793:9 error[invalid-assignment] Object of type `dict[tuple[int, int], list[tuple[str, str]]]` is not assignable to attribute `ctx` of type `defaultdict[tuple[int, int], list[tuple[str, str | int | float]]]`

pandas-stubs (https://github.com/pandas-dev/pandas-stubs)
- tests/arrays/test_string_arrow.py:39:9 error[type-assertion-failure] Type `BaseStringArray[None]` does not match asserted type `ArrowStringArray`
- tests/arrays/test_string_arrow.py:42:9 error[type-assertion-failure] Type `BaseStringArray[None]` does not match asserted type `ArrowStringArray`
- tests/arrays/test_string_arrow.py:45:9 error[type-assertion-failure] Type `BaseStringArray[None]` does not match asserted type `ArrowStringArray`
- tests/arrays/test_string_arrow.py:48:9 error[type-assertion-failure] Type `BaseStringArray[None]` does not match asserted type `ArrowStringArray`
- tests/arrays/test_string_arrow.py:51:9 error[type-assertion-failure] Type `BaseStringArray[None]` does not match asserted type `ArrowStringArray`
- tests/arrays/test_string_arrow.py:56:9 error[type-assertion-failure] Type `BaseStringArray[None]` does not match asserted type `ArrowStringArray`
- tests/arrays/test_string_arrow.py:61:9 error[type-assertion-failure] Type `BaseStringArray[None]` does not match asserted type `ArrowStringArray`
- tests/arrays/test_string_arrow.py:69:9 error[type-assertion-failure] Type `BaseStringArray[None]` does not match asserted type `ArrowStringArray`
- tests/arrays/test_string_arrow.py:77:9 error[type-assertion-failure] Type `BaseStringArray[None]` does not match asserted type `ArrowStringArray`
+ tests/arrays/test_base_string_.py:100:9 error[type-assertion-failure] Type `ArrowStringArray` does not match asserted type `BaseStringArray[None]`
+ tests/arrays/test_base_string_.py:103:9 error[type-assertion-failure] Type `ArrowStringArray` does not match asserted type `BaseStringArray[None]`
+ tests/arrays/test_base_string_.py:106:9 error[type-assertion-failure] Type `ArrowStringArray` does not match asserted type `BaseStringArray[None]`
+ tests/arrays/test_base_string_.py:109:9 error[type-assertion-failure] Type `ArrowStringArray` does not match asserted type `BaseStringArray[None]`
+ tests/arrays/test_base_string_.py:112:9 error[type-assertion-failure] Type `ArrowStringArray` does not match asserted type `BaseStringArray[None]`
+ tests/arrays/test_base_string_.py:115:9 error[type-assertion-failure] Type `ArrowStringArray` does not match asserted type `BaseStringArray[None]`
+ tests/arrays/test_base_string_.py:118:9 error[type-assertion-failure] Type `ArrowStringArray` does not match asserted type `BaseStringArray[None]`
+ tests/arrays/test_base_string_.py:123:9 error[type-assertion-failure] Type `ArrowStringArray` does not match asserted type `BaseStringArray[None]`
+ tests/arrays/test_base_string_.py:126:9 error[type-assertion-failure] Type `ArrowStringArray` does not match asserted type `BaseStringArray[None]`
+ tests/arrays/test_base_string_.py:143:11 error[type-assertion-failure] Type `ArrowStringArray` does not match asserted type `BaseStringArray[None]`
- tests/arrays/test_string_.py:41:9 error[type-assertion-failure] Type `BaseStringArray[None]` does not match asserted type `StringArray`
+ tests/arrays/test_string_.py:41:9 error[type-assertion-failure] Type `ArrowStringArray` does not match asserted type `StringArray`
- tests/arrays/test_string_.py:44:9 error[type-assertion-failure] Type `BaseStringArray[None]` does not match asserted type `StringArray`
+ tests/arrays/test_string_.py:44:9 error[type-assertion-failure] Type `ArrowStringArray` does not match asserted type `StringArray`
- tests/arrays/test_string_.py:47:9 error[type-assertion-failure] Type `BaseStringArray[None]` does not match asserted type `StringArray`
+ tests/arrays/test_string_.py:47:9 error[type-assertion-failure] Type `ArrowStringArray` does not match asserted type `StringArray`
- tests/arrays/test_string_.py:50:9 error[type-assertion-failure] Type `BaseStringArray[None]` does not match asserted type `StringArray`
+ tests/arrays/test_string_.py:50:9 error[type-assertion-failure] Type `ArrowStringArray` does not match asserted type `StringArray`
- tests/arrays/test_string_.py:53:9 error[type-assertion-failure] Type `BaseStringArray[None]` does not match asserted type `StringArray`
+ tests/arrays/test_string_.py:53:9 error[type-assertion-failure] Type `ArrowStringArray` does not match asserted type `StringArray`
- tests/arrays/test_string_.py:56:9 error[type-assertion-failure] Type `BaseStringArray[None]` does not match asserted type `StringArray`
+ tests/arrays/test_string_.py:56:9 error[type-assertion-failure] Type `ArrowStringArray` does not match asserted type `StringArray`
- tests/arrays/test_string_.py:59:9 error[type-assertion-failure] Type `BaseStringArray[None]` does not match asserted type `StringArray`
+ tests/arrays/test_string_.py:59:9 error[type-assertion-failure] Type `ArrowStringArray` does not match asserted type `StringArray`
- tests/arrays/test_string_.py:67:9 error[type-assertion-failure] Type `BaseStringArray[None]` does not match asserted type `StringArray`
+ tests/arrays/test_string_.py:67:9 error[type-assertion-failure] Type `ArrowStringArray` does not match asserted type `StringArray`
- tests/arrays/test_string_.py:72:9 error[type-assertion-failure] Type `BaseStringArray[None]` does not match asserted type `StringArray`
+ tests/arrays/test_string_.py:72:9 error[type-assertion-failure] Type `ArrowStringArray` does not match asserted type `StringArray`
+ tests/frame/test_frame.py:3813:9 error[type-assertion-failure] Type `Unknown` is not equivalent to `Never`
+ tests/test_groupby.py:137:9 error[type-assertion-failure] Type `Unknown` does not match asserted type `DataFrame`
+ tests/test_groupby.py:138:13 error[no-matching-overload] No overload of bound method `aggregate` matches arguments
+ tests/test_groupby.py:138:13 error[no-matching-overload] No overload of bound method `aggregate` matches arguments
+ tests/test_groupby.py:138:13 error[no-matching-overload] No overload of bound method `aggregate` matches arguments
+ tests/test_groupby.py:168:9 error[no-matching-overload] No overload of bound method `aggregate` matches arguments
+ tests/test_groupby.py:168:9 error[no-matching-overload] No overload of bound method `aggregate` matches arguments
+ tests/test_groupby.py:168:9 error[no-matching-overload] No overload of bound method `aggregate` matches arguments
+ tests/test_groupby.py:172:9 error[no-matching-overload] No overload of bound method `aggregate` matches arguments
+ tests/test_groupby.py:172:9 error[no-matching-overload] No overload of bound method `aggregate` matches arguments
+ tests/test_groupby.py:172:9 error[no-matching-overload] No overload of bound method `aggregate` matches arguments
+ tests/test_groupby.py:176:9 error[no-matching-overload] No overload of bound method `aggregate` matches arguments
+ tests/test_groupby.py:176:9 error[no-matching-overload] No overload of bound method `aggregate` matches arguments
+ tests/test_groupby.py:176:9 error[no-matching-overload] No overload of bound method `aggregate` matches arguments
+ tests/test_pandas.py:142:9 error[type-assertion-failure] Type `Unknown` does not match asserted type `Never`
+ tests/test_resampler.py:109:9 error[type-assertion-failure] Type `Unknown` does not match asserted type `DataFrame`
+ tests/test_resampler.py:110:13 error[no-matching-overload] No overload of bound method `aggregate` matches arguments
+ tests/test_resampler.py:402:9 error[no-matching-overload] No overload of bound method `aggregate` matches arguments
+ tests/test_resampler.py:406:9 error[no-matching-overload] No overload of bound method `aggregate` matches arguments
+ tests/test_resampler.py:410:9 error[no-matching-overload] No overload of bound method `aggregate` matches arguments

pandera (https://github.com/pandera-dev/pandera)
- tests/polars/test_polars_dataframe_generic.py:66:20 warning[unused-type-ignore-comment] Unused blanket `type: ignore` directive

scipy (https://github.com/scipy/scipy)
- scipy/special/tests/test_ndtri_exp.py:83:38 error[invalid-argument-type] Argument to bound method `reduce` is incorrect: Expected `Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | ... omitted 5 union elements`, found `list[floating[Any] | int]`
- scipy/optimize/_differentialevolution.py:1437:9 error[invalid-assignment] Invalid subscript assignment with key of type `list[int | Unknown | signedinteger[_64Bit]]` and value of type `Unknown` on object of type `ndarray[tuple[Any, ...], dtype[Any]]`
- scipy/optimize/_differentialevolution.py:1437:9 error[invalid-assignment] Invalid subscript assignment with key of type `list[int | Unknown | signedinteger[_64Bit]]` and value of type `Unknown` on object of type `ndarray[tuple[int], dtype[Any]]`
- scipy/stats/tests/test_axis_nan_policy.py:1082:9 error[no-matching-overload] No overload of function `array` matches arguments
- scipy/stats/tests/test_axis_nan_policy.py:1083:9 error[no-matching-overload] No overload of function `array` matches arguments
- scipy/stats/tests/test_axis_nan_policy.py:1123:9 error[no-matching-overload] No overload of function `array` matches arguments
- scipy/stats/tests/test_mstats_basic.py:72:13 error[no-matching-overload] No overload of function `array` matches arguments
- scipy/stats/tests/test_mstats_basic.py:78:13 error[no-matching-overload] No overload of function `array` matches arguments
- scipy/stats/tests/test_mstats_basic.py:99:13 error[no-matching-overload] No overload of function `array` matches arguments
- scipy/stats/tests/test_mstats_basic.py:104:13 error[no-matching-overload] No overload of function `array` matches arguments
- scipy/stats/tests/test_mstats_basic.py:123:13 error[no-matching-overload] No overload of function `array` matches arguments
- scipy/stats/tests/test_mstats_basic.py:131:13 error[no-matching-overload] No overload of function `array` matches arguments
- scipy/stats/tests/test_mstats_basic.py:139:13 error[no-matching-overload] No overload of function `array` matches arguments
- scipy/stats/tests/test_mstats_basic.py:144:13 error[no-matching-overload] No overload of function `array` matches arguments
- scipy/stats/tests/test_mstats_basic.py:212:14 error[no-matching-overload] No overload of function `__new__` matches arguments
- scipy/stats/tests/test_mstats_basic.py:213:14 error[no-matching-overload] No overload of function `__new__` matches arguments
- scipy/stats/tests/test_mstats_basic.py:575:20 error[no-matching-overload] No overload of function `array` matches arguments
- scipy/stats/tests/test_mstats_basic.py:593:16 error[no-matching-overload] No overload of function `array` matches arguments
- scipy/stats/tests/test_mstats_basic.py:603:16 error[no-matching-overload] No overload of function `array` matches arguments
- scipy/stats/tests/test_mstats_basic.py:1351:19 error[no-matching-overload] No overload of function `__new__` matches arguments
- scipy/stats/tests/test_mstats_basic.py:1453:19 error[no-matching-overload] No overload of function `__new__` matches arguments
- scipy/stats/tests/test_mstats_basic.py:1531:19 error[no-matching-overload] No overload of function `__new__` matches arguments
- scipy/stats/tests/test_mstats_basic.py:1596:13 error[no-matching-overload] No overload of function `__new__` matches arguments
- scipy/stats/tests/test_stats.py:6917:19 error[no-matching-overload] No overload of function `array` matches arguments
- scipy/stats/tests/test_stats.py:7030:19 error[no-matching-overload] No overload of function `array` matches arguments
- scipy/stats/tests/test_stats.py:7134:19 error[no-matching-overload] No overload of function `array` matches arguments
- subprojects/cobyqa/cobyqa/main.py:990:41 error[no-matching-overload] No overload of function `amin` matches arguments
- subprojects/cobyqa/cobyqa/main.py:997:41 error[no-matching-overload] No overload of function `amax` matches arguments
- subprojects/pyprima/pyprima/pyprima/src/pyprima/cobyla/trustregion.py:232:21 error[invalid-assignment] Invalid subscript assignment with key of type `list[signedinteger[_64Bit] | int | Unknown]` and value of type `Unknown` on object of type `ndarray[tuple[Any, ...], dtype[Unknown]]`
- subprojects/pyprima/pyprima/pyprima/src/pyprima/cobyla/trustregion.py:266:17 error[invalid-assignment] Invalid subscript assignment with key of type `list[signedinteger[_64Bit] | int | Unknown]` and value of type `Unknown` on object of type `ndarray[tuple[Any, ...], dtype[Unknown]]`

scipy-stubs (https://github.com/scipy/scipy-stubs)
+ tests/stats/test_mode.pyi:49:1 error[type-assertion-failure] Type `Unknown` does not match asserted type `signedinteger[_64Bit]`

xarray (https://github.com/pydata/xarray)
- xarray/core/groupby.py:501:36 error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `DataArray`, found `T_DataWithCoords@_resolve_group`
- xarray/tests/test_concat.py:112:21 error[no-matching-overload] No overload of function `reshape` matches arguments

Full report with detailed diff (timing results)

@carljm carljm removed their request for review March 10, 2026 01:00
@dcreager dcreager marked this pull request as draft March 10, 2026 01:06
@codspeed-hq
Copy link
Copy Markdown

codspeed-hq bot commented Mar 10, 2026

Merging this PR will degrade performance by 16.18%

⚡ 2 improved benchmarks
❌ 1 (👁 1) regressed benchmark
✅ 24 untouched benchmarks
⏩ 30 skipped benchmarks1

Performance Changes

Mode Benchmark BASE HEAD Efficiency
WallTime pandas 72.7 s 67.7 s +7.49%
👁 WallTime pydantic 6 s 7.2 s -16.18%
WallTime static_frame 23.5 s 22 s +7.08%

Comparing dcreager/solutions-hook (135b27a) with main (146340c)

Open in CodSpeed

Footnotes

  1. 30 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.

@dcreager
Copy link
Copy Markdown
Member Author

Looking at some selected ecosystem results:

  • ibis: [all correct] All of the changes are because we are now infering more precise dict types. Root cause is how FrozenOrderedDict indirectly inherits from bare dict. That means the specialization of FrozenOrderedDict does not influence the specialization of dict's _KT and _VT typevars. The old infer_reverse logic incorrectly inferred those to be Unknown, since the bare dict in the base class list becomes the default/unknown specialization. Constraint set assignability correctly ignores that case, allowing us to infer the specialization from the type context.

@dcreager
Copy link
Copy Markdown
Member Author

  • aioredis: This is an interesting one. This ends up checking whether dict[_T, Any | None] (the result of dict.fromkeys) is assignable to dict[..., Callable[[], None]] (the assignment annotation). This is not satisfiable, since Any | None is not assignable to Callable[[], None]. The old infer_reverse solver would still pull out a _T = ... mapping. The new solver does not, so we end up with _T = Unknown. And that propagates through to the types shown in the diagnostic. I would argue that this is at least a "fine for now", if not a genuinely better message.

@dcreager
Copy link
Copy Markdown
Member Author

  • mesonbuild additions: looks like (literal) promotion is kicking in here where arguably it shouldn't

@dcreager
Copy link
Copy Markdown
Member Author

The codspeed regression, and 25× perf regression in mesonbuild, both are because infer_reverse would purposefully skip some of the more expensive infer branches. Switch to an actual assignability check engages all of those branches again. And this hits the usual "protocols with big overloads" performance problem. I have a different PR that is looking at that in isolation. Pausing this until that lands...

dcreager added a commit that referenced this pull request Mar 17, 2026
…#23881)

For awhile we've known that our constraint sets can balloon in size when
they involve large unions, and especially intersections of large unions.
And we've had ecosystem runs (typically involving projects that depend
on numpy) that trigger this pathological behavior. #23848 is the latest
example, with a 25× performance regression for the `mesonbuild` project.

Guillaume Duboc just defended his [PhD
thesis](https://gldubc.github.io/#thesis) in January, and in §11.2, he
calls out an optimization first introduced by Frisch for handling these
kinds of unions more efficiently. The approach is also described in [a
post](https://elixir-lang.org/blog/2025/12/02/lazier-bdds-for-set-theoretic-types/)
on the Elixir blog. (Frisch and Duboc are both using these BDDs to
represent _types_, whereas we're using them to represent _constraints on
types_, but the same ideas apply.)

Frisch describes the basic idea, which is to add an "uncertain" branch
to each BDD node, turning them into ternary decision diagrams (TDDs).
Frisch also provides TDD construction rules for union (OR), intersection
(AND), and difference. Duboc takes this further and derives more
efficient rules for intersection and difference.

This PR implements TDDs and Frisch's and Duboc's construction rules.
I've confirmed that this completely eliminates the performance
regression for `mesonbuild` on #23848.

---

More details on how this works, and why we get these savings:

The key benefit is that they let us represent unions more efficiently.
As a simple example, with our quasi-reduced BDDs from before, `a ∨ b`
becomes:

```
<n1> a
┡━₁ <n2> b
│   ┡━₁ true
│   └─₀ true
└─₀ <n3> b
    ┡━₁ true
    └─₀ false
```

With TDDs, the rhs of `a ∨ b` is moved into the new "uncertain" branch:

```
<t1> a
┡━₁ true
├─? <t2> b
│   ┡━₁ true
│   ├─? false
│   └─₀ false
└─₀ false
```

We already have some savings, since the TDD representation "allows
unions to be kept lazy, postponing expansion until needed for
intersection or difference operations". We "park" the rhs as-is into the
uncertain branch, so we only need one (existing) copy of it. In the BDD
case, we had to fold the rhs into the `a = true` case, creating an
entire (modified) copy of its subgraph. That means we only need 2 nodes
for the TDD instead of 3 for the BDD. (With only two variables, this
might not seem like a lot, but we've actually gone from O(n²) nodes to
O(n).)

We get even more savings when with more complex formulas, like `(a ∨ b)
∧ (c ∨ d)`. With BDDs, we get:

```
<n1> a                      <n7> a
┡━₁ <n2> b                  ┡━₁ <n8> b
│   ┡━₁ true                │   ┡━₁ <n4> c
│   └─₀ true                │   │   ┡━₁ <n5> d
└─₀ <n3> b                  │   │   │   ┡━₁ true
    ┡━₁ true                │   │   │   └─₀ true
    └─₀ false               │   │   └─₀ <n6> d
                            │   │       ┡━₁ true
<n4> c                      │   │       └─₀ false
┡━₁ <n5> d                  │   └─₀ <n4> SHARED
│   ┡━₁ true                └─₀ <n9> b
│   └─₀ true                    ┡━₁ <n4> SHARED
└─₀ <n6> d                      └─₀ false
    ┡━₁ true
    └─₀ false
```

With TDDs, we get:

```
<t1> a                      <t5> a
┡━₁ true                    ┡━₁ <t3> c
├─? <t2> b                  │   ┡━₁ true
│   ┡━₁ true                │   ├─? <t4> d
│   ├─? false               │   │   ┡━₁ true
│   └─₀ false               │   │   ├─? false
└─₀ false                   │   │   └─₀ false
                            │   └─₀ false
<t3> c                      ├─? <t6> b
┡━₁ true                    │   ┡━₁ <t3> SHARED
├─? <t4> d                  │   ├─? false
│   ┡━₁ true                │   └─₀ false
│   ├─? false               └─₀ false
│   └─₀ false
└─₀ false
```

That's 7 nodes for the BDDs, and 4 for TDDs — still linear in the total
number of variables, even though our BDDs are only quasi-reduced. And
also note that we never had to modify the TDD that represented the rhs
of the AND (`t3 = c ∨ d`).
@dcreager dcreager force-pushed the dcreager/solutions-hook branch from 00641b7 to fa57c42 Compare March 17, 2026 02:27
@dcreager
Copy link
Copy Markdown
Member Author

The codspeed regression, and 25× perf regression in mesonbuild, both are because infer_reverse would purposefully skip some of the more expensive infer branches. Switch to an actual assignability check engages all of those branches again. And this hits the usual "protocols with big overloads" performance problem. I have a different PR that is looking at that in isolation. Pausing this until that lands...

Okay, #23881 has landed, and I think I fixed all of the merge conflicts that came up in the meantime. Tomorrow I'm going to look at the CI results before (hopefully) opening this up for review.

@dcreager
Copy link
Copy Markdown
Member Author

dcreager commented Mar 17, 2026

The remaining performance regression stems from when_constraint_set_assignable_to perform genuinely more work than the infer_reverse methods that it replaces. That said, I think we can claw some of that back with some careful caching. Valgrind and Claude tell me, for instance, that the 1.4× slowdown in pydantic is because we're checking assignability of the same pairs of types many times now. As one example, we check dict[_KT, _VT] ≤ dict[str, Any] 179 times. That seems like an easy win, but I want to tackle that in a separate follow-on PR so that I can go ahead and get this refactoring landed before more merge conflicts crop up.

@dcreager dcreager marked this pull request as ready for review March 17, 2026 18:39
ibraheemdev added a commit that referenced this pull request Mar 17, 2026
…narrowing (#24025)

#23848 (comment) got
me thinking about how to short-circuit earlier during generic call
inference.
@dcreager dcreager force-pushed the dcreager/solutions-hook branch from cc71432 to d74d703 Compare March 23, 2026 19:18
Copy link
Copy Markdown
Member

@ibraheemdev ibraheemdev left a comment

Choose a reason for hiding this comment

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

Nice!

Comment on lines +3831 to +3835
let concrete_content =
inferred_ty.filter_union(self.db, |ty| !ty.has_typevar(self.db));
if concrete_content.is_never() && inferred_ty.has_typevar(self.db) {
continue;
}
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.

I don't exactly understand why we need this check, why are non-inferable typevars special here? We should still be using them to widen the inferred type, e.g.,

def f[T]():
    x: list[T | int] = [1]

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 was me being too zealous with some inferable checks. We need the ones here:

if !typevar.is_inferable(self.db, self.inferable_typevars) {
return Ok(None);
}

to make sure that we only include inferable typevars in our list of solutions. But you're right that this one is isn't right, because it's checking the solution, not the typevar being solved.

(Also, once #24079 lands, I'll be able to solve this better by quantifying away all of the non-inferable typevars before calling solutions_with.)

@ibraheemdev
Copy link
Copy Markdown
Member

ibraheemdev commented Mar 23, 2026

mesonbuild additions: looks like (literal) promotion is kicking in here where arguably it shouldn't

Any idea why this is happening? Literal promotion is tied to infer_reverse in some places, where we rely on literal types being inferred with Literal type context (which may have to be extracted from e.g., the element type of a list[Literal[_]] annotation).

@dcreager dcreager force-pushed the dcreager/solutions-hook branch from a069ae2 to f6d32b5 Compare March 23, 2026 20:15
@dcreager
Copy link
Copy Markdown
Member Author

Any idea why this is happening? Literal promotion is tied to infer_reverse in some places, where we rely on literal types being inferred with Literal type context (which may have to be extracted from e.g., the element type of a list[Literal[_]] annotation).

I don't, but I'd like to tackle that as a follow-on

@dcreager dcreager merged commit b8fad83 into main Mar 24, 2026
49 checks passed
@dcreager dcreager deleted the dcreager/solutions-hook branch March 24, 2026 13:54
carljm added a commit that referenced this pull request Mar 25, 2026
* main:
  [ty] Avoid eager TypedDict diagnostics in `TypedDict | dict` unions (#24151)
  `F507`: Fix false negative for non-tuple RHS in `%`-formatting (#24142)
  [ty] Update `SpecializationBuilder` hook to get both lower/upper bounds (#23848)
  Fix `%foo?` parsing in IPython assignment expressions (#24152)
  `E501`/`W505`/formatter: Exclude nested pragma comments from line width calculation  (#24071)
  [ty] Fix Salsa panic propagation (#24141)
  [ty] Support `type:ignore[ty:code]` suppressions (#24096)
  [ty] Support narrowing for extended walrus targets (#24129)
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.

2 participants