Skip to content

Comments

[ty] fix inferring type variable from string literal argument#23326

Merged
AlexWaygood merged 4 commits intomainfrom
cjm/generic-string
Feb 16, 2026
Merged

[ty] fix inferring type variable from string literal argument#23326
AlexWaygood merged 4 commits intomainfrom
cjm/generic-string

Conversation

@carljm
Copy link
Contributor

@carljm carljm commented Feb 16, 2026

Summary

Fixes astral-sh/ty#2821

Allow a string literal argument to match against an iterable parameter in typevar inference.

Test Plan

Added mdtest.

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

astral-sh-bot bot commented Feb 16, 2026

Typing conformance results

No changes detected ✅

@astral-sh-bot
Copy link

astral-sh-bot bot commented Feb 16, 2026

mypy_primer results

Changes were detected when running on open source projects
attrs (https://github.com/python-attrs/attrs)
+ tests/test_validators.py:421:24: error[invalid-argument-type] Argument is incorrect: Expected `str & Any`, found `None`
- Found 639 diagnostics
+ Found 640 diagnostics

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 | bytes | PathLike[str] | ... 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 | Unknown | str | ... omitted 3 union elements]`

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`

scrapy (https://github.com/scrapy/scrapy)
- tests/test_utils_datatypes.py:274:29: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Sequence[Any]`, found `set[Unknown]`
+ tests/test_utils_datatypes.py:274:29: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Sequence[Any]`, found `set[str]`

porcupine (https://github.com/Akuli/porcupine)
+ porcupine/pluginmanager.py:133:49: error[invalid-argument-type] Argument to function `__new__` is incorrect: Expected `Iterable[Never]`, found `Unknown | str`
- Found 24 diagnostics
+ Found 25 diagnostics

pylint (https://github.com/pycqa/pylint)
- pylint/checkers/refactoring/implicit_booleaness_checker.py:219:24: error[unresolved-attribute] Attribute `as_string` is not defined on `str` in union `str | Unknown`
+ pylint/checkers/refactoring/implicit_booleaness_checker.py:219:24: error[unresolved-attribute] Attribute `as_string` is not defined on `str` in union `Unknown | str`
- pylint/checkers/refactoring/implicit_booleaness_checker.py:219:62: error[unresolved-attribute] Attribute `as_string` is not defined on `str` in union `str | Unknown`
+ pylint/checkers/refactoring/implicit_booleaness_checker.py:219:62: error[unresolved-attribute] Attribute `as_string` is not defined on `str` in union `Unknown | str`
- pylint/checkers/refactoring/implicit_booleaness_checker.py:222:27: error[unresolved-attribute] Attribute `as_string` is not defined on `str` in union `str | (Unknown & ~None)`
+ pylint/checkers/refactoring/implicit_booleaness_checker.py:222:27: error[unresolved-attribute] Attribute `as_string` is not defined on `str` in union `(Unknown & ~None) | str`
- pylint/checkers/refactoring/implicit_booleaness_checker.py:236:29: error[unresolved-attribute] Attribute `as_string` is not defined on `str` in union `str | Unknown`
+ pylint/checkers/refactoring/implicit_booleaness_checker.py:236:29: error[unresolved-attribute] Attribute `as_string` is not defined on `str` in union `Unknown | str`
- pylint/checkers/refactoring/implicit_booleaness_checker.py:239:29: error[unresolved-attribute] Attribute `as_string` is not defined on `str` in union `str | Unknown`
+ pylint/checkers/refactoring/implicit_booleaness_checker.py:239:29: error[unresolved-attribute] Attribute `as_string` is not defined on `str` in union `Unknown | str`

sockeye (https://github.com/awslabs/sockeye)
- 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`
+ 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`

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, 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/_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/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: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: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: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: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: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: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: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: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: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: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: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: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: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: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`
+ 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`

openlibrary (https://github.com/internetarchive/openlibrary)
- openlibrary/catalog/utils/__init__.py:132:17: error[unresolved-attribute] Attribute `search` is not defined on `str` in union `str | Unknown`
+ openlibrary/catalog/utils/__init__.py:132:17: error[unresolved-attribute] Attribute `search` is not defined on `str` in union `Unknown | str`

xarray (https://github.com/pydata/xarray)
- properties/test_properties.py:59:39: error[invalid-argument-type] Argument to function `find_independent_seasons` is incorrect: Expected `Sequence[str]`, found `list[Unknown | list[Unknown]]`
+ properties/test_properties.py:59:39: error[invalid-argument-type] Argument to function `find_independent_seasons` is incorrect: Expected `Sequence[str]`, found `list[Unknown | list[str]]`

prefect (https://github.com/PrefectHQ/prefect)
- src/prefect/input/run_input.py:672:20: error[invalid-return-type] Return type does not match returned value: expected `T@GetAutomaticInputHandler | AutomaticRunInput[T@GetAutomaticInputHandler]`, found `Unknown | Coroutine[Any, Any, Unknown]`
+ src/prefect/input/run_input.py:672:20: error[invalid-return-type] Return type does not match returned value: expected `T@GetAutomaticInputHandler | AutomaticRunInput[T@GetAutomaticInputHandler]`, found `T@GetAutomaticInputHandler | AutomaticRunInput[T@GetAutomaticInputHandler] | Coroutine[Any, Any, T@GetAutomaticInputHandler | AutomaticRunInput[T@GetAutomaticInputHandler]]`

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`

altair (https://github.com/vega/altair)
- tests/utils/test_schemapi.py:255:34: error[invalid-argument-type] Argument to bound method `from_dict` is incorrect: Expected `dict[str, Any]`, found `list[Unknown]`
+ tests/utils/test_schemapi.py:255:34: error[invalid-argument-type] Argument to bound method `from_dict` is incorrect: Expected `dict[str, Any]`, found `list[str]`

pandas (https://github.com/pandas-dev/pandas)
+ pandas/tests/groupby/transform/test_transform.py:635:5: error[invalid-assignment] Invalid subscript assignment with key of type `Literal[5]` and value of type `int | float` on object of type `list[str]`
- pandas/tests/indexes/multi/test_util.py:15:46: error[invalid-argument-type] Argument to function `cartesian_product` is incorrect: Expected `list[ndarray[tuple[Any, ...], dtype[Any]]]`, found `list[ndarray[tuple[Any, ...], dtype[Any]] | list[Unknown] | list[Unknown | int]]`
+ pandas/tests/indexes/multi/test_util.py:15:46: error[invalid-argument-type] Argument to function `cartesian_product` is incorrect: Expected `list[ndarray[tuple[Any, ...], dtype[Any]]]`, found `list[ndarray[tuple[Any, ...], dtype[Any]] | list[str] | list[Unknown | int]]`
- Found 4428 diagnostics
+ Found 4429 diagnostics

sympy (https://github.com/sympy/sympy)
- sympy/algebras/quaternion.py:132:22: error[invalid-assignment] Object of type `Basic | int | float | complex | Any` is not assignable to `Expr | int | float | complex`
+ sympy/algebras/quaternion.py:132:22: error[invalid-assignment] Object of type `Basic` is not assignable to `Expr | int | float | complex`
- sympy/algebras/quaternion.py:132:22: error[invalid-assignment] Object of type `Basic | int | float | complex | Any` is not assignable to `Expr | int | float | complex`
+ sympy/algebras/quaternion.py:132:22: error[invalid-assignment] Object of type `Basic` is not assignable to `Expr | int | float | complex`
- sympy/algebras/quaternion.py:132:22: error[invalid-assignment] Object of type `Basic | int | float | complex | Any` is not assignable to `Expr | int | float | complex`
+ sympy/algebras/quaternion.py:132:22: error[invalid-assignment] Object of type `Basic` is not assignable to `Expr | int | float | complex`
- sympy/algebras/quaternion.py:132:22: error[invalid-assignment] Object of type `Basic | int | float | complex | Any` is not assignable to `Expr | int | float | complex`
+ sympy/algebras/quaternion.py:132:22: error[invalid-assignment] Object of type `Basic` is not assignable to `Expr | int | float | complex`
- sympy/core/tests/test_basic.py:259:16: error[invalid-argument-type] Argument to function `__new__` is incorrect: Expected `(Unknown, /) -> Unknown`, found `<class 'Function'>`
+ sympy/core/tests/test_basic.py:259:16: error[invalid-argument-type] Argument to function `__new__` is incorrect: Expected `(str, /) -> Unknown`, found `<class 'Function'>`
- sympy/core/tests/test_eval.py:92:16: error[invalid-argument-type] Argument to function `__new__` is incorrect: Expected `(Unknown, /) -> Unknown`, found `<class 'Function'>`
+ sympy/core/tests/test_eval.py:92:16: error[invalid-argument-type] Argument to function `__new__` is incorrect: Expected `(str, /) -> Unknown`, found `<class 'Function'>`
- sympy/core/tests/test_multidimensional.py:6:20: error[invalid-argument-type] Argument to function `__new__` is incorrect: Expected `(Unknown, /) -> Unknown`, found `<class 'Function'>`
+ sympy/core/tests/test_multidimensional.py:6:20: error[invalid-argument-type] Argument to function `__new__` is incorrect: Expected `(str, /) -> Unknown`, found `<class 'Function'>`
- sympy/core/tests/test_subs.py:872:31: error[invalid-argument-type] Argument to function `__new__` is incorrect: Expected `(Unknown, /) -> Unknown`, found `<class 'Function'>`
+ sympy/core/tests/test_subs.py:872:31: error[invalid-argument-type] Argument to function `__new__` is incorrect: Expected `(str, /) -> Unknown`, found `<class 'Function'>`
- sympy/functions/combinatorial/factorials.py:967:13: error[unsupported-operator] Operator `-` is not supported between two objects of type `Basic | int | float | complex | Any`
+ sympy/functions/combinatorial/factorials.py:967:13: error[unsupported-operator] Operator `-` is not supported between two objects of type `Basic`
- sympy/functions/combinatorial/factorials.py:968:29: error[unresolved-attribute] Attribute `is_nonnegative` is not defined on `int`, `float`, `complex` in union `Basic | int | float | complex | Any`
- sympy/functions/combinatorial/factorials.py:968:47: error[unresolved-attribute] Attribute `is_integer` is not defined on `int`, `complex` in union `Basic | int | float | complex | Any`
- sympy/functions/combinatorial/factorials.py:969:12: error[unresolved-attribute] Attribute `is_zero` is not defined on `int`, `float`, `complex` in union `Basic | int | float | complex | Any`
- sympy/functions/combinatorial/factorials.py:972:13: error[unsupported-operator] Operator `-` is not supported between objects of type `Basic | int | float | complex | Any` and `Literal[1]`
+ sympy/functions/combinatorial/factorials.py:972:13: error[unsupported-operator] Operator `-` is not supported between objects of type `Basic` and `Literal[1]`
- sympy/functions/combinatorial/factorials.py:975:12: error[unresolved-attribute] Attribute `is_integer` is not defined on `int`, `complex` in union `Basic | int | float | complex | Any`
- sympy/functions/combinatorial/factorials.py:976:16: error[unresolved-attribute] Attribute `is_negative` is not defined on `int`, `float`, `complex` in union `Basic | int | float | complex | Any`
- sympy/functions/combinatorial/factorials.py:978:18: error[unresolved-attribute] Attribute `is_number` is not defined on `int`, `float`, `complex` in union `Basic | int | float | complex | Any`
- sympy/functions/combinatorial/factorials.py:984:14: error[unresolved-attribute] Attribute `is_number` is not defined on `int`, `float`, `complex` in union `Basic | int | float | complex | Any`
- sympy/functions/combinatorial/factorials.py:986:26: error[unsupported-operator] Operator `+` is not supported between objects of type `Basic | int | float | complex | Any` and `Literal[1]`
+ sympy/functions/combinatorial/factorials.py:986:26: error[unsupported-operator] Operator `+` is not supported between objects of type `Basic` and `Literal[1]`
- sympy/functions/combinatorial/factorials.py:986:40: error[unsupported-operator] Operator `+` is not supported between objects of type `Basic | int | float | complex | Any` and `Literal[1]`
+ sympy/functions/combinatorial/factorials.py:986:40: error[unsupported-operator] Operator `+` is not supported between objects of type `Basic` and `Literal[1]`
- sympy/functions/combinatorial/factorials.py:986:53: error[unsupported-operator] Operator `-` is not supported between two objects of type `Basic | int | float | complex | Any`
+ sympy/functions/combinatorial/factorials.py:986:53: error[unsupported-operator] Operator `-` is not supported between two objects of type `Basic`
- sympy/geometry/point.py:1295:25: error[unresolved-attribute] Attribute `tolist` is not defined on `T2'return@call_highest_priority`, `T1'return@call_highest_priority`, `Expr` in union `T2'return@call_highest_priority | T1'return@call_highest_priority | MatrixBase | Expr`
+ sympy/geometry/point.py:1295:25: error[unresolved-attribute] Attribute `tolist` is not defined on `T1'return@call_highest_priority`, `T2'return@call_highest_priority`, `Expr` in union `T1'return@call_highest_priority | T2'return@call_highest_priority | MatrixBase | Expr`
- sympy/geometry/polygon.py:1500:12: error[unresolved-attribute] Attribute `is_Number` is not defined on `int`, `float`, `complex` in union `Basic | int | float | complex | Any`
- sympy/geometry/polygon.py:1501:20: error[invalid-argument-type] Argument to function `as_int` is incorrect: Expected `SupportsIndex`, found `Basic | int | float | complex | Any`
+ sympy/geometry/polygon.py:1501:20: error[invalid-argument-type] Argument to function `as_int` is incorrect: Expected `SupportsIndex`, found `Basic`
- sympy/geometry/polygon.py:1502:16: error[unsupported-operator] Operator `<` is not supported between objects of type `Basic | int | float | complex | Any` and `Literal[3]`
+ sympy/geometry/polygon.py:1502:16: error[unsupported-operator] Operator `<` is not supported between objects of type `Basic` and `Literal[3]`
- sympy/geometry/polygon.py:1509:40: error[unresolved-attribute] Attribute `is_number` is not defined on `int`, `float`, `complex` in union `Basic | int | float | complex | Any`
- 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/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/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/integrals/tests/test_heurisch.py:389:17: error[unsupported-operator] Operator `*` is not supported between objects of type `T2'return@call_highest_priority | T1'return@call_highest_priority | MatrixBase | Expr` and `MutableDenseMatrix`
+ sympy/integrals/tests/test_heurisch.py:389:17: error[unsupported-operator] Operator `*` is not supported between objects of type `T1'return@call_highest_priority | T2'return@call_highest_priority | MatrixBase | Expr` and `MutableDenseMatrix`
- sympy/matrices/decompositions.py:1321:16: error[unresolved-attribute] Attribute `diagonalize` is not defined on `T2'return@call_highest_priority`, `T1'return@call_highest_priority`, `Expr` in union `T2'return@call_highest_priority | T1'return@call_highest_priority | MatrixBase | Expr`
+ sympy/matrices/decompositions.py:1321:16: error[unresolved-attribute] Attribute `diagonalize` is not defined on `T1'return@call_highest_priority`, `T2'return@call_highest_priority`, `Expr` in union `T1'return@call_highest_priority | T2'return@call_highest_priority | MatrixBase | Expr`
- sympy/matrices/decompositions.py:1334:13: error[unsupported-operator] Operator `*` is not supported between objects of type `T2'return@call_highest_priority | T1'return@call_highest_priority | MatrixBase | Expr` and `MatrixBase`
+ sympy/matrices/decompositions.py:1334:13: error[unsupported-operator] Operator `*` is not supported between objects of type `T1'return@call_highest_priority | T2'return@call_highest_priority | MatrixBase | Expr` and `MatrixBase`
- sympy/matrices/decompositions.py:1336:16: error[unresolved-attribute] Attribute `diagonalize` is not defined on `T2'return@call_highest_priority`, `T1'return@call_highest_priority`, `Expr` in union `T2'return@call_highest_priority | T1'return@call_highest_priority | MatrixBase | Expr`
+ sympy/matrices/decompositions.py:1336:16: error[unresolved-attribute] Attribute `diagonalize` is not defined on `T1'return@call_highest_priority`, `T2'return@call_highest_priority`, `Expr` in union `T1'return@call_highest_priority | T2'return@call_highest_priority | MatrixBase | Expr`
- sympy/matrices/decompositions.py:1348:13: error[unsupported-operator] Operator `*` is not supported between objects of type `T2'return@call_highest_priority | T1'return@call_highest_priority | MatrixBase | Expr` and `MatrixBase`
+ sympy/matrices/decompositions.py:1348:13: error[unsupported-operator] Operator `*` is not supported between objects of type `T1'return@call_highest_priority | T2'return@call_highest_priority | MatrixBase | Expr` and `MatrixBase`
- sympy/matrices/eigen.py:328:22: error[invalid-argument-type] Argument to bound method `_as_type` is incorrect: Expected `MatrixBase`, found `T2'return@call_highest_priority | T1'return@call_highest_priority | MatrixBase | Unknown`
+ sympy/matrices/eigen.py:328:22: error[invalid-argument-type] Argument to bound method `_as_type` is incorrect: Expected `MatrixBase`, found `T1'return@call_highest_priority | T2'return@call_highest_priority | MatrixBase | Unknown`
- 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/eigen.py:1202:37: error[unresolved-attribute] Object of type `T1'return@call_highest_priority | T2'return@call_highest_priority` has no attribute `pow`
- 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`
- 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: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:109:16: error[unresolved-attribute] Object of type `Basic` has no attribute `is_Identity`
+ sympy/matrices/expressions/kronecker.py:110:33: error[unresolved-attribute] Object of type `Basic` has no attribute `rows`
- 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`
- sympy/matrices/expressions/tests/test_derivatives.py:551:26: error[unsupported-operator] Operator `+` is not supported between two objects of type `T2'return@call_highest_priority | T1'return@call_highest_priority | MatrixBase | Expr`
+ sympy/matrices/expressions/tests/test_derivatives.py:551:26: error[unsupported-operator] Operator `+` is not supported between two objects of type `T1'return@call_highest_priority | T2'return@call_highest_priority | MatrixBase | Expr`
- sympy/matrices/expressions/tests/test_matadd.py:36:12: error[unsupported-operator] Operator `+` is not supported between objects of type `MatrixBase` and `T2'return@call_highest_priority | T1'return@call_highest_priority | MatrixBase | Expr`
+ sympy/matrices/expressions/tests/test_matadd.py:36:12: error[unsupported-operator] Operator `+` is not supported between objects of type `MatrixBase` and `T1'return@call_highest_priority | T2'return@call_highest_priority | MatrixBase | Expr`
- sympy/matrices/expressions/tests/test_matmul.py:158:68: error[unresolved-attribute] Attribute `as_explicit` is not defined on `T2'return@call_highest_priority`, `T1'return@call_highest_priority`, `Expr` in union `T2'return@call_highest_priority | T1'return@call_highest_priority | MatrixBase | Expr`
+ sympy/matrices/expressions/tests/test_matmul.py:158:68: error[unresolved-attribute] Attribute `as_explicit` is not defined on `T1'return@call_highest_priority`, `T2'return@call_highest_priority`, `Expr` in union `T1'return@call_highest_priority | T2'return@call_highest_priority | MatrixBase | Expr`
- sympy/matrices/expressions/tests/test_matpow.py:123:46: error[unsupported-operator] Operator `**` is not supported between objects of type `T2'return@call_highest_priority | T1'return@call_highest_priority | MatrixBase | Expr` and `Literal[2]`
+ sympy/matrices/expressions/tests/test_matpow.py:123:46: error[unsupported-operator] Operator `**` is not supported between objects of type `T1'return@call_highest_priority | T2'return@call_highest_priority | MatrixBase | Expr` and `Literal[2]`
- sympy/matrices/expressions/tests/test_permutation.py:27:12: error[unresolved-attribute] Attribute `as_explicit` is not defined on `T2'return@call_highest_priority`, `T1'return@call_highest_priority`, `Expr` in union `T2'return@call_highest_priority | T1'return@call_highest_priority | MatrixBase | Expr`
+ sympy/matrices/expressions/tests/test_permutation.py:27:12: error[unresolved-attribute] Attribute `as_explicit` is not defined on `T1'return@call_highest_priority`, `T2'return@call_highest_priority`, `Expr` in union `T1'return@call_highest_priority | T2'return@call_highest_priority | MatrixBase | Expr`
- sympy/matrices/inverse.py:384:11: error[unsupported-operator] Operator `*` is not supported between objects of type `T2'return@call_highest_priority | T1'return@call_highest_priority | MatrixBase | Expr` and `MatrixBase`
+ sympy/matrices/inverse.py:384:11: error[unsupported-operator] Operator `*` is not supported between objects of type `T1'return@call_highest_priority | T2'return@call_highest_priority | MatrixBase | Expr` and `MatrixBase`
- sympy/matrices/inverse.py:392:11: error[unsupported-operator] Unary operator `-` is not supported for object of type `T2'return@call_highest_priority | T1'return@call_highest_priority | MatrixBase | Expr`
+ sympy/matrices/inverse.py:392:11: error[unsupported-operator] Unary operator `-` is not supported for object of type `T1'return@call_highest_priority | T2'return@call_highest_priority | MatrixBase | Expr`
- sympy/matrices/inverse.py:393:19: error[unsupported-operator] Operator `*` is not supported between objects of type `T2'return@call_highest_priority | T1'return@call_highest_priority | MatrixBase | Expr` and `MatrixBase | Expr`
+ sympy/matrices/inverse.py:393:19: error[unsupported-operator] Operator `*` is not supported between objects of type `T1'return@call_highest_priority | T2'return@call_highest_priority | MatrixBase | Expr` and `MatrixBase | Expr`
- sympy/matrices/inverse.py:393:22: error[unsupported-operator] Unary operator `-` is not supported for object of type `T2'return@call_highest_priority | T1'return@call_highest_priority | MatrixBase | Expr`
+ sympy/matrices/inverse.py:393:22: error[unsupported-operator] Unary operator `-` is not supported for object of type `T1'return@call_highest_priority | T2'return@call_highest_priority | MatrixBase | Expr`
- 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: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 | T1'return@call_highest_priority | T2'return@call_highest_priority | Unknown`
- sympy/matrices/matrixbase.py:3046:5: error[invalid-argument-type] Argument is incorrect: Expected `(T2'return@call_highest_priority | T1'return@call_highest_priority | MatrixBase | Expr, T2'return@call_highest_priority | T1'return@call_highest_priority | MatrixBase | Expr, /) -> T2'return@call_highest_priority | T1'return@call_highest_priority | MatrixBase | Expr`, found `Overload[[Self](self, other: Self) -> Self, (self, other: MatrixBase) -> MatrixBase, (self, other: Expr) -> MatrixBase]`
+ sympy/matrices/matrixbase.py:3046:5: error[invalid-argument-type] Argument is incorrect: Expected `(T1'return@call_highest_priority | T2'return@call_highest_priority | MatrixBase | Expr, T1'return@call_highest_priority | T2'return@call_highest_priority | MatrixBase | Expr, /) -> T1'return@call_highest_priority | T2'return@call_highest_priority | MatrixBase | Expr`, found `Overload[[Self](self, other: Self) -> Self, (self, other: MatrixBase) -> MatrixBase, (self, other: Expr) -> MatrixBase]`
- 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:16: error[invalid-return-type] Return type does not match returned value: expected `MatrixBase`, found `T1'return@call_highest_priority | T2'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:3256:29: error[invalid-argument-type] Argument is incorrect: Expected `T1'return@call_highest_priority | T2'return@call_highest_priority`, found `MatrixBase`
- sympy/matrices/matrixbase.py:4640:16: error[invalid-return-type] Return type does not match returned value: expected `Self@D`, found `T2'return@call_highest_priority | T1'return@call_highest_priority | MatrixBase | Expr`
+ sympy/matrices/matrixbase.py:4640:16: error[invalid-return-type] Return type does not match returned value: expected `Self@D`, found `T1'return@call_highest_priority | T2'return@call_highest_priority | MatrixBase | Expr`
- 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/matrixbase.py:4923:16: error[invalid-return-type] Return type does not match returned value: expected `Self@analytic_func`, found `Self@analytic_func | T1'return@call_highest_priority | T2'return@call_highest_priority | Unknown`
- sympy/matrices/matrixbase.py:5076:19: error[unsupported-operator] Operator `*` is not supported between objects of type `@Todo | T2'return@call_highest_priority | T1'return@call_highest_priority | MatrixBase | Expr` and `@Todo | Self@log`
+ sympy/matrices/matrixbase.py:5076:19: error[unsupported-operator] Operator `*` is not supported between objects of type `@Todo | T1'return@call_highest_priority | T2'return@call_highest_priority | MatrixBase | Expr` and `@Todo | Self@log`
- sympy/matrices/solvers.py:637:27: error[invalid-argument-type] Argument to bound method `vstack` is incorrect: Argument type `T2'return@call_highest_priority | T1'return@call_highest_priority | MatrixBase | Unknown` does not satisfy upper bound `MatrixBase` of type variable `Self`
+ sympy/matrices/solvers.py:637:27: error[invalid-argument-type] Argument to bound method `vstack` is incorrect: Argument type `T1'return@call_highest_priority | T2'return@call_highest_priority | MatrixBase | Unknown` does not satisfy upper bound `MatrixBase` of type variable `Self`
- sympy/matrices/solvers.py:637:27: error[invalid-argument-type] Argument to bound method `vstack` is incorrect: Expected `Tmat@_gauss_jordan_solve`, found `T2'return@call_highest_priority | T1'return@call_highest_priority | MatrixBase | Unknown`
+ sympy/matrices/solvers.py:637:27: error[invalid-argument-type] Argument to bound method `vstack` is incorrect: Expected `Tmat@_gauss_jordan_solve`, found `T1'return@call_highest_priority | T2'return@call_highest_priority | MatrixBase | Unknown`
- 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/solvers.py:741:12: error[invalid-return-type] Return type does not match returned value: expected `Tmat@_pinv_solve`, found `T1'return@call_highest_priority | T2'return@call_highest_priority`
- sympy/matrices/solvers.py:976:16: error[unresolved-attribute] Attribute `solve` is not defined on `T2'return@call_highest_priority`, `T1'return@call_highest_priority`, `Expr` in union `T2'return@call_highest_priority | T1'return@call_highest_priority | MatrixBase | Expr`
+ sympy/matrices/solvers.py:976:16: error[unresolved-attribute] Attribute `solve` is not defined on `T1'return@call_highest_priority`, `T2'return@call_highest_priority`, `Expr` in union `T1'return@call_highest_priority | T2'return@call_highest_priority | MatrixBase | Expr`
- sympy/matrices/solvers.py:976:30: error[invalid-argument-type] Argument to bound method `solve` is incorrect: Argument type `T2'return@call_highest_priority | T1'return@call_highest_priority | MatrixBase | Expr` does not satisfy upper bound `MatrixBase` of type variable `Self`
+ sympy/matrices/solvers.py:976:30: error[invalid-argument-type] Argument to bound method `solve` is incorrect: Argument type `T1'return@call_highest_priority | T2'return@call_highest_priority | MatrixBase | Expr` does not satisfy upper bound `MatrixBase` of type variable `Self`
- sympy/matrices/solvers.py:976:30: error[invalid-argument-type] Argument to bound method `solve` is incorrect: Expected `MatrixBase`, found `T2'return@call_highest_priority | T1'return@call_highest_priority | MatrixBase | Expr`
+ sympy/matrices/solvers.py:976:30: error[invalid-argument-type] Argument to bound method `solve` is incorrect: Expected `MatrixBase`, found `T1'return@call_highest_priority | T2'return@call_highest_priority | MatrixBase | Expr`
- sympy/matrices/sparse.py:417:16: error[unresolved-attribute] Attribute `inv` is not defined on `T2'return@call_highest_priority`, `T1'return@call_highest_priority`, `Expr` in union `T2'return@call_highest_priority | T1'return@call_highest_priority | MatrixBase | Expr`
+ sympy/matrices/sparse.py:417:16: error[unresolved-attribute] Attribute `inv` is not defined on `T1'return@call_highest_priority`, `T2'return@call_highest_priority`, `Expr` in union `T1'return@call_highest_priority | T2'return@call_highest_priority | MatrixBase | Expr`
- sympy/matrices/tests/test_decompositions.py:23:12: error[unresolved-attribute] Attribute `permute_rows` is not defined on `T2'return@call_highest_priority`, `T1'return@call_highest_priority`, `Expr` in union `T2'return@call_highest_priority | T1'return@call_highest_priority | MatrixBase | Expr`
+ sympy/matrices/tests/test_decompositions.py:23:12: error[unresolved-attribute] Attribute `permute_rows` is not defined on `T1'return@call_highest_priority`, `T2'return@call_highest_priority`, `Expr` in union `T1'return@call_highest_priority | T2'return@call_highest_priority | MatrixBase | Expr`
- sympy/matrices/tests/test_decompositions.py:32:12: error[unresolved-attribute] Attribute `permute_rows` is not defined on `T2'return@call_highest_priority`, `T1'return@call_highest_priority`, `Expr` in union `T2'return@call_highest_priority | T1'return@call_highest_priority | MatrixBase | Expr`
+ sympy/matrices/tests/test_decompositions.py:32:12: error[unresolved-attribute] Attribute `permute_rows` is not defined on `T1'return@call_highest_priority`, `T2'return@call_highest_priority`, `Expr` in union `T1'return@call_highest_priority | T2'return@call_highest_priority | MatrixBase | Expr`
- sympy/matrices/tests/test_decompositions.py:42:12: error[unresolved-attribute] Attribute `permute_rows` is not defined on `T2'return@call_highest_priority`, `T1'return@call_highest_priority`, `Expr` in union `T2'return@call_highest_priority | T1'return@call_highest_priority | MatrixBase | Expr`
+ sympy/matrices/tests/test_decompositions.py:42:12: error[unresolved-attribute] Attribute `permute_rows` is not defined on `T1'return@call_highest_priority`, `T2'return@call_highest_priority`, `Expr` in union `T1'return@call_highest_priority | T2'return@call_highest_priority | MatrixBase | Expr`
- sympy/matrices/tests/test_decompositions.py:51:12: error[unresolved-attribute] Attribute `permute_rows` is not defined on `T2'return@call_highest_priority`, `T1'return@call_highest_priority`, `Expr` in union `T2'return@call_highest_priority | T1'return@call_highest_priority | MatrixBase | Expr`
+ sympy/matrices/tests/test_decompositions.py:51:12: error[unresolved-attribute] Attribute `permute_rows` is not defined on `T1'return@call_highest_priority`, `T2'return@call_highest_priority`, `Expr` in union `T1'return@call_highest_priority | T2'return@call_highest_priority | MatrixBase | Expr`
- sympy/matrices/tests/test_decompositions.py:57:12: error[unresolved-attribute] Attribute `permute_rows` is not defined on `T2'return@call_highest_priority`, `T1'return@call_highest_priority`, `Expr` in union `T2'return@call_highest_priority | T1'return@call_highest_priority | MatrixBase | Expr`
+ sympy/matrices/tests/test_decompositions.py:57:12: error[unresolved-attribute] Attribute `permute_rows` is not defined on `T1'return@call_highest_priority`, `T2'return@call_highest_priority`, `Expr` in union `T1'return@call_highest_priority | T2'return@call_highest_priority | MatrixBase | Expr`
- sympy/matrices/tests/test_decompositions.py:77:19: error[unsupported-operator] Operator `*` is not supported between objects of type `T2'return@call_highest_priority | T1'return@call_highest_priority | MatrixBase | Expr` and `MutableDenseMatrix`
+ sympy/matrices/tests/test_decompositions.py:77:19: error[unsupported-operator] Operator `*` is not supported between objects of type `T1'return@call_highest_priority | T2'return@call_highest_priority | MatrixBase | Expr` and `MutableDenseMatrix`
- sympy/matrices/tests/test_decompositions.py:84:19: error[unsupported-operator] Operator `*` is not supported between objects of type `T2'return@call_highest_priority | T1'return@call_highest_priority | MatrixBase | Expr` and `MutableDenseMatrix`
+ sympy/matrices/tests/test_decompositions.py:84:19: error[unsupported-operator] Operator `*` is not supported between objects of type `T1'return@call_highest_priority | T2'return@call_highest_priority | MatrixBase | Expr` and `MutableDenseMatrix`
- sympy/matrices/tests/test_decompositions.py:90:19: error[unsupported-operator] Operator `*` is not supported between objects of type `T2'return@call_highest_priority | T1'return@call_highest_priority | MatrixBase | Expr` and `MutableDenseMatrix`
+ sympy/matrices/tests/test_decompositions.py:90:19: error[unsupported-operator] Operator `*` is not supported between objects of type `T1'return@call_highest_priority | T2'return@call_highest_priority | MatrixBase | Expr` and `MutableDenseMatrix`
- sympy/matrices/tests/test_decompositions.py:103:12: error[unsupported-operator] Operator `*` is not supported between objects of type `T2'return@call_highest_priority | T1'return@call_highest_priority | MatrixBase | Expr` and `MutableDenseMatrix`
+ sympy/matrices/tests/test_decompositions.py:103:12: error[unsupported-operator] Operator `*` is not supported between objects of type `T1'return@call_highest_priority | T2'return@call_highest_priority | MatrixBase | Expr` and `MutableDenseMatrix`
- sympy/matrices/tests/test_decompositions.py:110:12: error[unsupported-operator] Operator `*` is not supported between objects of type `T2'return@call_highest_priority | T1'return@call_highest_priority | MatrixBase | Expr` and `MutableDenseMatrix`
+ sympy/matrices/tests/test_decompositions.py:110:12: error[unsupported-operator] Operator `*` is not supported between objects of type `T1'return@call_highest_priority | T2'return@call_highest_priority | MatrixBase | Expr` and `MutableDenseMatrix`
- sympy/matrices/tests/test_decompositions.py:123:12: error[unsupported-operator] Operator `*` is not supported between objects of type `T2'return@call_highest_priority | T1'return@call_highest_priority | MatrixBase | Expr` and `MutableDenseMatrix`
+ sympy/matrices/tests/test_decompositions.py:123:12: error[unsupported-operator] Operator `*` is not supported between objects of type `T1'return@call_highest_priority | T2'return@call_highest_priority | MatrixBase | Expr` and `MutableDenseMatrix`
- sympy/matrices/tests/test_decompositions.py:131:21: error[unsupported-operator] Operator `*` is not supported between objects of type `T2'return@call_highest_priority | T1'return@call_highest_priority | MatrixBase | Expr` and `MutableDenseMatrix`
+ sympy/matrices/tests/test_decompositions.py:131:21: error[unsupported-operator] Operator `*` is not supported between objects of type `T1'return@call_highest_priority | T2'return@call_highest_priority | MatrixBase | Expr` and `MutableDenseMatrix`
- sympy/matrices/tests/test_decompositions.py:288:10: error[unresolved-attribute] Attribute `applyfunc` is not defined on `T2'return@call_highest_priority`, `T1'return@call_highest_priority`, `Expr` in union `T2'return@call_highest_priority | T1'return@call_highest_priority | MatrixBase | Expr`
+ sympy/matrices/tests/test_decompositions.py:288:10: error[unresolved-attribute] Attribute `applyfunc` is not defined on `T1'return@call_highest_priority`, `T2'return@call_highest_priority`, `Expr` in union `T1'return@call_highest_priority | T2'return@call_highest_priority | MatrixBase | Expr`
- sympy/matrices/tests/test_decompositions.py:290:13: error[unsupported-operator] Operator `-` is not supported between objects of type `T2'return@call_highest_priority | T1'return@call_highest_priority | MatrixBase | Expr` and `MutableDenseMatrix`
+ sympy/matrices/tests/test_decompositions.py:290:13: error[unsupported-operator] Operator `-` is not supported between objects of type `T1'return@call_highest_priority | T2'return@call_highest_priority | MatrixBase | Expr` and `MutableDenseMatrix`
- sympy/matrices/tests/test_decompositions.py:345:12: error[unsupported-operator] Operator `*` is not supported between objects of type `T2'return@call_highest_priority | T1'return@call_highest_priority | MatrixBase | Expr` and `MutableDenseMatrix`
+ sympy/matrices/tests/test_decompositions.py:345:12: error[unsupported-operator] Operator `*` is not supported between objects of type `T1'return@call_highest_priority | T2'return@call_highest_priority | MatrixBase | Expr` and `MutableDenseMatrix`
- sympy/matrices/tests/test_decompositions.py:348:12: error[unsupported-operator] Operator `*` is not supported between objects of type `T2'return@call_highest_priority | T1'return@call_highest_priority | MatrixBase | Expr` and `MutableDenseMatrix`
+ sympy/matrices/tests/test_decompositions.py:348:12: error[unsupported-operator] Operator `*` is not supported between objects of type `T1'return@call_highest_priority | T2'return@call_highest_priority | MatrixBase | Expr` and `MutableDenseMatrix`
- sympy/matrices/tests/test_decompositions.py:355:23: error[unsupported-operator] Operator `*` is not supported between objects of type `T2'return@call_highest_priority | T1'return@call_highest_priority | MatrixBase | Expr` and `MutableDenseMatrix`
+ sympy/matrices/tests/test_decompositions.py:355:23: error[unsupported-operator] Operator `*` is not supported between objects of type `T1'return@call_highest_priority | T2'return@call_highest_priority | MatrixBase | Expr` and `MutableDenseMatrix`
- sympy/matrices/tests/test_decompositions.py:393:25: error[unsupported-operator] Operator `*` is not supported between objects of type `Unknown | T2'return@call_highest_priority | T1'return@call_highest_priority | MatrixBase | Expr` and `Unknown | MutableDenseMatrix`
+ sympy/matrices/tests/test_decompositions.py:393:25: error[unsupported-operator] Operator `*` is not supported between objects of type `Unknown | T1'return@call_highest_priority | T2'return@call_highest_priority | MatrixBase | Expr` and `Unknown | MutableDenseMatrix`
- sympy/matrices/tests/test_decompositions.py:394:25: error[unsupported-operator] Operator `*` is not supported between objects of type `Unknown | T2'return@call_highest_priority | T1'return@call_highest_priority | MatrixBase | Expr` and `Unknown | MutableDenseMatrix`
+ sympy/matrices/tests/test_decompositions.py:394:25: error[unsupported-operator] Operator `*` is not supported between objects of type `Unknown | T1'return@call_highest_priority | T2'return@call_highest_priority | MatrixBase | Expr` and `Unknown | MutableDenseMatrix`
- sympy/matrices/tests/test_decompositions.py:395:16: error[unresolved-attribute] Attribute `H` is not defined on `T2'return@call_highest_priority`, `T1'return@call_highest_priority`, `Expr` in union `Unknown | T2'return@call_highest_priority | T1'return@call_highest_priority | MatrixBase | Expr`
+ sympy/matrices/tests/test_decompositions.py:395:16: error[unresolved-attribute] Attribute `H` is not defined on `T1'return@call_highest_priority`, `T2'return@call_highest_priority`, `Expr` in union `Unknown | T1'return@call_highest_priority | T2'return@call_highest_priority | MatrixBase | Expr`
- sympy/matrices/tests/test_decompositions.py:396:16: error[unresolved-attribute] Attribute `H` is not defined on `T2'return@call_highest_priority`, `T1'return@call_highest_priority`, `Expr` in union `Unknown | T2'return@call_highest_priority | T1'return@call_highest_priority | MatrixBase | Expr`
+ sympy/matrices/tests/test_decompositions.py:396:16: error[unresolved-attribute] Attribute `H` is not defined on `T1'return@call_highest_priority`, `T2'return@call_highest_priority`, `Expr` in union `Unknown | T1'return@call_highest_priority | T2'return@call_highest_priority | MatrixBase | Expr`
- sympy/matrices/tests/test_decompositions.py:439:22: error[unsupported-operator] Operator `*` is not supported between objects of type `T2'return@call_highest_priority | T1'return@call_highest_priority | MatrixBase | Expr` and `MutableDenseMatrix`
+ sympy/matrices/tests/test_decompositions.py:439:22: error[unsupported-operator] Operator `*` is not supported between objects of type `T1'return@call_highest_priority | T2'return@call_highest_priority | MatrixBase | Expr` and `MutableDenseMatrix`
- sympy/matrices/tests/test_decompositions.py:451:21: error[unsupported-operator] Operator `*` is not supported between objects of type `T2'return@call_highest_priority | T1'return@call_highest_priority | MatrixBase | Expr` and `MutableDenseMatrix`
+ sympy/matrices/tests/test_decompositions.py:451:21: error[unsupported-operator] Operator `*` is not supported between objects of type `T1'return@call_highest_priority | T2'return@call_highest_priority | MatrixBase | Expr` and `MutableDenseMatrix`
- sympy/matrices/tests/test_decompositions.py:464:21: error[unsupported-operator] Operator `*` is not supported between objects of type `T2'return@call_highest_priority | T1'return@call_highest_priority | MatrixBase | Expr` and `MutableDenseMatrix`
+ sympy/matrices/tests/test_decompositions.py:464:21: error[unsupported-operator] Operator `*` is not supported between objects of type `T1'return@call_highest_priority | T2'return@call_highest_priority | MatrixBase | Expr` and `MutableDenseMatrix`
- sympy/matrices/tests/test_decompositions.py:475:21: error[unsupported-operator] Operator `*` is not supported between objects of type `T2'return@call_highest_priority | T1'return@call_highest_priority | MatrixBase | Expr` and `MutableDenseMatrix`
+ sympy/matrices/tests/test_decompositions.py:475:21: error[unsupported-operator] Operator `*` is not supported between objects of type `T1'return@call_highest_priority | T2'return@call_highest_priority | MatrixBase | Expr` and `MutableDenseMatrix`
- sympy/matrices/tests/test_decompositions.py:488:21: error[unsupported-operator] Operator `*` is not supported between objects of type `T2'return@call_highest_priority | T1'return@call_highest_priority | MatrixBase | Expr` and `MutableDenseMatrix`
+ sympy/matrices/tests/test_decompositions.py:488:21: error[unsupported-operator] Operator `*` is not supported between objects of type `T1'return@call_highest_priority | T2'return@call_highest_priority | MatrixBase | Expr` and `MutableDenseMatrix`
- sympy/matrices/tests/test_eigen.py:257:16: error[unresolved-attribute] Attribute `n` is not defined on `T2'return@call_highest_priority`, `T1'return@call_highest_priority` in union `T2'return@call_highest_priority | T1'return@call_highest_priority | MatrixBase | Expr`
+ sympy/matrices/tests/test_eigen.py:257:16: error[unresolved-attribute] Attribute `n` is not defined on `T1'return@call_highest_priority`, `T2'return@call_highest_priority` in union `T1'return@call_highest_priority | T2'return@call_highest_priority | MatrixBase | Expr`
- sympy/matrices/tests/test_eigen.py:306:14: error[unsupported-operator] Operator `*` is not supported between objects of type `T2'return@call_highest_priority | T1'return@call_highest_priority | MatrixBase | Expr` and `ImmutableDenseMatrix`
+ sympy/matrices/tests/test_eigen.py:306:14: error[unsupported-operator] Operator `*` is not supported between objects of type `T1'return@call_highest_priority | T2'return@call_highest_priority | MatrixBase | Expr` and `ImmutableDenseMatrix`
- sympy/matrices/tests/test_eigen.py:307:14: error[unsupported-operator] Operator `*` is not supported between objects of type `T2'return@call_highest_priority | T1'return@call_highest_priority | MatrixBase | Expr` and `MutableDenseMatrix`
+ sympy/matrices/tests/test_eigen.py:307:14: error[unsupported-operator] Operator `*` is not supported between objects of type `T1'return@call_highest_priority | T2'return@call_highest_priority | MatrixBase | Expr` and `MutableDenseMatrix`
- sympy/matrices/tests/test_eigen.py:322:15: error[unsupported-operator] Operator `*` is not supported between objects of type `T2'return@call_highest_priority | T1'return@call_highest_priority | MatrixBase | Expr` and `ImmutableDenseMatrix`
+ sympy/matrices/tests/test_eigen.py:322:15: error[unsupported-operator] Operator `*` is not supported between objects of type `T1'return@call_highest_priority | T2'return@call_highest_priority | MatrixBase | Expr` and `ImmutableDenseMatrix`
- sympy/matrices/tests/test_eigen.py:323:15: error[unsupported-operator] Operator `*` is not supported between objects of type `T2'return@call_highest_priority | T1'return@call_highest_priority | MatrixBase | Expr` and `MutableDenseMatrix`
+ sympy/matrices/tests/test_eigen.py:323:15: error[unsupported-operator] Operator `*` is not supported between objects of type `T1'return@call_highest_priority | T2'return@call_highest_priority | MatrixBase | Expr` and `MutableDenseMatrix`
- sympy/matrices/tests/test_eigen.py:364:14: error[unsupported-operator] Operator `*` is not supported between objects of type `T2'return@call_highest_priority | T1'return@call_highest_priority | MatrixBase | Expr` and `ImmutableDenseMatrix`
+ sympy/matrices/tests/test_eigen.py:364:14: error[unsupported-operator] Operator `*` is not supported between objects of type `T1'return@call_highest_priority | T2'return@call_highest_priority | MatrixBase | Expr` and `ImmutableDenseMatrix`
- sympy/matrices/tests/test_eigen.py:365:14: error[unsupported-operator] Operator `*` is not supported between objects of type `T2'return@call_highest_priority | T1'return@call_highest_priority | MatrixBase | Expr` and `MutableDenseMatrix`
+ sympy/matrices/tests/test_eigen.py:365:14: error[unsupported-operator] Operator `*` is not supported between objects of type `T1'return@call_highest_priority | T2'return@call_highest_priority | MatrixBase | Expr` and `MutableDenseMatrix`
- sympy/matrices/tests/test_eigen.py:380:15: error[unsupported-operator] Operator `*` is not supported between objects of type `T2'return@call_highest_priority | T1'return@call_highest_priority | MatrixBase | Expr` and `ImmutableDenseMatrix`
+ sympy/matrices/tests/test_eigen.py:380:15: error[unsupported-operator] Operator `*` is not supported between objects of type `T1'return@call_highest_priority | T2'return@call_highest_priority | MatrixBase | Expr` and `ImmutableDenseMatrix`
- sympy/matrices/tests/test_eigen.py:381:15: error[unsupported-operator] Operator `*` is not supported between objects of type `T2'return@call_highest_priority | T1'return@call_highest_priority | MatrixBase | Expr` and `MutableDenseMatrix`
+ sympy/matrices/tests/test_eigen.py:381:15: error[unsupported-operator] Operator `*` is not supported between objects of type `T1'return@call_highest_priority | T2'return@call_highest_priority | MatrixBase | Expr` and `MutableDenseMatrix`
- sympy/matrices/tests/test_eigen.py:405:12: error[unsupported-operator] Operator `*` is not supported between objects of type `T2'return@call_highest_priority | T1'return@call_highest_priority | MatrixBase | Expr` and `MutableDenseMatrix`
+ sympy/matrices/tests/test_eigen.py:405:12: error[unsupported-operator] Operator `*` is not supported between objects of type `T1'return@call_highest_priority | T2'return@call_highest_priority | MatrixBase | Expr` and `MutableDenseMatrix`
- sympy/matrices/tests/test_eigen.py:477:21: error[unsupported-operator] Operator `*` is not supported between objects of type `T2'return@call_highest_priority | T1'return@call_highest_priority | MatrixBase | Expr` and `MutableDenseMatrix`
+ sympy/matrices/tests/test_eigen.py:477:21: error[unsupported-operator] Operator `*` is not supported between objects of type `T1'return@call_highest_priority | T2'return@call_highest_priority | MatrixBase | Expr` and `MutableDenseMatrix`
- sympy/matrices/tests/test_eigen.py:492:13: error[unsupported-operator] Operator `*` is not supported between objects of type `T2'return@call_highest_priority | T1'return@call_highest_priority | MatrixBase | Expr` and `MutableDenseMatrix`
+ sympy/matrices/tests/test_eigen.py:492:13: error[unsupported-operator] Operator `*` is not supported between objects of type `T1'return@call_highest_priority | T2'return@call_highest_priority | MatrixBase | Expr` and `MutableDenseMatrix`
- sympy/matrices/tests/test_eigen.py:793:19: error[unsupported-operator] Operator `*` is not supported between objects of type `T2'return@call_highest_priority | T1'return@call_highest_priority | MatrixBase | Expr` and `MutableDenseMatrix`
+ sympy/matrices/tests/test_eigen.py:793:19: error[unsupported-operator] Operator `*` is not supported between objects of type `T1'return@call_highest_priority | T2'return@call_highest_priority | MatrixBase | Expr` and `MutableDenseMatrix`
- sympy/matrices/tests/test_matrices.py:221:40: error[invalid-argument-type] Argument to bound method `multiply_elementwise` is incorrect: Expected `MatrixBase`, found `T2'return@call_highest_priority | T1'return@call_highest_priority | MatrixBase | Expr`
+ sympy/matrices/tests/test_matrices.py:221:40: error[invalid-argument-type] Argument to bound method `multiply_elementwise` is incorrect: Expected `MatrixBase`, found `T1'return@call_highest_priority | T2'return@call_highest_priority | MatrixBase | Expr`
- sympy/matrices/tests/test_matrices.py:394:16: error[unsupported-operator] Operator `*` is not supported between objects of type `T2'return@call_highest_priority | T1'return@call_highest_priority | MatrixBase | Expr` and `MutableDenseMatrix`
+ sympy/matrices/tests/test_matrices.py:394:16: error[unsupported-operator] Operator `*` is not supported between objects of type `T1'return@call_highest_priority | T2'return@call_highest_priority | MatrixBase | Expr` and `MutableDenseMatrix`
- sympy/matrices/tests/test_matrices.py:1581:12: error[unsupported-operator] Operator `*` is not supported between objects of type `T2'return@call_highest_priority | T1'return@call_highest_priority | MatrixBase | Expr` and `MutableDenseMatrix`
+ sympy/matrices/tests/test_matrices.py:1581:12: error[unsupported-operator] Operator `*` is not supported between objects of type `T1'return@call_highest_priority | T2'return@call_highest_priority | MatrixBase | Expr` and `MutableDenseMatrix`
- sympy/matrices/tests/test_matrices.py:1587:12: error[unsupported-operator] Operator `*` is not supported between objects of type `T2'return@call_highest_priority | T1'return@call_highest_priority | MatrixBase | Expr` and `MutableDenseMatrix`
+ sympy/matrices/tests/test_matrices.py:1587:12: error[unsupported-operator] Operator `*` is not supported between objects of type `T1'return@call_highest_priority | T2'return@call_highest_priority | MatrixBase | Expr` and `MutableDenseMatrix`
- sympy/matrices/tests/test_matrices.py:1594:12: error[unsupported-operator] Operator `*` is not supported between objects of type `T2'return@call_highest_priority | T1'return@call_highest_priority | MatrixBase | Expr` and `MutableDenseMatrix`
+ sympy/matrices/tests/test_matrices.py:1594:12: error[unsupported-operator] Operator `*` is not supported between objects of type `T1'return@call_highest_priority | T2'return@call_highest_priority | MatrixBase | Expr` and `MutableDenseMatrix`
- sympy/matrices/tests/test_matrices.py:1599:12: error[unsupported-operator] Operator `*` is not supported between objects of type `T2'return@call_highest_priority | T1'return@call_highest_priority | MatrixBase | Expr` and `MutableDenseMatrix`
+ sympy/matrices/tests/test_matrices.py:1599:12: error[unsupported-operator] Operator `*` is not supported between objects of type `T1'return@call_highest_priority | T2'return@call_highest_priority | MatrixBase | Expr` and `MutableDenseMatrix`
- sympy/matrices/tests/test_matrices.py:1607:12: error[unsupported-operator] Operator `*` is not supported between objects of type `T2'return@call_highest_priority | T1'return@call_highest_priority | MatrixBase | Expr` and `MutableDenseMatrix`
+ sympy/matrices/tests/test_matrices.py:1607:12: error[unsupported-operator] Operator `*` is not supported between objects of type `T1'return@call_highest_priority | T2'return@call_highest_priority | MatrixBase | Expr` and `MutableDenseMatrix`
- sympy/matrices/tests/test_matrices.py:1616:12: error[unsupported-operator] Operator `*` is not supported between objects of type `T2'return@call_highest_priority | T1'return@call_highest_priority | MatrixBase | Expr` and `MutableDenseMatrix`
+ sympy/matrices/tests/test_matrices.py:1616:12: error[unsupported-operator] Operator `*` is

... (truncated 433 lines) ...

@astral-sh-bot
Copy link

astral-sh-bot bot commented Feb 16, 2026

Memory usage report

Summary

Project Old New Diff Outcome
prefect 694.15MB 694.30MB +0.02% (159.31kB)
sphinx 276.42MB 276.51MB +0.03% (91.19kB)
trio 120.57MB 120.59MB +0.02% (24.33kB)
flake8 49.73MB 49.74MB +0.02% (12.10kB)

Significant changes

Click to expand detailed breakdown

prefect

Name Old New Diff Outcome
infer_expression_types_impl 54.35MB 54.42MB +0.15% (81.73kB)
infer_definition_types 86.89MB 86.94MB +0.05% (47.58kB)
infer_scope_types_impl 57.89MB 57.90MB +0.03% (17.84kB)
infer_expression_type_impl 12.66MB 12.66MB +0.02% (3.21kB)
for_constraint_pair_inner 425.36kB 427.37kB +0.47% (2.02kB)
InteriorNode 197.54kB 198.55kB +0.51% (1.02kB)
infer_deferred_types 14.69MB 14.69MB +0.00% (756.00B)
all_narrowing_constraints_for_expression 5.23MB 5.23MB +0.01% (696.00B)
all_negative_narrowing_constraints_for_expression 2.21MB 2.21MB +0.02% (528.00B)
solutions_inner 194.01kB 194.51kB +0.26% (512.00B)
for_constraint_inner 220.62kB 221.11kB +0.22% (504.00B)
InteriorNode<'db>::or_ 41.57kB 42.05kB +1.16% (492.00B)
InteriorNode<'db>::or_::interned_arguments 44.38kB 44.84kB +1.06% (480.00B)
is_equivalent_to_object_inner 213.62kB 214.02kB +0.19% (408.00B)
for_constraint_pair_inner::interned_arguments 97.66kB 98.02kB +0.36% (360.00B)
... 16 more

sphinx

Name Old New Diff Outcome
infer_expression_types_impl 22.95MB 22.99MB +0.17% (38.98kB)
infer_definition_types 25.23MB 25.26MB +0.12% (31.61kB)
infer_scope_types_impl 17.56MB 17.56MB +0.02% (4.48kB)
for_constraint_pair_inner 182.13kB 186.14kB +2.20% (4.01kB)
infer_expression_type_impl 3.41MB 3.41MB +0.07% (2.39kB)
InteriorNode 86.33kB 87.95kB +1.88% (1.62kB)
infer_deferred_types 5.89MB 5.89MB +0.03% (1.62kB)
InteriorNode<'db>::or_ 28.98kB 30.19kB +4.16% (1.21kB)
InteriorNode<'db>::or_::interned_arguments 30.94kB 32.11kB +3.79% (1.17kB)
all_narrowing_constraints_for_expression 1.82MB 1.82MB +0.05% (864.00B)
solutions_inner 103.68kB 104.43kB +0.72% (768.00B)
for_constraint_pair_inner::interned_arguments 43.52kB 44.23kB +1.62% (720.00B)
all_negative_narrowing_constraints_for_expression 839.38kB 839.94kB +0.07% (576.00B)
for_constraint_inner 102.74kB 103.23kB +0.48% (504.00B)
ConstrainedTypeVar 53.34kB 53.62kB +0.53% (288.00B)
... 4 more

trio

Name Old New Diff Outcome
infer_expression_types_impl 6.31MB 6.32MB +0.16% (10.46kB)
infer_definition_types 7.80MB 7.80MB +0.03% (2.60kB)
infer_scope_types_impl 5.48MB 5.48MB +0.03% (1.82kB)
for_constraint_pair_inner 59.20kB 60.68kB +2.49% (1.48kB)
CallableType 596.80kB 597.64kB +0.14% (864.00B)
is_equivalent_to_object_inner 70.70kB 71.49kB +1.13% (816.00B)
FunctionType 1.51MB 1.51MB +0.05% (736.00B)
InteriorNode 43.27kB 43.98kB +1.64% (728.00B)
StaticClassLiteral<'db>::try_mro_ 886.75kB 887.26kB +0.06% (520.00B)
InteriorNode<'db>::or_ 7.03kB 7.50kB +6.67% (480.00B)
InteriorNode<'db>::or_::interned_arguments 7.97kB 8.44kB +5.88% (480.00B)
FunctionType<'db>::signature_ 1.07MB 1.07MB +0.04% (400.00B)
cached_protocol_interface 141.97kB 142.32kB +0.25% (360.00B)
for_constraint_inner 60.40kB 60.73kB +0.54% (336.00B)
for_constraint_pair_inner::interned_arguments 16.73kB 17.02kB +1.68% (288.00B)
... 14 more

flake8

Name Old New Diff Outcome
infer_expression_types_impl 1.12MB 1.13MB +0.35% (4.02kB)
infer_definition_types 1.95MB 1.95MB +0.16% (3.23kB)
for_constraint_pair_inner 12.90kB 14.38kB +11.44% (1.48kB)
InteriorNode 9.24kB 9.85kB +6.59% (624.00B)
infer_scope_types_impl 1.09MB 1.09MB +0.05% (612.00B)
CallableType 182.11kB 182.67kB +0.31% (576.00B)
InteriorNode<'db>::or_ 3.25kB 3.65kB +12.39% (412.00B)
InteriorNode<'db>::or_::interned_arguments 3.52kB 3.91kB +11.11% (400.00B)
Type<'db>::apply_specialization_::interned_arguments 207.34kB 207.03kB -0.15% (320.00B)
Type<'db>::apply_specialization_ 228.68kB 228.39kB -0.13% (296.00B)
for_constraint_pair_inner::interned_arguments 3.52kB 3.80kB +8.00% (288.00B)
solutions_inner 12.46kB 12.71kB +2.01% (256.00B)
is_equivalent_to_object_inner 28.43kB 28.62kB +0.70% (204.00B)
StaticClassLiteral<'db>::try_mro_ 344.66kB 344.85kB +0.06% (196.00B)
for_constraint_inner 12.34kB 12.50kB +1.33% (168.00B)
... 6 more

@carljm carljm marked this pull request as ready for review February 16, 2026 02:12
@AlexWaygood
Copy link
Member

seems like the bug also exists for bytes-literals

from typing import Iterable, TypeVar

FlatT = TypeVar("FlatT")

def flatten(*iterables: Iterable[FlatT]) -> list[FlatT]:
    return [x for iterable in iterables for x in iterable]

reveal_type(flatten(b"abc", ("a", "b", "c")))

@AlexWaygood
Copy link
Member

What about this small variation:

from typing import Iterable, TypeVar

FlatT = TypeVar("FlatT")

def flatten_covariant(*iterables: Iterable[FlatT]) -> tuple[FlatT, ...]:
    return tuple(x for iterable in iterables for x in iterable)

reveal_type(flatten_covariant("abc", (1, 2, 3)))  # revealed: tuple[str | Literal[1, 2, 3], ...]

Wouldn't tuple[Literal["a", "b", "c", 1, 2, 3], ...] be more consistent with our other behaviour there?

@astral-sh-bot
Copy link

astral-sh-bot bot commented Feb 16, 2026

ecosystem-analyzer results

Lint rule Added Removed Changed
unsupported-operator 87 0 2
invalid-argument-type 3 1 43
unresolved-attribute 5 0 1
invalid-assignment 1 0 0
not-iterable 0 0 1
type-assertion-failure 0 0 1
Total 96 1 48

Full report with detailed diff (timing results)

@carljm
Copy link
Contributor Author

carljm commented Feb 16, 2026

Wouldn't tuple[Literal["a", "b", "c", 1, 2, 3], ...] be more consistent with our other behaviour there?

Yes... definitely adds implementation complexity though. I'll see what I can come up with quickly, but I might be in favor of deferring this, definitely seems lower priority than the original issue.

@carljm
Copy link
Contributor Author

carljm commented Feb 16, 2026

Still noodling on the extension to infer sequence of literals in the covariant case (pyright doesn't do this fwiw). I think it's doable but there will be changes in several different areas. The core problem is that our specialization inference precision cannot "get ahead" of our has-relation-to capabilities. Currently in protocol matching, string literals fall back to str, with no special sequence-of-chars handling, so we see a string literal as (e.g.) having an __iter__ method that returns str. This means it's a currently a problem if we infer a generic protocol _SupportsIter[T] as _SupportsIter[Literal["a", "b"]] when passed Literal["ab"], because then we won't consider Literal["ab"] assignable to it.

So I'd like to defer all of that to a separate PR, and land this PR as-is. I added tests with TODO comments.

@carljm carljm force-pushed the cjm/generic-string branch from 189b51e to 0a8de25 Compare February 16, 2026 06:00
@AlexWaygood AlexWaygood merged commit 5f11c39 into main Feb 16, 2026
50 checks passed
@AlexWaygood AlexWaygood deleted the cjm/generic-string branch February 16, 2026 10:04
carljm added a commit that referenced this pull request Feb 16, 2026
* main: (43 commits)
  [`ruff`] Suppress diagnostic for strings with backslashes in interpolations before Python 3.12 (`RUF027`) (#21069)
  [flake8-bugbear] Fix B023 false positive for immediately-invoked lambdas (#23294)
  [ty] Add `Final` mdtests for loops and redeclaration (#23331)
  [`flake8-pyi`] Also check string annotations (`PYI041`) (#19023)
  Remove AlexWaygood as a flake8-pyi codeowner (#23347)
  [ty] Add comments to clarify the purpose of `NominalInstanceType::class_name` and `NominalInstanceType::class_module_name` (#23339)
  Add attestations for release artifacts and Docker images (#23111)
  [ty] Fix `assert_type` diagnostic messages (#23342)
  [ty] Force-update all insta snapshots (#23343)
  Add Q004 to the list of conflicting rules (#23340)
  [ty] Fix `invalid-match-pattern` false positives (#23338)
  [ty] new diagnostic called-match-pattern-must-be-a-type (#22939)
  [ty] Update flaky projects  (#23337)
  [ty] Increase timeout for ecosystem report to 40 min (#23336)
  Bump ecosystem-analyzer pin  (#23335)
  [ty] Replace `strsim` with CPython-based Levenshtein implementation (#23291)
  [ty] Add mdtest for staticmethod assigned in class body (#23330)
  [ty] fix inferring type variable from string literal argument (#23326)
  [ty] bytes literal is a sequence of integers (#23329)
  Update rand and getrandom (#23333)
  ...
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.

literal arguments don't contribute to specialization

2 participants