[ty] Update SpecializationBuilder hook to get both lower/upper bounds#23848
[ty] Update SpecializationBuilder hook to get both lower/upper bounds#23848
SpecializationBuilder hook to get both lower/upper bounds#23848Conversation
Typing conformance resultsNo changes detected ✅Current numbersThe 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. |
|
Memory usage reportSummary
Significant changesClick to expand detailed breakdownflake8
trio
sphinx
prefect
|
bdbe546 to
38c8dc4
Compare
|
| 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
Merging this PR will degrade performance by 16.18%
Performance Changes
Comparing Footnotes
|
|
Looking at some selected ecosystem results:
|
|
|
|
The codspeed regression, and 25× perf regression in |
…#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`).
00641b7 to
fa57c42
Compare
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. |
|
The remaining performance regression stems from |
…narrowing (#24025) #23848 (comment) got me thinking about how to short-circuit earlier during generic call inference.
cc71432 to
d74d703
Compare
| 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; | ||
| } |
There was a problem hiding this comment.
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]There was a problem hiding this comment.
This was me being too zealous with some inferable checks. We need the ones here:
ruff/crates/ty_python_semantic/src/types/call/bind.rs
Lines 3803 to 3805 in 135b27a
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.)
Any idea why this is happening? Literal promotion is tied to |
a069ae2 to
f6d32b5
Compare
I don't, but I'd like to tackle that as a follow-on |
* 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)
This is a refactoring in support of astral-sh/ty#2799. The eventual goal is to use a
ConstraintSetto hold the pending specialization being built inSpecializationBuilder. That will automatically cause us to combine mappings with union or intersection as appropriate.This PR removes several methods from the
SpecializationBuilderAPI:mappedis removed in favor of a newbuild_withthat 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_reverseand friends are removed in favor of constructing a constraint set directly viawhen_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_mappingsandinto_type_mappingsare also removed. These were used to consume the resut of theinfer_reversecalls. We can replace that by consuming the constraint set created by the assignability check. This requires asolutionswrapper that takes in a similar hook callback as above.