Skip to content

Comments

[ty] Isolate loop header reachability evaluation in tracked function#23520

Open
mtshiba wants to merge 3 commits intoastral-sh:mainfrom
mtshiba:tracked-loop-header-reachability
Open

[ty] Isolate loop header reachability evaluation in tracked function#23520
mtshiba wants to merge 3 commits intoastral-sh:mainfrom
mtshiba:tracked-loop-header-reachability

Conversation

@mtshiba
Copy link
Collaborator

@mtshiba mtshiba commented Feb 23, 2026

Summary

Probably related: astral-sh/ty#2808

I noticed that #22794 made isort run about 30x slower than it was before.

https://548dfc80.ty-ecosystem-ext.pages.dev/timing

isort has very large loop blocks in its codebase (e.g. https://github.com/PyCQA/isort/blob/b5f06a7b1d53b7b561f00f40f814ef1698864bac/isort/core.py#L32).
We need to implement performance optimization solutions for these kinds of large loops.

In this PR, I implement one of the slowdown mitigation measures I came up with. The actual inference of the loop variable is done in two places: infer_loop_header_definition and place_from_bindings_impl (the LoopHeader branch). Reachability analysis is performed independently here, but this calculation is very expensive and should be cached. Therefore, I add a tracked function loop_header_reachability.
This change has resulted in a 12-19% performance improvement for isort locally.

See also: #23521

cc: @oconnor663

Test Plan

N/A

@mtshiba mtshiba added the ty Multi-file analysis & type inference label Feb 23, 2026
@astral-sh-bot
Copy link

astral-sh-bot bot commented Feb 23, 2026

Typing conformance results

No changes detected ✅

@astral-sh-bot
Copy link

astral-sh-bot bot commented Feb 23, 2026

mypy_primer results

Changes were detected when running on open source projects
spack (https://github.com/spack/spack)
- lib/spack/spack/llnl/util/filesystem.py:1668:35: error[invalid-argument-type] Argument to function `exists` is incorrect: Expected `int | str | bytes | PathLike[str] | PathLike[bytes]`, found `Sized | Unknown`
+ lib/spack/spack/llnl/util/filesystem.py:1668:35: error[invalid-argument-type] Argument to function `exists` is incorrect: Expected `int | str | bytes | PathLike[str] | PathLike[bytes]`, found `Unknown | Sized`
- lib/spack/spack/llnl/util/filesystem.py:1674:25: error[invalid-argument-type] Argument to function `move` is incorrect: Expected `str | PathLike[str]`, found `Sized | Unknown`
+ lib/spack/spack/llnl/util/filesystem.py:1674:25: error[invalid-argument-type] Argument to function `move` is incorrect: Expected `str | PathLike[str]`, found `Unknown | Sized`

pip (https://github.com/pypa/pip)
- src/pip/_internal/req/req_uninstall.py:132:42: error[invalid-argument-type] Argument to function `norm_join` is incorrect: Expected `str`, found `Unknown | Sized`
+ src/pip/_internal/req/req_uninstall.py:132:42: error[invalid-argument-type] Argument to function `norm_join` is incorrect: Expected `str`, found `Sized | Unknown`
- src/pip/_internal/req/req_uninstall.py:133:40: error[invalid-argument-type] Argument to function `norm_join` is incorrect: Expected `str`, found `Unknown | Sized`
+ src/pip/_internal/req/req_uninstall.py:133:40: error[invalid-argument-type] Argument to function `norm_join` is incorrect: Expected `str`, found `Sized | Unknown`
- src/pip/_internal/req/req_uninstall.py:139:27: error[unsupported-operator] Operator `+` is not supported between objects of type `Unknown | Sized` and `LiteralString`
+ src/pip/_internal/req/req_uninstall.py:139:27: error[unsupported-operator] Operator `+` is not supported between objects of type `Sized | Unknown` and `LiteralString`

rich (https://github.com/Textualize/rich)
- tests/test_tools.py:17:17: error[invalid-argument-type] Argument to function `next` is incorrect: Expected `SupportsNext[Unknown]`, found `Iterable[tuple[bool, str | Unknown]]`
+ tests/test_tools.py:17:17: error[invalid-argument-type] Argument to function `next` is incorrect: Expected `SupportsNext[Unknown]`, found `Iterable[tuple[bool, Unknown | str]]`
- tests/test_tools.py:18:17: error[invalid-argument-type] Argument to function `next` is incorrect: Expected `SupportsNext[Unknown]`, found `Iterable[tuple[bool, str | Unknown]]`
+ tests/test_tools.py:18:17: error[invalid-argument-type] Argument to function `next` is incorrect: Expected `SupportsNext[Unknown]`, found `Iterable[tuple[bool, Unknown | str]]`
- tests/test_tools.py:19:17: error[invalid-argument-type] Argument to function `next` is incorrect: Expected `SupportsNext[Unknown]`, found `Iterable[tuple[bool, str | Unknown]]`
+ tests/test_tools.py:19:17: error[invalid-argument-type] Argument to function `next` is incorrect: Expected `SupportsNext[Unknown]`, found `Iterable[tuple[bool, Unknown | str]]`
- tests/test_tools.py:20:17: error[invalid-argument-type] Argument to function `next` is incorrect: Expected `SupportsNext[Unknown]`, found `Iterable[tuple[bool, str | Unknown]]`
+ tests/test_tools.py:20:17: error[invalid-argument-type] Argument to function `next` is incorrect: Expected `SupportsNext[Unknown]`, found `Iterable[tuple[bool, Unknown | str]]`

pydantic (https://github.com/pydantic/pydantic)
- pydantic/_internal/_core_metadata.py:87:54: error[invalid-assignment] Invalid assignment to key "pydantic_js_extra" with declared type `dict[str, Divergent] | ((dict[str, Divergent], /) -> None) | ((dict[str, Divergent], type[Any], /) -> None)` on TypedDict `CoreMetadata`: value of type `dict[object, object]`
+ pydantic/_internal/_core_metadata.py:87:54: error[invalid-assignment] Invalid assignment to key "pydantic_js_extra" with declared type `dict[str, int | float | str | ... omitted 3 union elements] | ((dict[str, int | float | str | ... omitted 3 union elements], /) -> None) | ((dict[str, int | float | str | ... omitted 3 union elements], type[Any], /) -> None)` on TypedDict `CoreMetadata`: value of type `dict[object, object]`
- pydantic/fields.py:949:5: error[invalid-parameter-default] Default value of type `PydanticUndefinedType` is not assignable to annotated parameter type `dict[str, Divergent] | ((dict[str, Divergent], /) -> None) | None`
+ pydantic/fields.py:949:5: error[invalid-parameter-default] Default value of type `PydanticUndefinedType` is not assignable to annotated parameter type `dict[str, int | float | str | ... omitted 3 union elements] | ((dict[str, int | float | str | ... omitted 3 union elements], /) -> None) | None`
- pydantic/fields.py:989:5: error[invalid-parameter-default] Default value of type `PydanticUndefinedType` is not assignable to annotated parameter type `dict[str, Divergent] | ((dict[str, Divergent], /) -> None) | None`
+ pydantic/fields.py:989:5: error[invalid-parameter-default] Default value of type `PydanticUndefinedType` is not assignable to annotated parameter type `dict[str, int | float | str | ... omitted 3 union elements] | ((dict[str, int | float | str | ... omitted 3 union elements], /) -> None) | None`
- pydantic/fields.py:1032:5: error[invalid-parameter-default] Default value of type `PydanticUndefinedType` is not assignable to annotated parameter type `dict[str, Divergent] | ((dict[str, Divergent], /) -> None) | None`
+ pydantic/fields.py:1032:5: error[invalid-parameter-default] Default value of type `PydanticUndefinedType` is not assignable to annotated parameter type `dict[str, int | float | str | ... omitted 3 union elements] | ((dict[str, int | float | str | ... omitted 3 union elements], /) -> None) | None`
- pydantic/fields.py:1072:5: error[invalid-parameter-default] Default value of type `PydanticUndefinedType` is not assignable to annotated parameter type `dict[str, Divergent] | ((dict[str, Divergent], /) -> None) | None`
+ pydantic/fields.py:1072:5: error[invalid-parameter-default] Default value of type `PydanticUndefinedType` is not assignable to annotated parameter type `dict[str, int | float | str | ... omitted 3 union elements] | ((dict[str, int | float | str | ... omitted 3 union elements], /) -> None) | None`
- pydantic/fields.py:1115:5: error[invalid-parameter-default] Default value of type `PydanticUndefinedType` is not assignable to annotated parameter type `dict[str, Divergent] | ((dict[str, Divergent], /) -> None) | None`
+ pydantic/fields.py:1115:5: error[invalid-parameter-default] Default value of type `PydanticUndefinedType` is not assignable to annotated parameter type `dict[str, int | float | str | ... omitted 3 union elements] | ((dict[str, int | float | str | ... omitted 3 union elements], /) -> None) | None`
- pydantic/fields.py:1154:5: error[invalid-parameter-default] Default value of type `PydanticUndefinedType` is not assignable to annotated parameter type `dict[str, Divergent] | ((dict[str, Divergent], /) -> None) | None`
+ pydantic/fields.py:1154:5: error[invalid-parameter-default] Default value of type `PydanticUndefinedType` is not assignable to annotated parameter type `dict[str, int | float | str | ... omitted 3 union elements] | ((dict[str, int | float | str | ... omitted 3 union elements], /) -> None) | None`
- pydantic/fields.py:1194:5: error[invalid-parameter-default] Default value of type `PydanticUndefinedType` is not assignable to annotated parameter type `dict[str, Divergent] | ((dict[str, Divergent], /) -> None) | None`
+ pydantic/fields.py:1194:5: error[invalid-parameter-default] Default value of type `PydanticUndefinedType` is not assignable to annotated parameter type `dict[str, int | float | str | ... omitted 3 union elements] | ((dict[str, int | float | str | ... omitted 3 union elements], /) -> None) | None`
- pydantic/fields.py:1573:13: error[invalid-argument-type] Argument is incorrect: Expected `dict[str, Divergent] | ((dict[str, Divergent], /) -> None) | None`, found `Top[dict[Unknown, Unknown]] | (((dict[str, Divergent], /) -> None) & ~Top[dict[Unknown, Unknown]]) | None`
+ pydantic/fields.py:1573:13: error[invalid-argument-type] Argument is incorrect: Expected `dict[str, int | float | str | ... omitted 3 union elements] | ((dict[str, int | float | str | ... omitted 3 union elements], /) -> None) | None`, found `Top[dict[Unknown, Unknown]] | (((dict[str, int | float | str | ... omitted 3 union elements], /) -> None) & ~Top[dict[Unknown, Unknown]]) | None`

vision (https://github.com/pytorch/vision)
- test/test_transforms_v2.py:1543:49: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Number | Sequence[Unknown]`, found `Unknown | tuple[int, int, int, int] | int | tuple[int | float, int | float]`
+ test/test_transforms_v2.py:1543:49: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Number | Sequence[Unknown]`, found `Unknown | int | tuple[int | float, int | float] | tuple[int, int, int, int]`
- test/test_transforms_v2.py:1543:49: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Sequence[int | float] | None`, found `Unknown | tuple[int, int, int, int] | int | tuple[int | float, int | float]`
+ test/test_transforms_v2.py:1543:49: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Sequence[int | float] | None`, found `Unknown | int | tuple[int | float, int | float] | tuple[int, int, int, int]`
- test/test_transforms_v2.py:1543:49: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Sequence[int | float] | None`, found `Unknown | tuple[int, int, int, int] | int | tuple[int | float, int | float]`
+ test/test_transforms_v2.py:1543:49: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Sequence[int | float] | None`, found `Unknown | int | tuple[int | float, int | float] | tuple[int, int, int, int]`
- test/test_transforms_v2.py:1543:49: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `InterpolationMode | int`, found `Unknown | tuple[int, int, int, int] | int | tuple[int | float, int | float]`
+ test/test_transforms_v2.py:1543:49: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `InterpolationMode | int`, found `Unknown | int | tuple[int | float, int | float] | tuple[int, int, int, int]`
- test/test_transforms_v2.py:1543:49: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `list[int | float] | None`, found `Unknown | tuple[int, int, int, int] | int | tuple[int | float, int | float]`
+ test/test_transforms_v2.py:1543:49: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `list[int | float] | None`, found `Unknown | int | tuple[int | float, int | float] | tuple[int, int, int, int]`
- test/test_transforms_v2.py:1597:13: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Number | Sequence[Unknown]`, found `Unknown | tuple[int, int, int, int] | int | tuple[int | float, int | float]`
+ test/test_transforms_v2.py:1597:13: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Number | Sequence[Unknown]`, found `Unknown | int | tuple[int | float, int | float] | tuple[int, int, int, int]`
- test/test_transforms_v2.py:1597:13: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Sequence[int | float] | None`, found `Unknown | tuple[int, int, int, int] | int | tuple[int | float, int | float]`
+ test/test_transforms_v2.py:1597:13: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Sequence[int | float] | None`, found `Unknown | int | tuple[int | float, int | float] | tuple[int, int, int, int]`
- test/test_transforms_v2.py:1597:13: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Sequence[int | float] | None`, found `Unknown | tuple[int, int, int, int] | int | tuple[int | float, int | float]`
+ test/test_transforms_v2.py:1597:13: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Sequence[int | float] | None`, found `Unknown | int | tuple[int | float, int | float] | tuple[int, int, int, int]`
- test/test_transforms_v2.py:1684:45: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Number | Sequence[Unknown]`, found `Unknown | tuple[int, int, int, int] | int | tuple[int | float, int | float]`
+ test/test_transforms_v2.py:1684:45: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Number | Sequence[Unknown]`, found `Unknown | int | tuple[int | float, int | float] | tuple[int, int, int, int]`
- test/test_transforms_v2.py:1684:45: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Sequence[int | float] | None`, found `Unknown | tuple[int, int, int, int] | int | tuple[int | float, int | float]`
+ test/test_transforms_v2.py:1684:45: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Sequence[int | float] | None`, found `Unknown | int | tuple[int | float, int | float] | tuple[int, int, int, int]`
- test/test_transforms_v2.py:1684:45: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Sequence[int | float] | None`, found `Unknown | tuple[int, int, int, int] | int | tuple[int | float, int | float]`
+ test/test_transforms_v2.py:1684:45: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Sequence[int | float] | None`, found `Unknown | int | tuple[int | float, int | float] | tuple[int, int, int, int]`
- test/test_transforms_v2.py:1684:45: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `InterpolationMode | int`, found `Unknown | tuple[int, int, int, int] | int | tuple[int | float, int | float]`
+ test/test_transforms_v2.py:1684:45: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `InterpolationMode | int`, found `Unknown | int | tuple[int | float, int | float] | tuple[int, int, int, int]`
- test/test_transforms_v2.py:1739:45: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Number | Sequence[Unknown]`, found `Unknown | tuple[int, int, int, int] | int | tuple[int | float, int | float]`
+ test/test_transforms_v2.py:1739:45: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Number | Sequence[Unknown]`, found `Unknown | int | tuple[int | float, int | float] | tuple[int, int, int, int]`
- test/test_transforms_v2.py:1739:45: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Sequence[int | float] | None`, found `Unknown | tuple[int, int, int, int] | int | tuple[int | float, int | float]`
+ test/test_transforms_v2.py:1739:45: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Sequence[int | float] | None`, found `Unknown | int | tuple[int | float, int | float] | tuple[int, int, int, int]`
- test/test_transforms_v2.py:1739:45: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Sequence[int | float] | None`, found `Unknown | tuple[int, int, int, int] | int | tuple[int | float, int | float]`
+ test/test_transforms_v2.py:1739:45: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Sequence[int | float] | None`, found `Unknown | int | tuple[int | float, int | float] | tuple[int, int, int, int]`
- test/test_transforms_v2.py:1739:45: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `InterpolationMode | int`, found `Unknown | tuple[int, int, int, int] | int | tuple[int | float, int | float]`
+ test/test_transforms_v2.py:1739:45: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `InterpolationMode | int`, found `Unknown | int | tuple[int | float, int | float] | tuple[int, int, int, int]`

artigraph (https://github.com/artigraph/artigraph)
- tests/arti/types/test_types.py:100:51: error[invalid-argument-type] Argument is incorrect: Expected `frozenset[Any]`, found `frozenset[float | Unknown | int] | list[Unknown | int | float] | tuple[float | Unknown | int, ...]`
+ tests/arti/types/test_types.py:100:51: error[invalid-argument-type] Argument is incorrect: Expected `frozenset[Any]`, found `frozenset[float | Unknown | int] | list[int | Unknown | float] | tuple[float | Unknown | int, ...]`

cloud-init (https://github.com/canonical/cloud-init)
- tests/unittests/distros/test_user_data_normalize.py:24:31: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `dict[Unknown, Unknown]`, found `Unknown | bool | list[Unknown] | ... omitted 3 union elements`
+ tests/unittests/distros/test_user_data_normalize.py:24:31: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `dict[Unknown, Unknown]`, found `Unknown | dict[Unknown | str, Unknown | str] | str | ... omitted 3 union elements`
- tests/unittests/sources/test_gce.py:71:31: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `dict[Unknown, Unknown]`, found `Unknown | bool | list[Unknown] | ... omitted 3 union elements`
+ tests/unittests/sources/test_gce.py:71:31: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `dict[Unknown, Unknown]`, found `Unknown | dict[Unknown | str, Unknown | str] | str | ... omitted 3 union elements`

dd-trace-py (https://github.com/DataDog/dd-trace-py)
- ddtrace/debugging/_redaction.py:16:5: error[unsupported-operator] Operator `|` is not supported between objects of type `frozenset[Unknown | str]` and `Unknown | EnvVariable[set[Unknown]]`
+ ddtrace/debugging/_redaction.py:16:5: error[unsupported-operator] Operator `|` is not supported between objects of type `frozenset[str | Unknown]` and `Unknown | EnvVariable[set[Unknown]]`
- scripts/freshvenvs.py:343:69: error[invalid-argument-type] Argument to function `_versions_fully_cover_bounds` is incorrect: Expected `list[str]`, found `list[Unknown | Version] & ~AlwaysFalsy`
+ scripts/freshvenvs.py:343:69: error[invalid-argument-type] Argument to function `_versions_fully_cover_bounds` is incorrect: Expected `list[str]`, found `list[Version | Unknown] & ~AlwaysFalsy`
- tests/tracer/test_span.py:193:29: error[invalid-argument-type] Argument to bound method `set_metric` is incorrect: Expected `int | float`, found `Span | Unknown | None | ... omitted 6 union elements`
+ tests/tracer/test_span.py:193:29: error[invalid-argument-type] Argument to bound method `set_metric` is incorrect: Expected `int | float`, found `int | Unknown | None | ... omitted 6 union elements`

ibis (https://github.com/ibis-project/ibis)
- ibis/selectors.py:333:16: error[invalid-return-type] Return type does not match returned value: expected `frozenset[str]`, found `frozenset[str | Buffer | Unknown]`
+ ibis/selectors.py:333:16: error[invalid-return-type] Return type does not match returned value: expected `frozenset[str]`, found `frozenset[Buffer | Unknown | str]`
- ibis/selectors.py:428:13: error[invalid-assignment] Object of type `frozenset[str | Unknown]` is not assignable to `tuple[str | Column, ...]`
+ ibis/selectors.py:428:13: error[invalid-assignment] Object of type `frozenset[Unknown | str]` is not assignable to `tuple[str | Column, ...]`

jax (https://github.com/google/jax)
- jax/_src/pallas/hlo_interpreter.py:433:37: error[invalid-argument-type] Argument is incorrect: Expected `int`, found `int | DynamicGridDim | Unknown`
+ jax/_src/pallas/hlo_interpreter.py:433:37: error[invalid-argument-type] Argument is incorrect: Expected `int`, found `int | Unknown | DynamicGridDim`
- jax/_src/pallas/mosaic/interpret/interpret_pallas_call.py:1900:37: error[invalid-argument-type] Argument is incorrect: Expected `int`, found `int | DynamicGridDim | Unknown`
+ jax/_src/pallas/mosaic/interpret/interpret_pallas_call.py:1900:37: error[invalid-argument-type] Argument is incorrect: Expected `int`, found `int | Unknown | DynamicGridDim`
- jax/_src/pallas/pallas_call.py:864:37: error[invalid-argument-type] Argument is incorrect: Expected `int`, found `int | DynamicGridDim | Unknown`
+ jax/_src/pallas/pallas_call.py:864:37: error[invalid-argument-type] Argument is incorrect: Expected `int`, found `int | Unknown | DynamicGridDim`
- jax/collect_profile.py:110:17: error[unresolved-attribute] Attribute `glob` is not defined on `PathLike[str]`, `int`, `str`, `bytes`, `PathLike[bytes]` in union `PathLike[str] | Unknown | int | ... omitted 3 union elements`
+ jax/collect_profile.py:110:17: error[unresolved-attribute] Attribute `glob` is not defined on `PathLike[str]`, `int`, `str`, `bytes`, `PathLike[bytes]` in union `Unknown | PathLike[str] | int | ... omitted 3 union elements`
- jax/collect_profile.py:113:22: error[unsupported-operator] Operator `/` is not supported between objects of type `PathLike[str] | Unknown | int | ... omitted 3 union elements` and `Literal["remote.trace.json.gz"]`
+ jax/collect_profile.py:113:22: error[unsupported-operator] Operator `/` is not supported between objects of type `Unknown | PathLike[str] | int | ... omitted 3 union elements` and `Literal["remote.trace.json.gz"]`

rotki (https://github.com/rotki/rotki)
- rotkehlchen/tests/unit/test_makerdao.py:170:9: error[invalid-argument-type] Argument is incorrect: Expected `defaultdict[Asset, defaultdict[str, Balance]]`, found `defaultdict[Asset | Unknown, defaultdict[str, Balance] | Balance | Unknown | dict[Unknown | str, Unknown | Balance]]`
+ rotkehlchen/tests/unit/test_makerdao.py:170:9: error[invalid-argument-type] Argument is incorrect: Expected `defaultdict[Asset, defaultdict[str, Balance]]`, found `defaultdict[Asset | Unknown, defaultdict[str, Balance] | Balance | dict[Unknown | str, Unknown | Balance] | Unknown]`
- rotkehlchen/tests/unit/test_makerdao.py:171:9: error[invalid-argument-type] Argument is incorrect: Expected `defaultdict[Asset, defaultdict[str, Balance]]`, found `defaultdict[Asset | Unknown, defaultdict[str, Balance] | Balance | Unknown | dict[Unknown | str, Unknown | Balance]]`
+ rotkehlchen/tests/unit/test_makerdao.py:171:9: error[invalid-argument-type] Argument is incorrect: Expected `defaultdict[Asset, defaultdict[str, Balance]]`, found `defaultdict[Asset | Unknown, defaultdict[str, Balance] | Balance | dict[Unknown | str, Unknown | Balance] | Unknown]`

sympy (https://github.com/sympy/sympy)
- sympy/geometry/tests/test_util.py:128:55: error[invalid-argument-type] Argument to function `subsets` is incorrect: Expected `Sequence[Unknown]`, found `set[Point2D | Unknown]`
+ sympy/geometry/tests/test_util.py:128:55: error[invalid-argument-type] Argument to function `subsets` is incorrect: Expected `Sequence[Unknown]`, found `set[Unknown | Point2D]`
- sympy/integrals/prde.py:89:11: error[unresolved-attribute] Attribute `as_poly` is not defined on `int` in union `int | Unknown`
+ sympy/integrals/prde.py:89:11: error[unresolved-attribute] Attribute `as_poly` is not defined on `int` in union `Unknown | int`
- sympy/integrals/prde.py:89:61: error[unresolved-attribute] Attribute `as_poly` is not defined on `int` in union `int | Unknown`
+ sympy/integrals/prde.py:89:61: error[unresolved-attribute] Attribute `as_poly` is not defined on `int` in union `Unknown | int`
- sympy/integrals/prde.py:90:10: error[unresolved-attribute] Attribute `as_poly` is not defined on `int` in union `int | Unknown`
+ sympy/integrals/prde.py:90:10: error[unresolved-attribute] Attribute `as_poly` is not defined on `int` in union `Unknown | int`
- sympy/matrices/expressions/hadamard.py:81:22: error[invalid-argument-type] Argument to function `validate_matadd_integer` is incorrect: Expected `MatrixExpr`, found `int | Any | Basic | float | complex`
+ sympy/matrices/expressions/hadamard.py:81:22: error[invalid-argument-type] Argument to function `validate_matadd_integer` is incorrect: Expected `MatrixExpr`, found `Basic | int | float | complex | Any`
- sympy/matrices/expressions/kronecker.py:109:16: error[unresolved-attribute] Attribute `is_Identity` is not defined on `int`, `Basic`, `float`, `complex` in union `int | Any | Basic | float | complex`
+ sympy/matrices/expressions/kronecker.py:109:16: error[unresolved-attribute] Attribute `is_Identity` is not defined on `Basic`, `int`, `float`, `complex` in union `Basic | int | float | complex | Any`
- sympy/matrices/expressions/kronecker.py:110:33: error[unresolved-attribute] Attribute `rows` is not defined on `int`, `Basic`, `float`, `complex` in union `int | Any | Basic | float | complex`
+ sympy/matrices/expressions/kronecker.py:110:33: error[unresolved-attribute] Attribute `rows` is not defined on `Basic`, `int`, `float`, `complex` in union `Basic | int | float | complex | Any`
- sympy/matrices/expressions/matadd.py:60:22: error[invalid-argument-type] Argument to function `validate_matadd_integer` is incorrect: Expected `MatrixExpr`, found `Unknown | int | Basic | float | complex`
+ sympy/matrices/expressions/matadd.py:60:22: error[invalid-argument-type] Argument to function `validate_matadd_integer` is incorrect: Expected `MatrixExpr`, found `Unknown | Basic | int | float | complex`
- sympy/parsing/mathematica.py:692:38: error[invalid-argument-type] Argument to function `__new__` is incorrect: Expected `Iterable[Never]`, found `Unknown | list[Unknown | str]`
- sympy/polys/fields.py:101:24: error[unresolved-attribute] Attribute `as_numer_denom` is not defined on `int`, `Basic`, `float`, `complex` in union `int | Any | Basic | float | complex`
+ sympy/polys/fields.py:101:24: error[unresolved-attribute] Attribute `as_numer_denom` is not defined on `Basic`, `int`, `float`, `complex` in union `Basic | int | float | complex | Any`
- sympy/polys/polyoptions.py:472:61: error[invalid-argument-type] Argument to bound method `poly_ring` is incorrect: Expected `str | Expr`, found `int | Any | Basic | float | complex`
+ sympy/polys/polyoptions.py:472:61: error[invalid-argument-type] Argument to bound method `poly_ring` is incorrect: Expected `str | Expr`, found `Basic | int | float | complex | Any`
- sympy/polys/polyoptions.py:474:61: error[invalid-argument-type] Argument to bound method `poly_ring` is incorrect: Expected `str | Expr`, found `int | Any | Basic | float | complex`
+ sympy/polys/polyoptions.py:474:61: error[invalid-argument-type] Argument to bound method `poly_ring` is incorrect: Expected `str | Expr`, found `Basic | int | float | complex | Any`
- sympy/polys/polyoptions.py:476:61: error[invalid-argument-type] Argument to bound method `poly_ring` is incorrect: Expected `str | Expr`, found `int | Any | Basic | float | complex`
+ sympy/polys/polyoptions.py:476:61: error[invalid-argument-type] Argument to bound method `poly_ring` is incorrect: Expected `str | Expr`, found `Basic | int | float | complex | Any`
- sympy/polys/polyoptions.py:478:63: error[invalid-argument-type] Argument to bound method `poly_ring` is incorrect: Expected `str | Expr`, found `int | Any | Basic | float | complex`
+ sympy/polys/polyoptions.py:478:63: error[invalid-argument-type] Argument to bound method `poly_ring` is incorrect: Expected `str | Expr`, found `Basic | int | float | complex | Any`
- sympy/polys/polyoptions.py:480:63: error[invalid-argument-type] Argument to bound method `poly_ring` is incorrect: Expected `str | Expr`, found `int | Any | Basic | float | complex`
+ sympy/polys/polyoptions.py:480:63: error[invalid-argument-type] Argument to bound method `poly_ring` is incorrect: Expected `str | Expr`, found `Basic | int | float | complex | Any`
- sympy/polys/polyoptions.py:482:61: error[invalid-argument-type] Argument to bound method `poly_ring` is incorrect: Expected `str | Expr`, found `int | Any | Basic | float | complex`
+ sympy/polys/polyoptions.py:482:61: error[invalid-argument-type] Argument to bound method `poly_ring` is incorrect: Expected `str | Expr`, found `Basic | int | float | complex | Any`
- sympy/polys/polyoptions.py:492:62: error[invalid-argument-type] Argument to bound method `frac_field` is incorrect: Expected `str | Expr`, found `int | Any | Basic | float | complex`
+ sympy/polys/polyoptions.py:492:62: error[invalid-argument-type] Argument to bound method `frac_field` is incorrect: Expected `str | Expr`, found `Basic | int | float | complex | Any`
- sympy/polys/polyoptions.py:494:62: error[invalid-argument-type] Argument to bound method `frac_field` is incorrect: Expected `str | Expr`, found `int | Any | Basic | float | complex`
+ sympy/polys/polyoptions.py:494:62: error[invalid-argument-type] Argument to bound method `frac_field` is incorrect: Expected `str | Expr`, found `Basic | int | float | complex | Any`
- sympy/series/order.py:153:20: error[unresolved-attribute] Attribute `is_symbol` is not defined on `int`, `float`, `complex` in union `Unknown | int | Basic | float | complex`
+ sympy/series/order.py:153:20: error[unresolved-attribute] Attribute `is_symbol` is not defined on `int`, `float`, `complex` in union `Unknown | Basic | int | float | complex`
- sympy/series/order.py:188:28: error[unsupported-operator] Operator `/` is not supported between objects of type `Literal[1]` and `Unknown | int | Basic | float | complex`
+ sympy/series/order.py:188:28: error[unsupported-operator] Operator `/` is not supported between objects of type `Literal[1]` and `Unknown | Basic | int | float | complex`
- sympy/series/order.py:192:29: error[unsupported-operator] Operator `/` is not supported between objects of type `Literal[-1]` and `Unknown | int | Basic | float | complex`
+ sympy/series/order.py:192:29: error[unsupported-operator] Operator `/` is not supported between objects of type `Literal[-1]` and `Unknown | Basic | int | float | complex`
- sympy/series/order.py:269:52: error[invalid-argument-type] Argument to bound method `as_independent` is incorrect: Expected `Basic | type[Basic]`, found `int | Any | Basic | float | complex`
+ sympy/series/order.py:269:52: error[invalid-argument-type] Argument to bound method `as_independent` is incorrect: Expected `Basic | type[Basic]`, found `Basic | int | float | complex | Any`
- sympy/series/order.py:269:52: error[invalid-argument-type] Argument to bound method `as_independent` is incorrect: Expected `Basic | type[Basic]`, found `int | Any | Basic | float | complex`
+ sympy/series/order.py:269:52: error[invalid-argument-type] Argument to bound method `as_independent` is incorrect: Expected `Basic | type[Basic]`, found `Basic | int | float | complex | Any`
- sympy/series/order.py:269:52: error[invalid-argument-type] Argument to bound method `as_independent` is incorrect: Expected `Basic | type[Basic]`, found `int | Any | Basic | float | complex`
+ sympy/series/order.py:269:52: error[invalid-argument-type] Argument to bound method `as_independent` is incorrect: Expected `Basic | type[Basic]`, found `Basic | int | float | complex | Any`
- sympy/series/order.py:287:45: error[unsupported-operator] Unary operator `-` is not supported for object of type `int | Any | Basic | float | complex`
+ sympy/series/order.py:287:45: error[unsupported-operator] Unary operator `-` is not supported for object of type `Basic | int | float | complex | Any`
- sympy/series/order.py:288:48: error[unsupported-operator] Operator `**` is not supported between objects of type `int | Any | Basic | float | complex` and `Basic`
+ sympy/series/order.py:288:48: error[unsupported-operator] Operator `**` is not supported between objects of type `Basic | int | float | complex | Any` and `Basic`
- sympy/series/order.py:291:49: error[unsupported-operator] Unary operator `-` is not supported for object of type `int | Any | Basic | float | complex`
+ sympy/series/order.py:291:49: error[unsupported-operator] Unary operator `-` is not supported for object of type `Basic | int | float | complex | Any`
- sympy/series/order.py:297:53: error[unsupported-operator] Unary operator `-` is not supported for object of type `int | Any | Basic | float | complex`
+ sympy/series/order.py:297:53: error[unsupported-operator] Unary operator `-` is not supported for object of type `Basic | int | float | complex | Any`
- sympy/simplify/hyperexpand.py:1046:19: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Iterable[Unknown]`, found `int | Any | Basic | float | complex`
+ sympy/simplify/hyperexpand.py:1046:19: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Iterable[Unknown]`, found `Basic | int | float | complex | Any`
- sympy/simplify/hyperexpand.py:1047:19: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Iterable[Unknown]`, found `int | Any | Basic | float | complex`
+ sympy/simplify/hyperexpand.py:1047:19: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Iterable[Unknown]`, found `Basic | int | float | complex | Any`
- sympy/simplify/hyperexpand.py:1048:21: error[invalid-argument-type] Argument to bound method `pop` is incorrect: Expected `SupportsIndex`, found `int | Any | Basic | float | complex`
+ sympy/simplify/hyperexpand.py:1048:21: error[invalid-argument-type] Argument to bound method `pop` is incorrect: Expected `SupportsIndex`, found `Basic | int | float | complex | Any`
- sympy/simplify/hyperexpand.py:1087:19: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Iterable[Unknown]`, found `int | Any | Basic | float | complex`
+ sympy/simplify/hyperexpand.py:1087:19: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Iterable[Unknown]`, found `Basic | int | float | complex | Any`
- sympy/simplify/hyperexpand.py:1088:19: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Iterable[Unknown]`, found `int | Any | Basic | float | complex`
+ sympy/simplify/hyperexpand.py:1088:19: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Iterable[Unknown]`, found `Basic | int | float | complex | Any`
- sympy/simplify/hyperexpand.py:1089:21: error[invalid-argument-type] Argument to bound method `pop` is incorrect: Expected `SupportsIndex`, found `int | Any | Basic | float | complex`
+ sympy/simplify/hyperexpand.py:1089:21: error[invalid-argument-type] Argument to bound method `pop` is incorrect: Expected `SupportsIndex`, found `Basic | int | float | complex | Any`
- sympy/simplify/hyperexpand.py:1175:19: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Iterable[Unknown]`, found `int | Any | Basic | float | complex`
+ sympy/simplify/hyperexpand.py:1175:19: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Iterable[Unknown]`, found `Basic | int | float | complex | Any`
- sympy/simplify/hyperexpand.py:1176:19: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Iterable[Unknown]`, found `int | Any | Basic | float | complex`
+ sympy/simplify/hyperexpand.py:1176:19: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Iterable[Unknown]`, found `Basic | int | float | complex | Any`
- sympy/simplify/hyperexpand.py:1177:19: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Iterable[Unknown]`, found `int | Any | Basic | float | complex`
+ sympy/simplify/hyperexpand.py:1177:19: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Iterable[Unknown]`, found `Basic | int | float | complex | Any`
- sympy/simplify/hyperexpand.py:1178:19: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Iterable[Unknown]`, found `int | Any | Basic | float | complex`
+ sympy/simplify/hyperexpand.py:1178:19: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Iterable[Unknown]`, found `Basic | int | float | complex | Any`
- sympy/simplify/hyperexpand.py:1179:21: error[invalid-argument-type] Argument to bound method `pop` is incorrect: Expected `SupportsIndex`, found `int | Any | Basic | float | complex`
+ sympy/simplify/hyperexpand.py:1179:21: error[invalid-argument-type] Argument to bound method `pop` is incorrect: Expected `SupportsIndex`, found `Basic | int | float | complex | Any`
- sympy/simplify/hyperexpand.py:1213:19: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Iterable[Unknown]`, found `int | Any | Basic | float | complex`
+ sympy/simplify/hyperexpand.py:1213:19: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Iterable[Unknown]`, found `Basic | int | float | complex | Any`
- sympy/simplify/hyperexpand.py:1214:19: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Iterable[Unknown]`, found `int | Any | Basic | float | complex`
+ sympy/simplify/hyperexpand.py:1214:19: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Iterable[Unknown]`, found `Basic | int | float | complex | Any`
- sympy/simplify/hyperexpand.py:1215:19: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Iterable[Unknown]`, found `int | Any | Basic | float | complex`
+ sympy/simplify/hyperexpand.py:1215:19: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Iterable[Unknown]`, found `Basic | int | float | complex | Any`
- sympy/simplify/hyperexpand.py:1216:19: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Iterable[Unknown]`, found `int | Any | Basic | float | complex`
+ sympy/simplify/hyperexpand.py:1216:19: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Iterable[Unknown]`, found `Basic | int | float | complex | Any`
- sympy/simplify/hyperexpand.py:1217:21: error[invalid-argument-type] Argument to bound method `pop` is incorrect: Expected `SupportsIndex`, found `int | Any | Basic | float | complex`
+ sympy/simplify/hyperexpand.py:1217:21: error[invalid-argument-type] Argument to bound method `pop` is incorrect: Expected `SupportsIndex`, found `Basic | int | float | complex | Any`
- sympy/simplify/hyperexpand.py:1265:19: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Iterable[Unknown]`, found `int | Any | Basic | float | complex`
+ sympy/simplify/hyperexpand.py:1265:19: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Iterable[Unknown]`, found `Basic | int | float | complex | Any`
- sympy/simplify/hyperexpand.py:1266:19: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Iterable[Unknown]`, found `int | Any | Basic | float | complex`
+ sympy/simplify/hyperexpand.py:1266:19: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Iterable[Unknown]`, found `Basic | int | float | complex | Any`
- sympy/simplify/hyperexpand.py:1267:19: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Iterable[Unknown]`, found `int | Any | Basic | float | complex`
+ sympy/simplify/hyperexpand.py:1267:19: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Iterable[Unknown]`, found `Basic | int | float | complex | Any`
- sympy/simplify/hyperexpand.py:1268:19: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Iterable[Unknown]`, found `int | Any | Basic | float | complex`
+ sympy/simplify/hyperexpand.py:1268:19: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Iterable[Unknown]`, found `Basic | int | float | complex | Any`
- sympy/simplify/hyperexpand.py:1269:21: error[invalid-argument-type] Argument to bound method `pop` is incorrect: Expected `SupportsIndex`, found `int | Any | Basic | float | complex`
+ sympy/simplify/hyperexpand.py:1269:21: error[invalid-argument-type] Argument to bound method `pop` is incorrect: Expected `SupportsIndex`, found `Basic | int | float | complex | Any`
- sympy/simplify/hyperexpand.py:1313:19: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Iterable[Unknown]`, found `int | Any | Basic | float | complex`
+ sympy/simplify/hyperexpand.py:1313:19: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Iterable[Unknown]`, found `Basic | int | float | complex | Any`
- sympy/simplify/hyperexpand.py:1314:19: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Iterable[Unknown]`, found `int | Any | Basic | float | complex`
+ sympy/simplify/hyperexpand.py:1314:19: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Iterable[Unknown]`, found `Basic | int | float | complex | Any`
- sympy/simplify/hyperexpand.py:1315:19: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Iterable[Unknown]`, found `int | Any | Basic | float | complex`
+ sympy/simplify/hyperexpand.py:1315:19: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Iterable[Unknown]`, found `Basic | int | float | complex | Any`
- sympy/simplify/hyperexpand.py:1316:19: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Iterable[Unknown]`, found `int | Any | Basic | float | complex`
+ sympy/simplify/hyperexpand.py:1316:19: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Iterable[Unknown]`, found `Basic | int | float | complex | Any`
- sympy/simplify/hyperexpand.py:1317:21: error[invalid-argument-type] Argument to bound method `pop` is incorrect: Expected `SupportsIndex`, found `int | Any | Basic | float | complex`
+ sympy/simplify/hyperexpand.py:1317:21: error[invalid-argument-type] Argument to bound method `pop` is incorrect: Expected `SupportsIndex`, found `Basic | int | float | complex | Any`
- sympy/simplify/simplify.py:357:10: error[unsupported-operator] Operator `/` is not supported between two objects of type `int | Any | Basic | float | complex`
+ sympy/simplify/simplify.py:357:10: error[unsupported-operator] Operator `/` is not supported between two objects of type `Basic | int | float | complex | Any`
- sympy/solvers/recurr.py:417:9: error[unresolved-attribute] Attribute `subs` is not defined on `int`, `float`, `complex` in union `int | Any | Basic | float | complex`
+ sympy/solvers/recurr.py:417:9: error[unresolved-attribute] Attribute `subs` is not defined on `int`, `float`, `complex` in union `Basic | int | float | complex | Any`
- sympy/solvers/recurr.py:417:9: error[unresolved-attribute] Attribute `expand` is not defined on `Basic` in union `Any | Basic`
+ sympy/solvers/recurr.py:417:9: error[unresolved-attribute] Attribute `expand` is not defined on `Basic` in union `Basic | Any`
- sympy/solvers/recurr.py:421:24: error[unresolved-attribute] Attribute `subs` is not defined on `int`, `float`, `complex` in union `int | Any | Basic | float | complex`
+ sympy/solvers/recurr.py:421:24: error[unresolved-attribute] Attribute `subs` is not defined on `int`, `float`, `complex` in union `Basic | int | float | complex | Any`
- sympy/solvers/recurr.py:436:24: error[unresolved-attribute] Attribute `subs` is not defined on `int`, `float`, `complex` in union `int | Any | Basic | float | complex`
+ sympy/solvers/recurr.py:436:24: error[unresolved-attribute] Attribute `subs` is not defined on `int`, `float`, `complex` in union `Basic | int | float | complex | Any`
- sympy/solvers/recurr.py:589:23: error[unresolved-attribute] Attribute `subs` is not defined on `int`, `float`, `complex` in union `int | Any | Basic | float | complex`
+ sympy/solvers/recurr.py:589:23: error[unresolved-attribute] Attribute `subs` is not defined on `int`, `float`, `complex` in union `Basic | int | float | complex | Any`
- sympy/solvers/solvers.py:3176:26: error[unresolved-attribute] Attribute `as_independent` is not defined on `Basic` in union `Unknown | Divergent | Basic`
+ sympy/solvers/solvers.py:3176:26: error[unresolved-attribute] Attribute `as_independent` is not defined on `Basic` in union `Unknown | Divergent | Basic | Divergent`
- sympy/solvers/solvers.py:3200:24: error[unresolved-attribute] Attribute `as_independent` is not defined on `Basic` in union `Unknown | Divergent | Basic`
+ sympy/solvers/solvers.py:3200:24: error[unresolved-attribute] Attribute `as_independent` is not defined on `Basic` in union `Unknown | Divergent | Basic | Divergent`
- sympy/solvers/solvers.py:3214:21: error[unresolved-attribute] Attribute `is_polynomial` is not defined on `Basic` in union `Unknown | Divergent | Basic`
+ sympy/solvers/solvers.py:3214:21: error[unresolved-attribute] Attribute `is_polynomial` is not defined on `Basic` in union `Unknown | Divergent | Basic | Divergent`
- sympy/solvers/solvers.py:3262:38: error[unsupported-operator] Operator `**` is not supported between objects of type `Basic | Divergent` and `Literal[2]`
+ sympy/solvers/solvers.py:3262:38: error[unsupported-operator] Operator `**` is not supported between objects of type `Basic | Divergent | Divergent` and `Literal[2]`
- sympy/solvers/solvers.py:3262:45: error[unsupported-operator] Operator `**` is not supported between objects of type `Basic | Divergent` and `Literal[2]`
+ sympy/solvers/solvers.py:3262:45: error[unsupported-operator] Operator `**` is not supported between objects of type `Basic | Divergent | Divergent` and `Literal[2]`
- sympy/solvers/solvers.py:3278:35: error[unresolved-attribute] Attribute `exp` is not defined on `Basic` in union `Unknown | Divergent | Basic`
+ sympy/solvers/solvers.py:3278:35: error[unresolved-attribute] Attribute `exp` is not defined on `Basic` in union `Unknown | Divergent | Basic | Divergent`
- sympy/solvers/solvers.py:3278:58: error[unresolved-attribute] Attribute `exp` is not defined on `Basic` in union `Unknown | Divergent | Basic`
+ sympy/solvers/solvers.py:3278:58: error[unresolved-attribute] Attribute `exp` is not defined on `Basic` in union `Unknown | Divergent | Basic | Divergent`
- sympy/solvers/solvers.py:3279:19: error[unsupported-operator] Operator `/` is not supported between objects of type `Literal[1]` and `Unknown | Divergent | Basic`
+ sympy/solvers/solvers.py:3279:19: error[unsupported-operator] Operator `/` is not supported between objects of type `Literal[1]` and `Unknown | Divergent | Basic | Divergent`
- sympy/solvers/solvers.py:3291:13: error[unresolved-attribute] Attribute `exp` is not defined on `Basic` in union `Unknown | Divergent | Basic`
+ sympy/solvers/solvers.py:3291:13: error[unresolved-attribute] Attribute `exp` is not defined on `Basic` in union `Unknown | Divergent | Basic | Divergent`
- sympy/solvers/solvers.py:3291:52: error[unresolved-attribute] Attribute `exp` is not defined on `Basic` in union `Unknown | Divergent | Basic`
+ sympy/solvers/solvers.py:3291:52: error[unresolved-attribute] Attribute `exp` is not defined on `Basic` in union `Unknown | Divergent | Basic | Divergent`
- sympy/solvers/solvers.py:3292:42: error[unresolved-attribute] Attribute `base` is not defined on `Basic` in union `Unknown | Divergent | Basic`
+ sympy/solvers/solvers.py:3292:42: error[unresolved-attribute] Attribute `base` is not defined on `Basic` in union `Unknown | Divergent | Basic | Divergent`
- sympy/solvers/solvers.py:3293:27: error[unresolved-attribute] Attribute `exp` is not defined on `Basic` in union `Unknown | Divergent | Basic`
+ sympy/solvers/solvers.py:3293:27: error[unresolved-attribute] Attribute `exp` is not defined on `Basic` in union `Unknown | Divergent | Basic | Divergent`
- sympy/solvers/solvers.py:3294:19: error[unresolved-attribute] Attribute `base` is not defined on `Basic` in union `Unknown | Divergent | Basic`
+ sympy/solvers/solvers.py:3294:19: error[unresolved-attribute] Attribute `base` is not defined on `Basic` in union `Unknown | Divergent | Basic | Divergent`
- sympy/stats/symbolic_probability.py:531:55: error[unresolved-attribute] Attribute `expand` is not defined on `Basic` in union `Unknown | Basic`
+ sympy/stats/symbolic_probability.py:531:55: error[unresolved-attribute] Attribute `expand` is not defined on `Basic` in union `Basic | Unknown`
- sympy/stats/symbolic_probability.py:532:55: error[unresolved-attribute] Attribute `expand` is not defined on `Basic` in union `Unknown | Basic`
+ sympy/stats/symbolic_probability.py:532:55: error[unresolved-attribute] Attribute `expand` is not defined on `Basic` in union `Basic | Unknown`
- sympy/tensor/indexed.py:161:79: error[unresolved-attribute] Attribute `is_number` is not defined on `int`, `float`, `complex` in union `int | Any | Basic | float | complex`
+ sympy/tensor/indexed.py:161:79: error[unresolved-attribute] Attribute `is_number` is not defined on `int`, `float`, `complex` in union `Basic | int | float | complex | Any`
- sympy/tensor/indexed.py:169:39: error[invalid-argument-type] Argument to function `__new__` is incorrect: Expected `Basic`, found `int | Any | Basic | float | complex`
+ sympy/tensor/indexed.py:169:39: error[invalid-argument-type] Argument to function `__new__` is incorrect: Expected `Basic`, found `Basic | int | float | complex | Any`
- sympy/tensor/indexed.py:650:12: error[unresolved-attribute] Attribute `is_Number` is not defined on `int`, `float`, `complex`, `None` in union `int | Any | Basic | ... omitted 3 union elements`
+ sympy/tensor/indexed.py:650:12: error[unresolved-attribute] Attribute `is_Number` is not defined on `int`, `float`, `complex`, `None` in union `int | float | complex | ... omitted 3 union elements`
- sympy/tensor/indexed.py:651:20: error[unresolved-attribute] Attribute `is_integer` is not defined on `int`, `complex`, `None` in union `int | Any | Basic | ... omitted 3 union elements`
+ sympy/tensor/indexed.py:651:20: error[unresolved-attribute] Attribute `is_integer` is not defined on `int`, `complex`, `None` in union `int | float | complex | ... omitted 3 union elements`
- sympy/tensor/indexed.py:655:16: error[unresolved-attribute] Attribute `is_integer` is not defined on `int`, `complex`, `None` in union `int | Any | Basic | ... omitted 3 union elements`
+ sympy/tensor/indexed.py:655:16: error[unresolved-attribute] Attribute `is_integer` is not defined on `int`, `complex`, `None` in union `int | float | complex | ... omitted 3 union elements`
- sympy/tensor/indexed.py:678:33: error[invalid-argument-type] Argument to function `__new__` is incorrect: Expected `Basic`, found `int | Any | Basic | ... omitted 3 union elements`
+ sympy/tensor/indexed.py:678:33: error[invalid-argument-type] Argument to function `__new__` is incorrect: Expected `Basic`, found `int | float | complex | ... omitted 3 union elements`
- Found 16135 diagnostics
+ Found 16134 diagnostics

pandas-stubs (https://github.com/pandas-dev/pandas-stubs)
- tests/indexes/str/test_add.py:27:14: error[unsupported-operator] Operator `+` is not supported between objects of type `Index[Unknown | str]` and `Literal[4]`
+ tests/indexes/str/test_add.py:27:14: error[unsupported-operator] Operator `+` is not supported between objects of type `Index[str | Unknown]` and `Literal[4]`
- tests/indexes/str/test_add.py:28:23: error[unsupported-operator] Operator `+` is not supported between objects of type `Index[Unknown | str]` and `Literal["right"]`
+ tests/indexes/str/test_add.py:28:23: error[unsupported-operator] Operator `+` is not supported between objects of type `Index[str | Unknown]` and `Literal["right"]`
- tests/indexes/str/test_add.py:31:14: error[unsupported-operator] Operator `+` is not supported between objects of type `Literal[4]` and `Index[Unknown | str]`
+ tests/indexes/str/test_add.py:31:14: error[unsupported-operator] Operator `+` is not supported between objects of type `Literal[4]` and `Index[str | Unknown]`
- tests/indexes/str/test_add.py:42:14: error[unsupported-operator] Operator `+` is not supported between objects of type `Index[Unknown | str]` and `list[Unknown | int]`
+ tests/indexes/str/test_add.py:42:14: error[unsupported-operator] Operator `+` is not supported between objects of type `Index[str | Unknown]` and `list[Unknown | int]`
- tests/indexes/str/test_add.py:43:23: error[unsupported-operator] Operator `+` is not supported between objects of type `Index[Unknown | str]` and `list[Unknown | str]`
+ tests/indexes/str/test_add.py:43:23: error[unsupported-operator] Operator `+` is not supported between objects of type `Index[str | Unknown]` and `list[Unknown | str]`
- tests/indexes/str/test_add.py:44:23: error[unsupported-operator] Operator `+` is not supported between objects of type `Index[Unknown | str]` and `tuple[Unknown | str, ...]`
+ tests/indexes/str/test_add.py:44:23: error[unsupported-operator] Operator `+` is not supported between objects of type `Index[str | Unknown]` and `tuple[Unknown | str, ...]`
- tests/indexes/str/test_add.py:47:14: error[unsupported-operator] Operator `+` is not supported between objects of type `list[Unknown | int]` and `Index[Unknown | str]`
+ tests/indexes/str/test_add.py:47:14: error[unsupported-operator] Operator `+` is not supported between objects of type `list[Unknown | int]` and `Index[str | Unknown]`
- tests/indexes/str/test_add.py:48:23: error[unsupported-operator] Operator `+` is not supported between objects of type `list[Unknown | str]` and `Index[Unknown | str]`
+ tests/indexes/str/test_add.py:48:23: error[unsupported-operator] Operator `+` is not supported between objects of type `list[Unknown | str]` and `Index[str | Unknown]`
- tests/indexes/str/test_add.py:49:11: error[type-assertion-failure] Type `Index[Unknown | str]` does not match asserted type `Index[str]`
+ tests/indexes/str/test_add.py:49:11: error[type-assertion-failure] Type `Index[str | Unknown]` does not match asserted type `Index[str]`
- tests/indexes/str/test_mul.py:31:18: error[type-assertion-failure] Type `Index[Unknown | str]` does not match asserted type `Index[str]`
+ tests/indexes/str/test_mul.py:31:18: error[type-assertion-failure] Type `Index[str | Unknown]` does not match asserted type `Index[str]`
- tests/indexes/test_indexes.py:304:9: error[type-assertion-failure] Type `Index[Unknown | str]` does not match asserted type `Index[str]`
+ tests/indexes/test_indexes.py:304:9: error[type-assertion-failure] Type `Index[str | Unknown]` does not match asserted type `Index[str]`
- tests/indexes/test_indexes.py:311:9: error[type-assertion-failure] Type `Index[Unknown | str]` does not match asserted type `Index[str]`
+ tests/indexes/test_indexes.py:311:9: error[type-assertion-failure] Type `Index[str | Unknown]` does not match asserted type `Index[str]`
- tests/indexes/test_indexes.py:1027:11: error[type-assertion-failure] Type `Index[Unknown | str]` does not match asserted type `Index[str]`
+ tests/indexes/test_indexes.py:1027:11: error[type-assertion-failure] Type `Index[str | Unknown]` does not match asserted type `Index[str]`
- tests/indexes/test_indexes.py:1028:11: error[type-assertion-failure] Type `Unknown | str` does not match asserted type `str`
+ tests/indexes/test_indexes.py:1028:11: error[type-assertion-failure] Type `str | Unknown` does not match asserted type `str`
- tests/indexes/test_indexes.py:1029:11: error[type-assertion-failure] Type `Index[Unknown | str]` does not match asserted type `Index[str]`
+ tests/indexes/test_indexes.py:1029:11: error[type-assertion-failure] Type `Index[str | Unknown]` does not match asserted type `Index[str]`
- tests/indexes/test_indexes.py:1335:9: error[type-assertion-failure] Type `Index[Unknown | str]` does not match asserted type `Index[str]`
+ tests/indexes/test_indexes.py:1335:9: error[type-assertion-failure] Type `Index[str | Unknown]` does not match asserted type `Index[str]`
- tests/indexes/test_indexes.py:1532:11: error[type-assertion-failure] Type `Series[Unknown | str]` does not match asserted type `Series[str]`
+ tests/indexes/test_indexes.py:1532:11: error[type-assertion-failure] Type `Series[str | Unknown]` does not match asserted type `Series[str]`
+ tests/series/test_series.py:2439:9: error[type-assertion-failure] Type `Unknown` does not match asserted type `Series[Timestamp]`
- tests/test_string_accessors.py:29:11: error[type-assertion-failure] Type `Index[Unknown | str]` does not match asserted type `Index[str]`
+ tests/test_string_accessors.py:29:11: error[type-assertion-failure] Type `Index[str | Unknown]` does not match asserted type `Index[str]`
- tests/test_string_accessors.py:30:11: error[type-assertion-failure] Type `Index[bytes | Unknown]` does not match asserted type `Index[bytes]`
+ tests/test_string_accessors.py:30:11: error[type-assertion-failure] Type `Index[Unknown | bytes]` does not match asserted type `Index[bytes]`
- Found 4691 diagnostics
+ Found 4692 diagnostics

scipy (https://github.com/scipy/scipy)
- subprojects/array_api_compat/array_api_compat/array_api_compat/common/_linalg.py:113:15: error[unresolved-attribute] Attribute `max` is not defined on `tuple[Any, ...]` in union `Any | tuple[Any, ...]`
+ subprojects/array_api_compat/array_api_compat/array_api_compat/common/_linalg.py:113:15: error[unresolved-attribute] Attribute `max` is not defined on `tuple[Any, ...]` in union `tuple[Any, ...] | Any`
- subprojects/array_api_compat/array_api_compat/array_api_compat/common/_linalg.py:113:76: error[unresolved-attribute] Attribute `dtype` is not defined on `tuple[Any, ...]` in union `Any | tuple[Any, ...]`
+ subprojects/array_api_compat/array_api_compat/array_api_compat/common/_linalg.py:113:76: error[unresolved-attribute] Attribute `dtype` is not defined on `tuple[Any, ...]` in union `tuple[Any, ...] | Any`
- subprojects/array_api_compat/array_api_compat/array_api_compat/common/_linalg.py:117:15: error[unresolved-attribute] Attribute `max` is not defined on `tuple[Any, ...]` in union `Any | tuple[Any, ...]`
+ subprojects/array_api_compat/array_api_compat/array_api_compat/common/_linalg.py:117:15: error[unresolved-attribute] Attribute `max` is not defined on `tuple[Any, ...]` in union `tuple[Any, ...] | Any`

@astral-sh-bot
Copy link

astral-sh-bot bot commented Feb 23, 2026

Memory usage report

Summary

Project Old New Diff Outcome
prefect 711.45MB 711.92MB +0.07% (480.64kB)
sphinx 272.07MB 272.48MB +0.15% (416.01kB)
trio 121.13MB 121.29MB +0.13% (158.19kB)
flake8 49.45MB 49.48MB +0.04% (21.68kB)

Significant changes

Click to expand detailed breakdown

prefect

Name Old New Diff Outcome
loop_header_reachability 0.00B 546.11kB +546.11kB (new)
infer_definition_types 87.64MB 87.62MB -0.02% (20.49kB)
use_def_map 436.82kB 455.33kB +4.24% (18.52kB)
infer_expression_types_impl 61.57MB 61.55MB -0.03% (16.11kB)
all_narrowing_constraints_for_expression 5.78MB 5.76MB -0.26% (15.64kB)
infer_expression_type_impl 15.38MB 15.37MB -0.09% (13.59kB)
all_negative_narrowing_constraints_for_expression 2.40MB 2.39MB -0.53% (12.96kB)
UnionType 3.67MB 3.66MB -0.08% (2.97kB)
is_redundant_with_impl::interned_arguments 5.62MB 5.61MB -0.02% (1.20kB)
CallableType 1.98MB 1.98MB +0.04% (864.00B)
is_redundant_with_impl 5.64MB 5.64MB -0.01% (672.00B)
Type<'db>::try_call_dunder_get_ 11.40MB 11.40MB -0.00% (556.00B)
infer_scope_types_impl 52.39MB 52.39MB -0.00% (432.00B)
Type<'db>::member_lookup_with_policy_ 15.21MB 15.21MB +0.00% (276.00B)
overloads_and_implementation_inner 2.27MB 2.27MB -0.01% (204.00B)
... 7 more

sphinx

Name Old New Diff Outcome
loop_header_reachability 0.00B 454.35kB +454.35kB (new)
infer_expression_types_impl 22.05MB 22.03MB -0.07% (15.38kB)
infer_definition_types 24.48MB 24.46MB -0.06% (14.60kB)
use_def_map 126.15kB 139.75kB +10.78% (13.59kB)
infer_expression_type_impl 3.42MB 3.41MB -0.29% (10.23kB)
all_narrowing_constraints_for_expression 1.82MB 1.81MB -0.34% (6.30kB)
all_negative_narrowing_constraints_for_expression 840.16kB 836.12kB -0.48% (4.04kB)
is_redundant_with_impl::interned_arguments 2.16MB 2.16MB +0.14% (3.18kB)
UnionType 1.34MB 1.34MB -0.13% (1.81kB)
Type<'db>::member_lookup_with_policy_ 6.10MB 6.10MB -0.03% (1.77kB)
is_redundant_with_impl 1.86MB 1.86MB +0.08% (1.50kB)
IntersectionType 1.03MB 1.03MB -0.07% (736.00B)
infer_scope_types_impl 15.82MB 15.82MB -0.00% (576.00B)
StaticClassLiteral<'db>::try_mro_ 2.17MB 2.17MB -0.02% (392.00B)
Type<'db>::member_lookup_with_policy_::interned_arguments 2.54MB 2.54MB +0.01% (312.00B)
... 9 more

trio

Name Old New Diff Outcome
loop_header_reachability 0.00B 147.51kB +147.51kB (new)
UnionType 339.03kB 343.00kB +1.17% (3.97kB)
use_def_map 50.68kB 54.43kB +7.40% (3.75kB)
all_narrowing_constraints_for_expression 487.66kB 489.65kB +0.41% (1.99kB)
infer_definition_types 7.63MB 7.63MB -0.02% (1.63kB)
is_redundant_with_impl::interned_arguments 567.10kB 568.56kB +0.26% (1.46kB)
infer_expression_types_impl 7.20MB 7.20MB -0.02% (1.23kB)
all_negative_narrowing_constraints_for_expression 148.76kB 149.77kB +0.68% (1.01kB)
is_redundant_with_impl 487.48kB 488.27kB +0.16% (816.00B)
infer_expression_type_impl 1.49MB 1.49MB +0.02% (336.00B)
IntersectionType 256.59kB 256.76kB +0.06% (168.00B)
Type<'db>::member_lookup_with_policy_ 1.69MB 1.69MB +0.01% (108.00B)
infer_scope_types_impl 4.90MB 4.90MB +0.00% (72.00B)
place_by_id 558.39kB 558.32kB -0.01% (72.00B)
overloads_and_implementation_inner 326.27kB 326.21kB -0.02% (60.00B)
... 3 more

flake8

Name Old New Diff Outcome
loop_header_reachability 0.00B 20.51kB +20.51kB (new)
use_def_map 19.10kB 19.69kB +3.07% (600.00B)
infer_expression_type_impl 170.30kB 170.85kB +0.32% (560.00B)
infer_definition_types 1.89MB 1.89MB -0.02% (316.00B)
infer_expression_types_impl 1.08MB 1.08MB +0.02% (236.00B)
all_negative_narrowing_constraints_for_expression 35.98kB 36.07kB +0.25% (92.00B)
all_narrowing_constraints_for_expression 66.12kB 66.19kB +0.11% (76.00B)
infer_scope_types_impl 1012.92kB 1012.86kB -0.01% (60.00B)
infer_unpack_types 38.98kB 38.99kB +0.03% (12.00B)

@astral-sh-bot
Copy link

astral-sh-bot bot commented Feb 23, 2026

ecosystem-analyzer results

Lint rule Added Removed Changed
invalid-await 0 40 0
unresolved-attribute 0 0 10
unsupported-operator 0 0 3
invalid-argument-type 1 0 0
invalid-return-type 0 1 0
Total 1 41 13

Full report with detailed diff (timing results)

@mtshiba mtshiba marked this pull request as ready for review February 23, 2026 16:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ecosystem-analyzer ty Multi-file analysis & type inference

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant