Skip to content

[ty] Validate annotated assignments to attributes on self#23388

Merged
charliermarsh merged 1 commit intomainfrom
charlie/ann
Feb 19, 2026
Merged

[ty] Validate annotated assignments to attributes on self#23388
charliermarsh merged 1 commit intomainfrom
charlie/ann

Conversation

@charliermarsh
Copy link
Member

Summary

Closes astral-sh/ty#2840.

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

astral-sh-bot bot commented Feb 18, 2026

Typing conformance results

No changes detected ✅

@astral-sh-bot
Copy link

astral-sh-bot bot commented Feb 18, 2026

mypy_primer results

Changes were detected when running on open source projects
spack (https://github.com/spack/spack)
- lib/spack/spack/detection/path.py:169:33: error[invalid-argument-type] Argument to function `dedupe_paths` is incorrect: Expected `list[str]`, found `Unknown | list[int | PathLike[str] | PathLike[bytes] | ... omitted 3 union elements]`
+ lib/spack/spack/detection/path.py:169:33: error[invalid-argument-type] Argument to function `dedupe_paths` is incorrect: Expected `list[str]`, found `Unknown | list[int | str | bytes | ... omitted 3 union elements]`

werkzeug (https://github.com/pallets/werkzeug)
- src/werkzeug/routing/rules.py:481:31: warning[unused-type-ignore-comment] Unused blanket `type: ignore` directive
- Found 389 diagnostics
+ Found 388 diagnostics

scrapy (https://github.com/scrapy/scrapy)
- scrapy/extensions/httpcache.py:317:51: warning[unused-type-ignore-comment] Unused blanket `type: ignore` directive
+ scrapy/linkextractors/lxmlhtml.py:72:13: error[invalid-assignment] Object of type `(str & Top[(...) -> object]) | ((str, /) -> bool)` is not assignable to `(str, /) -> bool`: Incompatible value of type `(str & Top[(...) -> object]) | ((str, /) -> bool)`
+ scrapy/linkextractors/lxmlhtml.py:77:13: error[invalid-assignment] Object of type `(str & Top[(...) -> object]) | ((str, /) -> bool)` is not assignable to `(str, /) -> bool`: Incompatible value of type `(str & Top[(...) -> object]) | ((str, /) -> bool)`
- Found 1776 diagnostics
+ Found 1777 diagnostics

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, Unknown | str]]`
+ 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: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: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: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: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:20: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]]`

sockeye (https://github.com/awslabs/sockeye)
- sockeye/output_handler.py:254:80: error[invalid-argument-type] Argument to function `__new__` is incorrect: Expected `Iterable[list[str] | Unknown]`, found `list[list[str]] | None`
+ sockeye/output_handler.py:254:80: error[invalid-argument-type] Argument to function `__new__` is incorrect: Expected `Iterable[Unknown | list[str]]`, found `list[list[str]] | None`

beartype (https://github.com/beartype/beartype)
- beartype/_util/cache/map/utilmapunbounded.py:115:59: warning[unused-type-ignore-comment] Unused blanket `type: ignore` directive
- beartype/claw/_importlib/_clawimpload.py:177:40: warning[unused-type-ignore-comment] Unused blanket `type: ignore` directive
- Found 514 diagnostics
+ Found 512 diagnostics

dulwich (https://github.com/dulwich/dulwich)
+ dulwich/contrib/greenthreads.py:142:50: error[invalid-assignment] Object of type `((() -> dict[ObjectID, ObjectID]) & ~AlwaysTruthy & ~AlwaysFalsy) | (dict[ObjectID, ObjectID] & ~AlwaysFalsy) | dict[Unknown, Unknown]` is not assignable to `dict[ObjectID, ObjectID]`: Incompatible value of type `((() -> dict[ObjectID, ObjectID]) & ~AlwaysTruthy & ~AlwaysFalsy) | (dict[ObjectID, ObjectID] & ~AlwaysFalsy) | dict[Unknown, Unknown]`
- dulwich/contrib/swift.py:752:53: warning[unused-type-ignore-comment] Unused blanket `type: ignore` directive

PyGithub (https://github.com/PyGithub/PyGithub)
- github/Requester.py:899:57: error[invalid-argument-type] Argument to bound method `__hostnameHasDomain` is incorrect: Expected `str | list[str]`, found `Unknown | list[Unknown | str] | list[str | Unknown | None]`
+ github/Requester.py:899:57: error[invalid-argument-type] Argument to bound method `__hostnameHasDomain` is incorrect: Expected `str | list[str]`, found `Unknown | list[Unknown | str] | list[None | Unknown | str]`

pydantic (https://github.com/pydantic/pydantic)
- pydantic/_internal/_utils.py:184:48: warning[unused-type-ignore-comment] Unused blanket `type: ignore` directive
- Found 3202 diagnostics
+ Found 3201 diagnostics

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, ...]`

operator (https://github.com/canonical/operator)
- ops/framework.py:383:43: warning[unused-type-ignore-comment] Unused blanket `type: ignore` directive
- ops/framework.py:384:37: warning[unused-type-ignore-comment] Unused blanket `type: ignore` directive
- ops/framework.py:623:79: warning[unused-type-ignore-comment] Unused blanket `type: ignore` directive
- ops/framework.py:625:84: warning[unused-type-ignore-comment] Unused blanket `type: ignore` directive
- ops/framework.py:636:49: warning[unused-type-ignore-comment] Unused blanket `type: ignore` directive
- Found 132 diagnostics
+ Found 127 diagnostics

discord.py (https://github.com/Rapptz/discord.py)
+ discord/activity.py:416:39: error[invalid-assignment] Object of type `(Any & ~AlwaysFalsy) | dict[Unknown, Unknown]` is not assignable to `ActivityAssets`: Incompatible value of type `(Any & ~AlwaysFalsy) | dict[Unknown, Unknown]`
- discord/channel.py:249:82: warning[unused-type-ignore-comment] Unused blanket `type: ignore` directive
- discord/client.py:301:43: warning[unused-type-ignore-comment] Unused blanket `type: ignore` directive
- discord/components.py:788:83: warning[unused-type-ignore-comment] Unused blanket `type: ignore` directive
- discord/components.py:1369:83: warning[unused-type-ignore-comment] Unused blanket `type: ignore` directive
- discord/emoji.py:126:41: warning[unused-type-ignore-comment] Unused blanket `type: ignore` directive
- discord/ext/commands/core.py:492:33: warning[unused-type-ignore-comment] Unused blanket `type: ignore` directive
+ discord/file.py:93:42: error[invalid-assignment] Object of type `(str & IOBase) | (bytes & IOBase) | (PathLike[Any] & IOBase) | BufferedIOBase` is not assignable to `BufferedIOBase`: Incompatible value of type `(str & IOBase) | (bytes & IOBase) | (PathLike[Any] & IOBase) | BufferedIOBase`
- discord/player.py:184:57: warning[unused-type-ignore-comment] Unused blanket `type: ignore` directive
- discord/threads.py:188:78: warning[unused-type-ignore-comment] Unused blanket `type: ignore` directive
- Found 525 diagnostics
+ Found 519 diagnostics

pyppeteer (https://github.com/pyppeteer/pyppeteer)
+ pyppeteer/connection.py:204:50: error[invalid-assignment] Object of type `Connection | CDPSession` is not assignable to `Connection | None`: Incompatible value of type `Connection | CDPSession`
- Found 85 diagnostics
+ Found 86 diagnostics

mongo-python-driver (https://github.com/mongodb/mongo-python-driver)
+ bson/regex.py:97:28: error[invalid-assignment] Object of type `str | bytes` is not assignable to `_T@Regex`: Incompatible value of type `str | bytes`
- pymongo/asynchronous/mongo_client.py:772:42: warning[unused-type-ignore-comment] Unused blanket `type: ignore` directive
- pymongo/asynchronous/mongo_client.py:774:59: warning[unused-type-ignore-comment] Unused blanket `type: ignore` directive
- pymongo/asynchronous/mongo_client.py:2746:65: warning[unused-type-ignore-comment] Unused blanket `type: ignore` directive
- pymongo/asynchronous/mongo_client.py:2749:38: warning[unused-type-ignore-comment] Unused blanket `type: ignore` directive
- pymongo/network_layer.py:474:43: warning[unused-type-ignore-comment] Unused blanket `type: ignore` directive
- pymongo/synchronous/mongo_client.py:772:42: warning[unused-type-ignore-comment] Unused blanket `type: ignore` directive
- pymongo/synchronous/mongo_client.py:774:59: warning[unused-type-ignore-comment] Unused blanket `type: ignore` directive
- pymongo/synchronous/mongo_client.py:2736:65: warning[unused-type-ignore-comment] Unused blanket `type: ignore` directive
- pymongo/synchronous/mongo_client.py:2739:38: warning[unused-type-ignore-comment] Unused blanket `type: ignore` directive
- Found 434 diagnostics
+ Found 426 diagnostics

trio (https://github.com/python-trio/trio)
+ src/trio/testing/_raises_group.py:540:13: error[invalid-assignment] Object of type `tuple[type[BaseExcT_1@__init__] | Matcher[BaseExcT_1@__init__] | RaisesGroup[BaseExcT_2@__init__], *tuple[type[BaseExcT_1@__init__] | Matcher[BaseExcT_1@__init__] | RaisesGroup[BaseExcT_2@__init__], ...]]` is not assignable to `tuple[type[BaseExcT_co@RaisesGroup] | Matcher[BaseExcT_co@RaisesGroup] | RaisesGroup[BaseException], ...]`: Incompatible value of type `tuple[type[BaseExcT_1@__init__] | Matcher[BaseExcT_1@__init__] | RaisesGroup[BaseExcT_2@__init__], *tuple[type[BaseExcT_1@__init__] | Matcher[BaseExcT_1@__init__] | RaisesGroup[BaseExcT_2@__init__], ...]]`
+ src/trio/testing/_raises_group.py:610:13: error[invalid-assignment] Object of type `_ExceptionInfo[BaseException]` is not assignable to `_ExceptionInfo[BaseExceptionGroup[BaseExcT_co@RaisesGroup]]`: Incompatible value of type `_ExceptionInfo[BaseException]`
- Found 471 diagnostics
+ Found 473 diagnostics

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 | dict[Unknown | str, Unknown | str] | str | ... 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 | 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`
+ 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`

meson (https://github.com/mesonbuild/meson)
+ mesonbuild/ast/introspection.py:69:43: error[invalid-assignment] Object of type `None` is not assignable to `FunctionNode`: Incompatible value of type `None`
- mesonbuild/dependencies/cuda.py:137:76: error[invalid-argument-type] Argument to function `version_compare_many` is incorrect: Expected `str`, found `Unknown | str | None`
+ mesonbuild/dependencies/cuda.py:137:76: error[invalid-argument-type] Argument to function `version_compare_many` is incorrect: Expected `str`, found `str | None | Unknown`
+ mesonbuild/interpreterbase/baseobjects.py:108:48: error[invalid-assignment] Object of type `None` is not assignable to `BaseNode`: Incompatible value of type `None`
+ mesonbuild/modules/__init__.py:263:93: error[invalid-assignment] Object of type `Sequence[str | int | Sequence[Divergent] | ... omitted 6 union elements] & Top[list[Unknown]]` is not assignable to `list[str | int | Sequence[Divergent] | ... omitted 6 union elements]`: Incompatible value of type `Sequence[str | int | Sequence[Divergent] | ... omitted 6 union elements] & Top[list[Unknown]]`
+ mesonbuild/mtest.py:1678:35: error[invalid-assignment] Object of type `None` is not assignable to `list[str]`: Incompatible value of type `None`
- Found 2213 diagnostics
+ Found 2217 diagnostics

setuptools (https://github.com/pypa/setuptools)
+ setuptools/_vendor/wheel/_bdist_wheel.py:249:31: error[invalid-assignment] Object of type `None` is not assignable to `str`: Incompatible value of type `None`
- Found 1118 diagnostics
+ Found 1119 diagnostics

pwndbg (https://github.com/pwndbg/pwndbg)
+ pwndbg/aglib/disasm/instruction.py:308:28: error[invalid-assignment] Object of type `None` is not assignable to `int`: Incompatible value of type `None`
+ pwndbg/aglib/kernel/vmmap.py:32:54: error[invalid-assignment] Object of type `None` is not assignable to `tuple[tuple[str, int], ...]`: Incompatible value of type `None`
- Found 1885 diagnostics
+ Found 1887 diagnostics

scikit-build-core (https://github.com/scikit-build/scikit-build-core)
+ src/scikit_build_core/build/wheel.py:99:20: error[no-matching-overload] No overload of bound method `__init__` matches arguments
- Found 51 diagnostics
+ Found 52 diagnostics

dd-trace-py (https://github.com/DataDog/dd-trace-py)
+ ddtrace/internal/openfeature/writer.py:107:31: error[invalid-assignment] Object of type `bool | None` is not assignable to `bool`: Incompatible value of type `bool | None`
+ ddtrace/internal/openfeature/writer.py:110:29: error[invalid-assignment] Object of type `Unknown | DerivedVariable[str]` is not assignable to `str`: Incompatible value of type `Unknown | DerivedVariable[str]`
+ ddtrace/llmobs/_writer.py:162:29: error[invalid-assignment] Object of type `str | Unknown | DerivedVariable[str]` is not assignable to `str`: Incompatible value of type `str | Unknown | DerivedVariable[str]`
- 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 `str | Unknown | None | ... omitted 6 union elements`
- Found 9062 diagnostics
+ Found 9065 diagnostics

prefect (https://github.com/PrefectHQ/prefect)
- src/prefect/flow_engine.py:842:16: warning[unused-type-ignore-comment] Unused blanket `type: ignore` directive
+ src/prefect/flow_engine.py:1440:45: error[invalid-assignment] Object of type `PrefectLogAdapter` is not assignable to `Logger`: Incompatible value of type `PrefectLogAdapter`
- src/prefect/task_engine.py:788:16: warning[unused-type-ignore-comment] Unused blanket `type: ignore` directive
- src/prefect/task_engine.py:1415:16: warning[unused-type-ignore-comment] Unused blanket `type: ignore` directive
- Found 5684 diagnostics
+ Found 5682 diagnostics

cryptography (https://github.com/pyca/cryptography)
+ src/cryptography/x509/name.py:179:47: error[invalid-assignment] Object of type `bytes | str` is not assignable to `NameAttributeValueType@NameAttribute`: Incompatible value of type `bytes | str`
- Found 49 diagnostics
+ Found 50 diagnostics

static-frame (https://github.com/static-frame/static-frame)
- static_frame/test/unit/test_bus.py:2137:26: error[unresolved-attribute] Attribute `to_pairs` is not defined on `ndarray[Any, Any]` in union `@Todo | Series[Any, Any] | ndarray[Any, Any]`
+ static_frame/test/unit/test_bus.py:2137:26: error[unresolved-attribute] Attribute `to_pairs` is not defined on `ndarray[Any, Any]` in union `ndarray[Any, Any] | @Todo | Series[Any, Any]`
- static_frame/test/unit/test_bus.py:2138:26: error[unresolved-attribute] Attribute `to_pairs` is not defined on `ndarray[Any, Any]` in union `@Todo | Series[Any, Any] | ndarray[Any, Any]`
+ static_frame/test/unit/test_bus.py:2138:26: error[unresolved-attribute] Attribute `to_pairs` is not defined on `ndarray[Any, Any]` in union `ndarray[Any, Any] | @Todo | Series[Any, Any]`
- static_frame/test/unit/test_bus.py:2166:26: error[unresolved-attribute] Attribute `to_pairs` is not defined on `ndarray[Any, Any]` in union `@Todo | Series[Any, Any] | ndarray[Any, Any]`
+ static_frame/test/unit/test_bus.py:2166:26: error[unresolved-attribute] Attribute `to_pairs` is not defined on `ndarray[Any, Any]` in union `ndarray[Any, Any] | @Todo | Series[Any, Any]`
- static_frame/test/unit/test_bus.py:2167:26: error[unresolved-attribute] Attribute `to_pairs` is not defined on `ndarray[Any, Any]` in union `@Todo | Series[Any, Any] | ndarray[Any, Any]`
+ static_frame/test/unit/test_bus.py:2167:26: error[unresolved-attribute] Attribute `to_pairs` is not defined on `ndarray[Any, Any]` in union `ndarray[Any, Any] | @Todo | Series[Any, Any]`

rotki (https://github.com/rotki/rotki)
+ rotkehlchen/chain/aggregator.py:323:129: error[invalid-assignment] Object of type `dict[SupportedBlockchain, ((SupportedBlockchain, Literal["append", "remove"], /) -> None) | (bound method Self@__init__._init_substrate_account_modification(blockchain: Literal[SupportedBlockchain.POLKADOT, SupportedBlockchain.KUSAMA], append_or_remove: Literal["append", "remove"]) -> None)]` is not assignable to `dict[SupportedBlockchain, (SupportedBlockchain, Literal["append", "remove"], /) -> None]`: Incompatible value of type `dict[SupportedBlockchain, ((SupportedBlockchain, Literal["append", "remove"], /) -> None) | (bound method Self@__init__._init_substrate_account_modification(blockchain: Literal[SupportedBlockchain.POLKADOT, SupportedBlockchain.KUSAMA], append_or_remove: Literal["append", "remove"]) -> None)]`
+ rotkehlchen/chain/aggregator.py:327:121: error[invalid-assignment] Object of type `dict[SupportedBlockchain, ((SupportedBlockchain, Unknown, /) -> None) | (bound method Self@__init__._append_eth_account_modification(blockchain: Literal[SupportedBlockchain.ETHEREUM], address: ChecksumAddress) -> None)]` is not assignable to `dict[SupportedBlockchain, (SupportedBlockchain, Unknown, /) -> None]`: Incompatible value of type `dict[SupportedBlockchain, ((SupportedBlockchain, Unknown, /) -> None) | (bound method Self@__init__._append_eth_account_modification(blockchain: Literal[SupportedBlockchain.ETHEREUM], address: ChecksumAddress) -> None)]`
+ rotkehlchen/chain/aggregator.py:330:121: error[invalid-assignment] Object of type `dict[SupportedBlockchain, ((SupportedBlockchain, Unknown, /) -> None) | (bound method Self@__init__._remove_eth_account_modification(blockchain: Literal[SupportedBlockchain.ETHEREUM], address: ChecksumAddress) -> None)]` is not assignable to `dict[SupportedBlockchain, (SupportedBlockchain, Unknown, /) -> None]`: Incompatible value of type `dict[SupportedBlockchain, ((SupportedBlockchain, Unknown, /) -> None) | (bound method Self@__init__._remove_eth_account_modification(blockchain: Literal[SupportedBlockchain.ETHEREUM], address: ChecksumAddress) -> None)]`
- rotkehlchen/db/dbhandler.py:222:41: warning[unused-type-ignore-comment] Unused blanket `type: ignore` directive
- rotkehlchen/db/dbhandler.py:223:51: warning[unused-type-ignore-comment] Unused blanket `type: ignore` directive
- 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: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: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]`
+ 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]]`
- Found 2095 diagnostics
+ Found 2096 diagnostics

sympy (https://github.com/sympy/sympy)
+ sympy/algebras/tests/test_quaternion.py:422:33: error[unsupported-operator] Operator `-` is not supported between two objects of type `MutableDenseMatrix`
+ sympy/codegen/tests/test_matrix_nodes.py:27:21: error[unsupported-operator] Operator `-` is not supported between two objects of type `MutableDenseMatrix`
- 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/eigen.py:1202:37: error[unresolved-attribute] Object of type `T2'return@call_highest_priority | T1'return@call_highest_priority` has no attribute `pow`
+ sympy/matrices/expressions/tests/test_blockmatrix.py:235:13: error[unsupported-operator] Operator `+` is not supported between two objects of type `MutableDenseMatrix`
+ sympy/matrices/expressions/tests/test_blockmatrix.py:235:33: error[unsupported-operator] Operator `+` is not supported between two objects of type `MutableDenseMatrix`
+ sympy/matrices/expressions/tests/test_blockmatrix.py:235:53: error[unsupported-operator] Operator `+` is not supported between two objects of type `MutableDenseMatrix`
+ sympy/matrices/expressions/tests/test_blockmatrix.py:459:12: error[unsupported-operator] Operator `-` is not supported between two objects of type `MutableDenseMatrix`
+ sympy/matrices/expressions/tests/test_derivatives.py:551:26: error[unsupported-operator] Operator `+` is not supported between two objects of type `MatrixBase | Expr`
+ sympy/matrices/expressions/tests/test_matadd.py:36:12: error[unsupported-operator] Operator `+` is not supported between objects of type `MatrixBase` and `MatrixBase | Expr`
+ sympy/matrices/expressions/tests/test_matpow.py:124:47: error[unsupported-operator] Operator `+` is not supported between two objects of type `ImmutableDenseMatrix`
+ sympy/matrices/inverse.py:385:11: error[unsupported-operator] Operator `-` is not supported between objects of type `MatrixBase` and `MatrixBase | Expr | Unknown`
+ sympy/matrices/inverse.py:393:11: error[unsupported-operator] Operator `+` is not supported between objects of type `MatrixBase` and `MatrixBase | Expr | Unknown`
+ sympy/matrices/matrixbase.py:979:18: error[unsupported-operator] Operator `+` is not supported between two objects of type `Self@_eval_wilkinson`
+ sympy/matrices/matrixbase.py:2957:16: error[invalid-return-type] Return type does not match returned value: expected `Self@_eval_pow_by_cayley`, found `Self@_eval_pow_by_cayley | T2'return@call_highest_priority | T1'return@call_highest_priority | Unknown`
+ sympy/matrices/matrixbase.py:3256:16: error[invalid-return-type] Return type does not match returned value: expected `MatrixBase`, found `T2'return@call_highest_priority | T1'return@call_highest_priority`
+ sympy/matrices/matrixbase.py:3256:29: error[invalid-argument-type] Argument is incorrect: Expected `T2'return@call_highest_priority | T1'return@call_highest_priority`, found `MatrixBase`
+ sympy/matrices/matrixbase.py:3310:16: error[unsupported-operator] Operator `+` is not supported between two objects of type `MatrixBase`
+ sympy/matrices/matrixbase.py:3314:16: error[invalid-return-type] Return type does not match returned value: expected `Tmat@__sub__`, found `MatrixBase`
+ sympy/matrices/matrixbase.py:4386:16: error[unsupported-operator] Operator `+` is not supported between two objects of type `Self@add`
+ sympy/matrices/matrixbase.py:4923:16: error[invalid-return-type] Return type does not match returned value: expected `Self@analytic_func`, found `Self@analytic_func | T2'return@call_highest_priority | T1'return@call_highest_priority | Unknown`
+ sympy/matrices/repmatrix.py:321:17: error[unsupported-operator] Operator `-` is not supported between two objects of type `Self@_eval_is_symmetric`
+ sympy/matrices/solvers.py:741:12: error[invalid-return-type] Return type does not match returned value: expected `Tmat@_pinv_solve`, found `T2'return@call_highest_priority | T1'return@call_highest_priority`
+ sympy/matrices/tests/test_commonmatrix.py:1249:31: error[unsupported-operator] Operator `+` is not supported between objects of type `MutableDenseMatrix` and `ImmutableDenseNDimArray`
+ sympy/matrices/tests/test_eigen.py:406:20: error[invalid-argument-type] Argument to function `max` is incorrect: Expected `Iterable[Unknown]`, found `MatrixBase | Unknown`
+ sympy/matrices/tests/test_immutable.py:105:23: error[unsupported-operator] Operator `+` is not supported between two objects of type `ImmutableDenseMatrix`
+ sympy/matrices/tests/test_matrices.py:121:12: error[unsupported-operator] Operator `+` is not supported between two objects of type `MutableDenseMatrix`
+ sympy/matrices/tests/test_matrices.py:123:32: error[unsupported-operator] Operator `+` is not supported between two objects of type `MutableDenseMatrix`
+ sympy/matrices/tests/test_matrices.py:141:12: error[unsupported-operator] Operator `+` is not supported between two objects of type `MutableDenseMatrix`
+ sympy/matrices/tests/test_matrices.py:2179:22: error[unsupported-operator] Operator `+` is not supported between two objects of type `Unknown | MutableDenseMatrix`
+ sympy/matrices/tests/test_matrices.py:2207:26: error[unsupported-operator] Operator `+` is not supported between two objects of type `Unknown | MutableDenseMatrix`
+ sympy/matrices/tests/test_matrices.py:2908:21: error[unsupported-operator] Operator `-` is not supported between two objects of type `MutableDenseMatrix`
+ sympy/matrices/tests/test_matrices.py:2921:13: error[unsupported-operator] Operator `-` is not supported between two objects of type `MutableDenseMatrix`
+ sympy/matrices/tests/test_matrices.py:2936:13: error[unsupported-operator] Operator `-` is not supported between two objects of type `MutableDenseMatrix`
+ sympy/matrices/tests/test_matrices.py:2937:13: error[unsupported-operator] Operator `-` is not supported between two objects of type `MutableDenseMatrix`
+ sympy/matrices/tests/test_matrices.py:2948:14: error[unsupported-operator] Operator `-` is not supported between two objects of type `MutableDenseMatrix`
+ sympy/matrices/tests/test_matrices.py:3471:21: error[unsupported-operator] Operator `-` is not supported between two objects of type `MutableDenseMatrix`
+ sympy/matrices/tests/test_matrices.py:3478:12: error[unresolved-attribute] Attribute `rank` is not defined on `MatrixExpr` in union `MatrixBase | MatrixExpr | Unknown`
+ sympy/matrices/tests/test_matrices.py:3479:12: error[unresolved-attribute] Attribute `rank` is not defined on `MatrixExpr` in union `MatrixBase | MatrixExpr | Unknown`
+ sympy/matrices/tests/test_matrixbase.py:491:12: error[unsupported-operator] Operator `+` is not supported between two objects of type `MutableDenseMatrix`
+ sympy/matrices/tests/test_matrixbase.py:493:32: error[unsupported-operator] Operator `+` is not supported between two objects of type `MutableDenseMatrix`
+ sympy/matrices/tests/test_matrixbase.py:544:12: error[unsupported-operator] Operator `-` is not supported between two objects of type `MutableDenseMatrix`
+ sympy/matrices/tests/test_matrixbase.py:823:31: error[unsupported-operator] Operator `+` is not supported between objects of type `MutableDenseMatrix` and `ImmutableDenseNDimArray`
+ sympy/matrices/tests/test_matrixbase.py:876:12: error[unsupported-operator] Operator `+` is not supported between two objects of type `MutableDenseMatrix`
+ sympy/matrices/tests/test_matrixbase.py:878:32: error[unsupported-operator] Operator `+` is not supported between two objects of type `MutableDenseMatrix`
+ sympy/matrices/tests/test_matrixbase.py:900:12: error[unsupported-operator] Operator `+` is not supported between two objects of type `MutableDenseMatrix`
+ sympy/matrices/tests/test_matrixbase.py:2931:22: error[unsupported-operator] Operator `+` is not supported between two objects of type `Unknown | MutableDenseMatrix`
+ sympy/matrices/tests/test_matrixbase.py:2959:26: error[unsupported-operator] Operator `+` is not supported between two objects of type `Unknown | MutableDenseMatrix`
+ sympy/matrices/tests/test_matrixbase.py:3610:21: error[unsupported-operator] Operator `-` is not supported between two objects of type `MutableDenseMatrix`
+ sympy/matrices/tests/test_matrixbase.py:3624:13: error[unsupported-operator] Operator `-` is not supported between two objects of type `MutableDenseMatrix`
+ sympy/matrices/tests/test_matrixbase.py:3639:13: error[unsupported-operator] Operator `-` is not supported between two objects of type `MutableDenseMatrix`
+ sympy/matrices/tests/test_matrixbase.py:3640:13: error[unsupported-operator] Operator `-` is not supported between two objects of type `MutableDenseMatrix`
+ sympy/matrices/tests/test_matrixbase.py:3652:14: error[unsupported-operator] Operator `-` is not supported between two objects of type `MutableDenseMatrix`
+ sympy/matrices/tests/test_reductions.py:377:21: error[unsupported-operator] Operator `-` is not supported between two objects of type `MutableDenseMatrix`
+ sympy/matrices/tests/test_reductions.py:384:12: error[unresolved-attribute] Attribute `rank` is not defined on `MatrixExpr` in union `MatrixBase | MatrixExpr | Unknown`
+ sympy/matrices/tests/test_reductions.py:385:12: error[unresolved-attribute] Attribute `rank` is not defined on `MatrixExpr` in union `MatrixBase | MatrixExpr | Unknown`
+ sympy/matrices/tests/test_solvers.py:68:13: error[unsupported-operator] Operator `-` is not supported between two objects of type `MutableDenseMatrix`
+ sympy/matrices/tests/test_sparse.py:573:12: error[unsupported-operator] Operator `+` is not supported between two objects of type `MutableSparseMatrix`
+ sympy/matrices/tests/test_sparse.py:577:52: error[unsupported-operator] Operator `+` is not supported between two objects of type `MutableSparseMatrix`
+ sympy/matrices/tests/test_sparse.py:593:17: error[unsupported-operator] Operator `+` is not supported between two objects of type `MutableSparseMatrix`
+ sympy/parsing/autolev/test-examples/ruletest5.py:13:6: error[unsupported-operator] Operator `+` is not supported between two objects of type `MutableDenseMatrix`
+ sympy/parsing/autolev/test-examples/ruletest5.py:16:38: error[unsupported-operator] Operator `+` is not supported between two objects of type `MutableDenseMatrix`
+ sympy/parsing/autolev/test-examples/ruletest5.py:16:84: error[unsupported-operator] Operator `+` is not supported between two objects of type `MutableDenseMatrix`
+ sympy/parsing/autolev/test-examples/ruletest5.py:16:131: error[unsupported-operator] Operator `+` is not supported between two objects of type `MutableDenseMatrix`
+ sympy/parsing/autolev/test-examples/ruletest5.py:21:44: error[unsupported-operator] Operator `+` is not supported between two objects of type `MutableDenseMatrix`
+ sympy/parsing/autolev/test-examples/ruletest5.py:21:90: error[unsupported-operator] Operator `+` is not supported between two objects of type `MutableDenseMatrix`
+ sympy/parsing/autolev/test-examples/ruletest5.py:21:137: error[unsupported-operator] Operator `+` is not supported between two objects of type `MutableDenseMatrix`
+ sympy/parsing/autolev/test-examples/ruletest5.py:25:37: error[unsupported-operator] Operator `+` is not supported between two objects of type `MutableDenseMatrix`
+ sympy/parsing/autolev/test-examples/ruletest5.py:25:83: error[unsupported-operator] Operator `+` is not supported between two objects of type `MutableDenseMatrix`
+ sympy/parsing/autolev/test-examples/ruletest5.py:25:130: error[unsupported-operator] Operator `+` is not supported between two objects of type `MutableDenseMatrix`
+ sympy/physics/control/tests/test_lti.py:3777:31: error[unsupported-operator] Operator `+` is not supported between two objects of type `MutableDenseMatrix`
+ sympy/physics/control/tests/test_lti.py:3777:38: error[unsupported-operator] Operator `+` is not supported between two objects of type `MutableDenseMatrix`
+ sympy/physics/mechanics/lagrange.py:222:23: error[unsupported-operator] Operator `-` is not supported between two objects of type `Unknown | MutableDenseMatrix`
+ sympy/physics/mechanics/lagrange.py:346:17: error[unsupported-operator] Operator `+` is not supported between two objects of type `Unknown | MutableDenseMatrix`
+ sympy/physics/mechanics/linearize.py:217:28: error[unsupported-operator] Operator `+` is not supported between two objects of type `Unknown | MutableDenseMatrix`
+ sympy/physics/mechanics/linearize.py:229:29: error[unsupported-operator] Operator `+` is not supported between two objects of type `Unknown | MutableDenseMatrix`
+ sympy/physics/mechanics/linearize.py:241:29: error[unsupported-operator] Operator `+` is not supported between two objects of type `Unknown | MutableDenseMatrix`
+ sympy/physics/mechanics/tests/test_jointsmethod.py:247:17: error[unsupported-operator] Operator `-` is not supported between two objects of type `MutableDenseMatrix`
+ sympy/physics/mechanics/tests/test_jointsmethod.py:249:17: error[unsupported-operator] Operator `-` is not supported between two objects of type `MutableDenseMatrix`
+ sympy/physics/quantum/tests/test_represent.py:89:17: error[unsupported-operator] Operator `+` is not supported between objects of type `MatrixBase | Expr` and `MatrixBase`
+ sympy/physics/quantum/tests/test_represent.py:91:24: error[unsupported-operator] Operator `-` is not supported between two objects of type `MatrixBase | Expr`
+ sympy/physics/quantum/tests/test_represent.py:93:28: error[unsupported-operator] Operator `+` is not supported between two objects of type `MatrixBase | Expr`
+ sympy/physics/vector/functions.py:380:21: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Iterable[Unknown]`, found `MatrixBase | Unknown`
+ sympy/solvers/tests/test_numeric.py:137:11: error[unsupported-operator] Operator `+` is not supported between two objects of type `MutableDenseMatrix`
- sympy/solvers/tests/test_pde.py:108:16: error[invalid-argument-type] Argument to function `__new__` is incorrect: Expected `(Unknown | str, /) -> Unknown`, found `<class 'Function'>`
+ sympy/solvers/tests/test_pde.py:108:16: error[invalid-argument-type] Argument to function `__new__` is incorrect: Expected `(str | Unknown, /) -> Unknown`, found `<class 'Function'>`
- sympy/solvers/tests/test_pde.py:129:22: error[invalid-argument-type] Argument to function `__new__` is incorrect: Expected `(Unknown | str, /) -> Unknown`, found `<class 'Function'>`
+ sympy/solvers/tests/test_pde.py:129:22: error[invalid-argument-type] Argument to function `__new__` is incorrect: Expected `(str | Unknown, /) -> Unknown`, found `<class 'Function'>`
- sympy/solvers/tests/test_pde.py:137:16: error[invalid-argument-type] Argument to function `__new__` is incorrect: Expected `(Unknown | str, /) -> Unknown`, found `<class 'Function'>`
+ sympy/solvers/tests/test_pde.py:137:16: error[invalid-argument-type] Argument to function `__new__` is incorrect: Expected `(str | Unknown, /) -> Unknown`, found `<class 'Function'>`
- sympy/solvers/tests/test_pde.py:163:16: error[invalid-argument-type] Argument to function `__new__` is incorrect: Expected `(Unknown | str, /) -> Unknown`, found `<class 'Function'>`
+ sympy/solvers/tests/test_pde.py:163:16: error[invalid-argument-type] Argument to function `__new__` is incorrect: Expected `(str | Unknown, /) -> Unknown`, found `<class 'Function'>`
- sympy/solvers/tests/test_pde.py:201:16: error[invalid-argument-type] Argument to function `__new__` is incorrect: Expected `(Unknown | str, /) -> Unknown`, found `<class 'Function'>`
+ sympy/solvers/tests/test_pde.py:201:16: error[invalid-argument-type] Argument to function `__new__` is incorrect: Expected `(str | Unknown, /) -> Unknown`, found `<class 'Function'>`
- sympy/solvers/tests/test_pde.py:215:16: error[invalid-argument-type] Argument to function `__new__` is incorrect: Expected `(Unknown | str, /) -> Unknown`, found `<class 'Function'>`
+ sympy/solvers/tests/test_pde.py:215:16: error[invalid-argument-type] Argument to function `__new__` is incorrect: Expected `(str | Unknown, /) -> Unknown`, found `<class 'Function'>`
+ sympy/solvers/tests/test_solvers.py:722:19: error[unsupported-operator] Operator `-` is not supported between two objects of type `MatrixBase | Expr`
+ sympy/solvers/tests/test_solvers.py:723:19: error[unsupported-operator] Operator `-` is not supported between two objects of type `MatrixBase | Expr`
+ sympy/solvers/tests/test_solvers.py:724:19: error[unsupported-operator] Operator `-` is not supported between two objects of type `MatrixBase | Expr`
+ sympy/solvers/tests/test_solvers.py:724:30: error[unsupported-operator] Operator `-` is not supported between two objects of type `MatrixBase | Expr`
+ sympy/stats/tests/test_symbolic_multivariate.py:84:36: error[unsupported-operator] Operator `+` is not supported between two objects of type `MutableDenseMatrix`
+ sympy/stats/tests/test_symbolic_multivariate.py:84:84: error[unsupported-operator] Operator `+` is not supported between two objects of type `MutableDenseMatrix`
+ sympy/stats/tests/test_symbolic_multivariate.py:85:36: error[unsupported-operator] Operator `+` is not supported between two objects of type `MutableDenseMatrix`
+ sympy/tensor/tests/test_tensor.py:1693:19: error[unsupported-operator] Operator `+` is not supported between two objects of type `MutableDenseMatrix`
+ sympy/tensor/tests/test_tensor.py:1694:23: error[unsupported-operator] Operator `-` is not supported between two objects of type `MutableDenseMatrix`
- Found 15994 diagnostics
+ Found 16086 diagnostics

scikit-learn (https://github.com/scikit-learn/scikit-learn)
- sklearn/datasets/_lfw.py:469:60: error[invalid-argument-type] Argument to class `str` is incorrect: Expected `bytes | bytearray`, found `Unknown | str`
+ sklearn/datasets/_lfw.py:469:60: error[invalid-argument-type] Argument to class `str` is incorrect: Expected `bytes | bytearray`, found `str | Unknown`
- sklearn/utils/tests/test_multiclass.py:399:27: error[unresolved-attribute] Attribute `toarray` is not defined on `list[Unknown | list[Unknown | int]] & SparseABC`, `ndarray[tuple[Any, ...], dtype[Any]] & SparseABC`, `_NotAnArray & SparseABC`, `list[Unknown | int] & SparseABC`, `list[Unknown | str] & SparseABC`, `list[Unknown | list[Unknown | str]] & SparseABC`, `list[Unknown] & SparseABC`, `list[Unknown | int | float] & SparseABC`, `list[Unknown | list[Unknown]] & SparseABC`, `list[Unknown | tuple[()]] & SparseABC`, `list[Unknown | ndarray[tuple[Any, ...], dtype[Unknown]]] & SparseABC`, `list[Unknown | set[Unknown | int]] & SparseABC`, `list[Unknown | frozenset[int | Unknown]] & SparseABC`, `list[Unknown | dict[Unknown | int, Unknown | str]] & SparseABC` in union `(Unknown & SparseABC) | (list[Unknown | list[Unknown | int]] & SparseABC) | (ndarray[tuple[Any, ...], dtype[Any]] & SparseABC) | ... omitted 12 union elements`
+ sklearn/utils/tests/test_multiclass.py:399:27: error[unresolved-attribute] Attribute `toarray` is not defined on `list[Unknown | list[Unknown | int]] & SparseABC`, `ndarray[tuple[Any, ...], dtype[Any]] & SparseABC`, `_NotAnArray & SparseABC`, `list[Unknown | int] & SparseABC`, `list[Unknown | str] & SparseABC`, `list[Unknown | list[Unknown | str]] & SparseABC`, `list[Unknown] & SparseABC`, `list[Unknown | int | float] & SparseABC`, `list[Unknown | list[Unknown]] & SparseABC`, `list[Unknown | tuple[()]] & SparseABC`, `list[Unknown | ndarray[tuple[Any, ...], dtype[Unknown]]] & SparseABC`, `list[Unknown | set[Unknown | int]] & SparseABC`, `list[Unknown | frozenset[Unknown | int]] & SparseABC`, `list[Unknown | dict[Unknown | int, Unknown | str]] & SparseABC` in union `(Unknown & SparseABC) | (list[Unknown | list[Unknown | int]] & SparseABC) | (ndarray[tuple[Any, ...], dtype[Any]] & SparseABC) | ... omitted 12 union elements`

core (https://github.com/home-assistant/core)
- homeassistant/auth/auth_store.py:59:53: warning[unused-type-ignore-comment] Unused blanket `type: ignore` directive
- homeassistant/auth/auth_store.py:60:55: warning[unused-type-ignore-comment] Unused blanket `type: ignore` directive
- homeassistant/auth/auth_store.py:61:53: warning[unused-type-ignore-comment] Unused blanket `type: ignore` directive
- homeassistant/components/bluetooth/active_update_coordinator.py:80:31: warning[unused-type-ignore-comment] Unused blanket `type: ignore` directive
- homeassistant/components/teslemetry/climate.py:154:37: error[unresolved-attribute] Attribute `index` is not defined on `None` in union `Unknown | list[str | Unknown] | list[str] | None`
+ homeassistant/components/teslemetry/climate.py:154:37: error[unresolved-attribute] Attribute `index` is not defined on `None` in union `Unknown | list[Unknown | str] | list[str] | None`
- homeassistant/core.py:1305:41: warning[unused-type-ignore-comment] Unused blanket `type: ignore` directive
- homeassistant/helpers/config_entry_oauth2_flow.py:362:62: warning[unused-type-ignore-comment] Unused blanket `type: ignore` directive
- homeassistant/helpers/update_coordinator.py:118:35: warning[unused-type-ignore-comment] Unused blanket `type: ignore` directive
- Found 11836 diagnostics
+ Found 11829 diagnostics

colour (https://github.com/colour-science/colour)
+ colour/algebra/extrapolation.py:157:52: error[invalid-assignment] Object of type `NullInterpolator` is not assignable to `ProtocolInterpolator`: Incompatible value of type `NullInterpolator`
- Found 453 diagnostics
+ Found 454 diagnostics

pandas-stubs (https://github.com/pandas-dev/pandas-stubs)
- 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]`

@astral-sh-bot
Copy link

astral-sh-bot bot commented Feb 18, 2026

Memory usage report

Memory usage unchanged ✅

@astral-sh-bot
Copy link

astral-sh-bot bot commented Feb 18, 2026

ecosystem-analyzer results

Lint rule Added Removed Changed
invalid-await 0 40 0
unused-type-ignore-comment 0 40 0
invalid-assignment 25 0 0
invalid-argument-type 0 0 1
invalid-return-type 0 1 0
Total 25 81 1

Full report with detailed diff (timing results)

@oconnor663
Copy link
Contributor

Woah folks literally write self.target: int = None in the ecosystem...

let target_ty = if let Some(value_ty) = value_ty {
let declared_ty = annotated.inner_type();
if value_ty.is_assignable_to(self.db(), declared_ty) {
value_ty
Copy link
Contributor

Choose a reason for hiding this comment

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

@carljm were we recently discussing using the annotated type in all cases, instead of the inferred type? Should we do that here?

Copy link
Contributor

Choose a reason for hiding this comment

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

No, I think we should make that change separately and consistently in all the places, and keep this PR more focused on validating the self.attr assignment.

@oconnor663 oconnor663 removed their assignment Feb 18, 2026
@AlexWaygood AlexWaygood removed their request for review February 18, 2026 07:49
let target_ty = if let Some(value_ty) = value_ty {
let declared_ty = annotated.inner_type();
if value_ty.is_assignable_to(self.db(), declared_ty) {
value_ty
Copy link
Contributor

Choose a reason for hiding this comment

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

No, I think we should make that change separately and consistently in all the places, and keep this PR more focused on validating the self.attr assignment.

@charliermarsh charliermarsh merged commit e7c806c into main Feb 19, 2026
52 checks passed
@charliermarsh charliermarsh deleted the charlie/ann branch February 19, 2026 00:08
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.

validate annotated assignments to attributes on self

3 participants