Skip to content

Conversation

@mtshiba
Copy link
Contributor

@mtshiba mtshiba commented Dec 1, 2025

Summary

Fixes astral-sh/ty#1670

This PR addresses the issue of non-deterministic execution order of salsa queries causing the order of elements in union types in the output to fluctuate randomly.

We already have a comparison function for sorting union types, union_or_intersection_elements_ordering, but this probably won't solve the problem, since it compares based on salsa IDs rather than the contents of the interned structs.

Instead, we use the structural_type_ordering function, which performs comparisons by deep traversing the type's contents.

Test Plan

@astral-sh-bot
Copy link

astral-sh-bot bot commented Dec 1, 2025

Diagnostic diff on typing conformance tests

Changes were detected when running ty on typing conformance tests
--- old-output.txt	2025-12-06 06:11:09.103899460 +0000
+++ new-output.txt	2025-12-06 06:11:12.833909742 +0000
@@ -1,7 +1,7 @@
 _directives_deprecated_library.py:15:31: error[invalid-return-type] Function always implicitly returns `None`, which is not assignable to return type `int`
 _directives_deprecated_library.py:30:26: error[invalid-return-type] Function always implicitly returns `None`, which is not assignable to return type `str`
 _directives_deprecated_library.py:36:41: error[invalid-return-type] Function always implicitly returns `None`, which is not assignable to return type `Self@__add__`
-_directives_deprecated_library.py:41:25: error[invalid-return-type] Function always implicitly returns `None`, which is not assignable to return type `int | float`
+_directives_deprecated_library.py:41:25: error[invalid-return-type] Function always implicitly returns `None`, which is not assignable to return type `float | int`
 _directives_deprecated_library.py:45:24: error[invalid-return-type] Function always implicitly returns `None`, which is not assignable to return type `str`
 aliases_explicit.py:57:5: error[type-assertion-failure] Type `(int, str, str, /) -> None` does not match asserted type `Unknown`
 aliases_explicit.py:67:24: error[invalid-type-arguments] Too many type arguments: expected 0, got 1
@@ -17,11 +17,11 @@
 aliases_implicit.py:78:29: error[invalid-type-arguments] Too many type arguments: expected 1, got 2
 aliases_implicit.py:79:29: error[invalid-type-arguments] Too many type arguments: expected 1, got 2
 aliases_implicit.py:80:24: error[invalid-type-arguments] Type argument for `ParamSpec` must be either a list of types, `ParamSpec`, `Concatenate`, or `...`
-aliases_implicit.py:81:25: error[invalid-type-arguments] Type `str` is not assignable to upper bound `int | float` of type variable `TFloat@GoodTypeAlias12`
-aliases_implicit.py:107:9: error[invalid-type-form] Variable of type `list[Unknown | <class 'int'> | <class 'str'>]` is not allowed in a type expression
+aliases_implicit.py:81:25: error[invalid-type-arguments] Type `str` is not assignable to upper bound `float | int` of type variable `TFloat@GoodTypeAlias12`
+aliases_implicit.py:107:9: error[invalid-type-form] Variable of type `list[<class 'int'> | <class 'str'> | Unknown]` is not allowed in a type expression
 aliases_implicit.py:108:9: error[invalid-type-form] Variable of type `tuple[tuple[<class 'int'>, <class 'str'>]]` is not allowed in a type expression
 aliases_implicit.py:109:9: error[invalid-type-form] Variable of type `list[<class 'int'> | Unknown]` is not allowed in a type expression
-aliases_implicit.py:110:9: error[invalid-type-form] Variable of type `dict[Unknown | str, Unknown | str]` is not allowed in a type expression
+aliases_implicit.py:110:9: error[invalid-type-form] Variable of type `dict[str | Unknown, str | Unknown]` is not allowed in a type expression
 aliases_implicit.py:114:9: error[invalid-type-form] Variable of type `Literal[3]` is not allowed in a type expression
 aliases_implicit.py:115:10: error[invalid-type-form] Variable of type `Literal[True]` is not allowed in a type expression
 aliases_implicit.py:116:10: error[invalid-type-form] Variable of type `Literal[1]` is not allowed in a type expression
@@ -32,7 +32,7 @@
 aliases_newtype.py:11:8: error[invalid-argument-type] Argument is incorrect: Expected `int`, found `Literal["user"]`
 aliases_newtype.py:12:14: error[invalid-assignment] Object of type `Literal[42]` is not assignable to `UserId`
 aliases_newtype.py:18:11: error[invalid-assignment] Object of type `<NewType pseudo-class 'UserId'>` is not assignable to `type`
-aliases_newtype.py:23:16: error[invalid-argument-type] Argument to function `isinstance` is incorrect: Expected `type | UnionType | tuple[Divergent, ...]`, found `<NewType pseudo-class 'UserId'>`
+aliases_newtype.py:23:16: error[invalid-argument-type] Argument to function `isinstance` is incorrect: Expected `tuple[Divergent, ...] | UnionType | type`, found `<NewType pseudo-class 'UserId'>`
 aliases_newtype.py:26:21: error[invalid-base] Cannot subclass an instance of NewType
 aliases_newtype.py:35:1: error[invalid-newtype] The name of a `NewType` (`BadName`) must match the name of the variable it is assigned to (`GoodName`)
 aliases_newtype.py:41:6: error[invalid-type-form] `GoodNewType1` is a `NewType` and cannot be specialized
@@ -47,7 +47,7 @@
 aliases_type_statement.py:19:1: error[call-non-callable] Object of type `TypeAliasType` is not callable
 aliases_type_statement.py:23:7: error[unresolved-attribute] Object of type `typing.TypeAliasType` has no attribute `other_attrib`
 aliases_type_statement.py:26:18: error[invalid-base] Invalid class base with type `typing.TypeAliasType`
-aliases_type_statement.py:31:22: error[invalid-argument-type] Argument to function `isinstance` is incorrect: Expected `type | UnionType | tuple[Divergent, ...]`, found `typing.TypeAliasType`
+aliases_type_statement.py:31:22: error[invalid-argument-type] Argument to function `isinstance` is incorrect: Expected `tuple[Divergent, ...] | UnionType | type`, found `typing.TypeAliasType`
 aliases_type_statement.py:37:22: error[invalid-type-form] Function calls are not allowed in type expressions
 aliases_type_statement.py:38:22: error[invalid-type-form] List literals are not allowed in this context in a type expression: Did you mean `tuple[int, str]`?
 aliases_type_statement.py:39:22: error[invalid-type-form] Tuple literals are not allowed in this context in a type expression
@@ -55,7 +55,7 @@
 aliases_type_statement.py:40:22: error[invalid-type-form] List comprehensions are not allowed in type expressions
 aliases_type_statement.py:41:22: error[invalid-type-form] Dict literals are not allowed in type expressions
 aliases_type_statement.py:42:22: error[invalid-type-form] Function calls are not allowed in type expressions
-aliases_type_statement.py:43:22: error[invalid-type-form] Invalid subscript of object of type `list[Unknown | <class 'int'>]` in type expression
+aliases_type_statement.py:43:22: error[invalid-type-form] Invalid subscript of object of type `list[<class 'int'> | Unknown]` in type expression
 aliases_type_statement.py:43:28: error[invalid-type-form] Int literals are not allowed in this context in a type expression
 aliases_type_statement.py:44:22: error[invalid-type-form] `if` expressions are not allowed in type expressions
 aliases_type_statement.py:45:22: error[invalid-type-form] Variable of type `Literal[1]` is not allowed in a type expression
@@ -76,7 +76,7 @@
 aliases_typealiastype.py:55:42: error[invalid-type-form] List comprehensions are not allowed in type expressions
 aliases_typealiastype.py:56:42: error[invalid-type-form] Dict literals are not allowed in type expressions
 aliases_typealiastype.py:57:42: error[invalid-type-form] Function calls are not allowed in type expressions
-aliases_typealiastype.py:58:42: error[invalid-type-form] Invalid subscript of object of type `list[Unknown | <class 'int'>]` in type expression
+aliases_typealiastype.py:58:42: error[invalid-type-form] Invalid subscript of object of type `list[<class 'int'> | Unknown]` in type expression
 aliases_typealiastype.py:58:48: error[invalid-type-form] Int literals are not allowed in this context in a type expression
 aliases_typealiastype.py:59:42: error[invalid-type-form] `if` expressions are not allowed in type expressions
 aliases_typealiastype.py:60:42: error[invalid-type-form] Variable of type `Literal[3]` is not allowed in a type expression
@@ -85,7 +85,7 @@
 aliases_typealiastype.py:63:42: error[invalid-type-form] Boolean operations are not allowed in type expressions
 aliases_typealiastype.py:64:42: error[invalid-type-form] F-strings are not allowed in type expressions
 aliases_typealiastype.py:66:47: error[unresolved-reference] Name `BadAlias21` used when not defined
-annotations_forward_refs.py:47:10: error[invalid-type-form] Invalid subscript of object of type `list[Unknown | <class 'int'>]` in type expression
+annotations_forward_refs.py:47:10: error[invalid-type-form] Invalid subscript of object of type `list[<class 'int'> | Unknown]` in type expression
 annotations_forward_refs.py:49:10: error[invalid-type-form] Variable of type `Literal[1]` is not allowed in a type expression
 annotations_forward_refs.py:54:11: error[fstring-type-annotation] Type expressions cannot use f-strings
 annotations_forward_refs.py:55:11: error[invalid-type-form] Module `types` is not valid in a type expression
@@ -105,7 +105,7 @@
 annotations_typeexpr.py:91:9: error[invalid-type-form] List comprehensions are not allowed in type expressions
 annotations_typeexpr.py:92:9: error[invalid-type-form] Dict literals are not allowed in type expressions
 annotations_typeexpr.py:93:9: error[invalid-type-form] Function calls are not allowed in type expressions
-annotations_typeexpr.py:94:9: error[invalid-type-form] Invalid subscript of object of type `list[Unknown | <class 'int'>]` in type expression
+annotations_typeexpr.py:94:9: error[invalid-type-form] Invalid subscript of object of type `list[<class 'int'> | Unknown]` in type expression
 annotations_typeexpr.py:94:15: error[invalid-type-form] Int literals are not allowed in this context in a type expression
 annotations_typeexpr.py:95:9: error[invalid-type-form] `if` expressions are not allowed in type expressions
 annotations_typeexpr.py:96:9: error[invalid-type-form] Variable of type `Literal[3]` is not allowed in a type expression
@@ -138,15 +138,15 @@
 callables_kwargs.py:64:14: error[parameter-already-assigned] Multiple values provided for parameter `v3` of function `func2`
 callables_kwargs.py:103:19: error[invalid-assignment] Object of type `def func1(**kwargs: @Todo(`Unpack[]` special form)) -> None` is not assignable to `TDProtocol5`
 callables_kwargs.py:134:19: error[invalid-assignment] Object of type `def func7(*, v1: int, v3: str, v2: str = Literal[""]) -> None` is not assignable to `TDProtocol6`
-callables_protocol.py:35:7: error[invalid-assignment] Object of type `def cb1_bad1(*vals: bytes, *, max_items: int | None) -> list[bytes]` is not assignable to `Proto1`
+callables_protocol.py:35:7: error[invalid-assignment] Object of type `def cb1_bad1(*vals: bytes, *, max_items: None | int) -> list[bytes]` is not assignable to `Proto1`
 callables_protocol.py:36:7: error[invalid-assignment] Object of type `def cb1_bad2(*vals: bytes) -> list[bytes]` is not assignable to `Proto1`
-callables_protocol.py:37:7: error[invalid-assignment] Object of type `def cb1_bad3(*vals: bytes, *, max_len: str | None) -> list[bytes]` is not assignable to `Proto1`
+callables_protocol.py:37:7: error[invalid-assignment] Object of type `def cb1_bad3(*vals: bytes, *, max_len: None | str) -> list[bytes]` is not assignable to `Proto1`
 callables_protocol.py:67:7: error[invalid-assignment] Object of type `def cb2_bad1(*a: bytes) -> Unknown` is not assignable to `Proto2`
 callables_protocol.py:68:7: error[invalid-assignment] Object of type `def cb2_bad2(*a: str, **b: str) -> Unknown` is not assignable to `Proto2`
 callables_protocol.py:69:7: error[invalid-assignment] Object of type `def cb2_bad3(*a: bytes, **b: bytes) -> Unknown` is not assignable to `Proto2`
 callables_protocol.py:70:7: error[invalid-assignment] Object of type `def cb2_bad4(**b: str) -> Unknown` is not assignable to `Proto2`
 callables_protocol.py:97:16: error[invalid-assignment] Object of type `def cb4_bad1(x: int) -> None` is not assignable to `Proto4`
-callables_protocol.py:121:18: error[invalid-assignment] Object of type `def cb6_bad1(*vals: bytes, *, max_len: int | None = None) -> list[bytes]` is not assignable to `NotProto6`
+callables_protocol.py:121:18: error[invalid-assignment] Object of type `def cb6_bad1(*vals: bytes, *, max_len: None | int = None) -> list[bytes]` is not assignable to `NotProto6`
 callables_protocol.py:169:7: error[invalid-assignment] Object of type `def cb8_bad1(x: int) -> Any` is not assignable to `Proto8`
 callables_protocol.py:186:5: error[invalid-assignment] Object of type `Literal["str"]` is not assignable to attribute `other_attribute` of type `int`
 callables_protocol.py:187:5: error[unresolved-attribute] Unresolved attribute `xxx` on type `Proto9[P@decorator1, R@decorator1]`.
@@ -155,8 +155,8 @@
 callables_protocol.py:260:8: error[invalid-assignment] Object of type `def cb12_bad1(*args: Any, *, kwarg0: Any) -> None` is not assignable to `Proto12`
 callables_protocol.py:284:27: error[invalid-assignment] Object of type `def cb13_no_default(path: str) -> str` is not assignable to `Proto13_Default`
 callables_protocol.py:311:27: error[invalid-assignment] Object of type `def cb14_no_default(*, path: str) -> str` is not assignable to `Proto14_Default`
-callables_subtyping.py:26:36: error[invalid-assignment] Object of type `(int, /) -> int` is not assignable to `(int | float, /) -> int | float`
-callables_subtyping.py:29:32: error[invalid-assignment] Object of type `(int | float, /) -> int | float` is not assignable to `(int, /) -> int`
+callables_subtyping.py:26:36: error[invalid-assignment] Object of type `(int, /) -> int` is not assignable to `(float | int, /) -> float | int`
+callables_subtyping.py:29:32: error[invalid-assignment] Object of type `(float | int, /) -> float | int` is not assignable to `(int, /) -> int`
 callables_subtyping.py:51:21: error[invalid-assignment] Object of type `PosOnly2` is not assignable to `Standard2`
 callables_subtyping.py:52:21: error[invalid-assignment] Object of type `KwOnly2` is not assignable to `Standard2`
 callables_subtyping.py:55:20: error[invalid-assignment] Object of type `KwOnly2` is not assignable to `PosOnly2`
@@ -204,26 +204,26 @@
 classes_override.py:84:9: error[invalid-explicit-override] Method `class_method1` is decorated with `@override` but does not override anything
 classes_override.py:89:9: error[invalid-explicit-override] Method `property1` is decorated with `@override` but does not override anything
 constructors_call_init.py:21:13: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `int`, found `float`
-constructors_call_init.py:25:1: error[type-assertion-failure] Type `Class1[int | float]` does not match asserted type `Class1[float]`
+constructors_call_init.py:25:1: error[type-assertion-failure] Type `Class1[float | int]` does not match asserted type `Class1[float]`
 constructors_call_init.py:56:1: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Class4[int]`, found `Class4[str]`
-constructors_call_init.py:75:1: error[type-assertion-failure] Type `Class5[int | float]` does not match asserted type `Class5[float]`
+constructors_call_init.py:75:1: error[type-assertion-failure] Type `Class5[float | int]` does not match asserted type `Class5[float]`
 constructors_call_init.py:91:1: error[type-assertion-failure] Type `Class6[int, str]` does not match asserted type `Class6[Unknown, Unknown]`
 constructors_call_init.py:99:1: error[type-assertion-failure] Type `Class7[str, int]` does not match asserted type `Class7[Unknown, Unknown]`
 constructors_call_init.py:130:9: error[too-many-positional-arguments] Too many positional arguments to bound method `__init__`: expected 1, got 2
-constructors_call_metaclass.py:39:1: error[type-assertion-failure] Type `int | Meta2` does not match asserted type `Class2`
+constructors_call_metaclass.py:39:1: error[type-assertion-failure] Type `Meta2 | int` does not match asserted type `Class2`
 constructors_call_metaclass.py:39:13: error[missing-argument] No argument provided for required parameter `x` of function `__new__`
 constructors_call_metaclass.py:46:16: error[invalid-super-argument] `T@__call__` is not an instance or subclass of `<class 'Meta3'>` in `super(<class 'Meta3'>, T@__call__)` call
 constructors_call_metaclass.py:54:1: error[missing-argument] No argument provided for required parameter `x` of function `__new__`
 constructors_call_metaclass.py:68:1: error[missing-argument] No argument provided for required parameter `x` of function `__new__`
 constructors_call_new.py:21:13: error[invalid-argument-type] Argument to function `__new__` is incorrect: Expected `int`, found `float`
-constructors_call_new.py:24:1: error[type-assertion-failure] Type `Class1[int | float]` does not match asserted type `Class1[float]`
+constructors_call_new.py:24:1: error[type-assertion-failure] Type `Class1[float | int]` does not match asserted type `Class1[float]`
 constructors_call_new.py:49:1: error[type-assertion-failure] Type `int` does not match asserted type `Class3`
 constructors_call_new.py:49:13: error[missing-argument] No argument provided for required parameter `x` of bound method `__init__`
 constructors_call_new.py:64:1: error[type-assertion-failure] Type `Class4 | Any` does not match asserted type `Class4`
 constructors_call_new.py:64:13: error[missing-argument] No argument provided for required parameter `x` of bound method `__init__`
 constructors_call_new.py:76:5: error[type-assertion-failure] Type `Never` does not match asserted type `Class5`
 constructors_call_new.py:76:17: error[missing-argument] No argument provided for required parameter `x` of bound method `__init__`
-constructors_call_new.py:89:1: error[type-assertion-failure] Type `int | Class6` does not match asserted type `Class6`
+constructors_call_new.py:89:1: error[type-assertion-failure] Type `Class6 | int` does not match asserted type `Class6`
 constructors_call_new.py:89:13: error[missing-argument] No argument provided for required parameter `x` of bound method `__init__`
 constructors_call_new.py:113:42: error[invalid-return-type] Function always implicitly returns `None`, which is not assignable to return type `Class8[list[T@Class8]]`
 constructors_call_new.py:116:1: error[type-assertion-failure] Type `Class8[list[int]]` does not match asserted type `Class8[int]`
@@ -267,11 +267,11 @@
 constructors_callable.py:183:1: error[type-assertion-failure] Type `Class8[str]` does not match asserted type `Unknown`
 constructors_callable.py:193:13: info[revealed-type] Revealed type: `(x: list[T@__init__], y: list[T@__init__]) -> Unknown`
 constructors_callable.py:194:1: error[type-assertion-failure] Type `Class9` does not match asserted type `Unknown`
-constructors_callable.py:194:16: error[invalid-argument-type] Argument is incorrect: Expected `list[T@__init__]`, found `list[Unknown | str]`
-constructors_callable.py:194:22: error[invalid-argument-type] Argument is incorrect: Expected `list[T@__init__]`, found `list[Unknown | str]`
-constructors_callable.py:195:4: error[invalid-argument-type] Argument is incorrect: Expected `list[T@__init__]`, found `list[Unknown | int]`
-constructors_callable.py:195:9: error[invalid-argument-type] Argument is incorrect: Expected `list[T@__init__]`, found `list[Unknown | str]`
-dataclasses_descriptors.py:23:62: error[invalid-return-type] Function always implicitly returns `None`, which is not assignable to return type `int | Desc1`
+constructors_callable.py:194:16: error[invalid-argument-type] Argument is incorrect: Expected `list[T@__init__]`, found `list[str | Unknown]`
+constructors_callable.py:194:22: error[invalid-argument-type] Argument is incorrect: Expected `list[T@__init__]`, found `list[str | Unknown]`
+constructors_callable.py:195:4: error[invalid-argument-type] Argument is incorrect: Expected `list[T@__init__]`, found `list[int | Unknown]`
+constructors_callable.py:195:9: error[invalid-argument-type] Argument is incorrect: Expected `list[T@__init__]`, found `list[str | Unknown]`
+dataclasses_descriptors.py:23:62: error[invalid-return-type] Function always implicitly returns `None`, which is not assignable to return type `Desc1 | int`
 dataclasses_descriptors.py:50:63: error[invalid-return-type] Function always implicitly returns `None`, which is not assignable to return type `list[T@Desc2] | T@Desc2`
 dataclasses_descriptors.py:66:1: error[type-assertion-failure] Type `int` does not match asserted type `int | Desc2[int]`
 dataclasses_descriptors.py:67:1: error[type-assertion-failure] Type `str` does not match asserted type `str | Desc2[str]`
@@ -289,7 +289,7 @@
 dataclasses_kwonly.py:61:9: error[invalid-argument-type] Argument is incorrect: Expected `int`, found `float`
 dataclasses_kwonly.py:61:14: error[parameter-already-assigned] Multiple values provided for parameter `b`
 dataclasses_match_args.py:42:1: error[unresolved-attribute] Class `DC4` has no attribute `__match_args__`
-dataclasses_match_args.py:49:1: error[type-assertion-failure] Type `tuple[()]` does not match asserted type `Unknown | tuple[()]`
+dataclasses_match_args.py:49:1: error[type-assertion-failure] Type `tuple[()]` does not match asserted type `tuple[()] | Unknown`
 dataclasses_order.py:50:4: error[unsupported-operator] Operator `<` is not supported between objects of type `DC1` and `DC2`
 dataclasses_postinit.py:28:7: error[unresolved-attribute] Object of type `DC1` has no attribute `x`
 dataclasses_postinit.py:29:7: error[unresolved-attribute] Object of type `DC1` has no attribute `y`
@@ -354,7 +354,7 @@
 dataclasses_transform_meta.py:83:18: error[too-many-positional-arguments] Too many positional arguments: expected 0, got 2
 dataclasses_transform_meta.py:103:1: error[invalid-assignment] Property `id` defined in `Customer3` is read-only
 dataclasses_usage.py:50:6: error[missing-argument] No argument provided for required parameter `unit_price`
-dataclasses_usage.py:51:28: error[invalid-argument-type] Argument is incorrect: Expected `int | float`, found `Literal["price"]`
+dataclasses_usage.py:51:28: error[invalid-argument-type] Argument is incorrect: Expected `float | int`, found `Literal["price"]`
 dataclasses_usage.py:52:36: error[too-many-positional-arguments] Too many positional arguments: expected 3, got 4
 dataclasses_usage.py:83:13: error[too-many-positional-arguments] Too many positional arguments: expected 1, got 2
 dataclasses_usage.py:127:8: error[too-many-positional-arguments] Too many positional arguments: expected 1, got 2
@@ -400,26 +400,26 @@
 enums_behaviors.py:32:1: error[type-assertion-failure] Type `Literal[Color.BLUE]` does not match asserted type `Color`
 enums_behaviors.py:44:21: error[subclass-of-final-class] Class `ExtendedShape` cannot inherit from final class `Shape`
 enums_expansion.py:52:9: error[type-assertion-failure] Type `CustomFlags` does not match asserted type `Literal[CustomFlags.FLAG3]`
-enums_member_names.py:30:5: error[type-assertion-failure] Type `Literal["RED", "BLUE", "GREEN"]` does not match asserted type `Any`
+enums_member_names.py:30:5: error[type-assertion-failure] Type `Literal["BLUE", "GREEN", "RED"]` does not match asserted type `Any`
 enums_member_values.py:30:5: error[type-assertion-failure] Type `Literal[1, 2, 3]` does not match asserted type `Any`
 enums_member_values.py:54:1: error[type-assertion-failure] Type `Literal[1]` does not match asserted type `tuple[Literal[1], float, float]`
 enums_member_values.py:85:9: error[invalid-assignment] Object of type `int` is not assignable to attribute `_value_` of type `str`
 enums_member_values.py:96:1: error[type-assertion-failure] Type `int` does not match asserted type `Unknown`
-enums_members.py:82:1: error[type-assertion-failure] Type `Unknown` does not match asserted type `Unknown | ((x) -> Unknown)`
+enums_members.py:82:1: error[type-assertion-failure] Type `Unknown` does not match asserted type `((x) -> Unknown) | Unknown`
 enums_members.py:82:37: error[invalid-type-form] Type arguments for `Literal` must be `None`, a literal value (int, bool, str, or bytes), or an enum member
-enums_members.py:83:1: error[type-assertion-failure] Type `Unknown` does not match asserted type `Unknown | ((x: int) -> Unknown)`
+enums_members.py:83:1: error[type-assertion-failure] Type `Unknown` does not match asserted type `((x: int) -> Unknown) | Unknown`
 enums_members.py:83:37: error[invalid-type-form] Type arguments for `Literal` must be `None`, a literal value (int, bool, str, or bytes), or an enum member
 enums_members.py:84:1: error[type-assertion-failure] Type `Unknown` does not match asserted type `property`
 enums_members.py:84:35: error[invalid-type-form] Type arguments for `Literal` must be `None`, a literal value (int, bool, str, or bytes), or an enum member
 enums_members.py:85:1: error[type-assertion-failure] Type `Unknown` does not match asserted type `def speak(self) -> None`
 enums_members.py:85:33: error[invalid-type-form] Type arguments for `Literal` must be `None`, a literal value (int, bool, str, or bytes), or an enum member
-enums_members.py:116:1: error[type-assertion-failure] Type `Unknown` does not match asserted type `Unknown | nonmember[int]`
+enums_members.py:116:1: error[type-assertion-failure] Type `Unknown` does not match asserted type `nonmember[int] | Unknown`
 enums_members.py:116:32: error[invalid-type-form] Type arguments for `Literal` must be `None`, a literal value (int, bool, str, or bytes), or an enum member
-enums_members.py:128:21: info[revealed-type] Revealed type: `Unknown | Literal[2]`
-enums_members.py:129:9: error[type-assertion-failure] Type `Unknown` does not match asserted type `Unknown | Literal[2]`
+enums_members.py:128:21: info[revealed-type] Revealed type: `Literal[2] | Unknown`
+enums_members.py:129:9: error[type-assertion-failure] Type `Unknown` does not match asserted type `Literal[2] | Unknown`
 enums_members.py:129:43: error[invalid-type-form] Type arguments for `Literal` must be `None`, a literal value (int, bool, str, or bytes), or an enum member
-enums_members.py:146:1: error[type-assertion-failure] Type `int` does not match asserted type `Unknown | Literal[2]`
-enums_members.py:147:1: error[type-assertion-failure] Type `int` does not match asserted type `Unknown | Literal[3]`
+enums_members.py:146:1: error[type-assertion-failure] Type `int` does not match asserted type `Literal[2] | Unknown`
+enums_members.py:147:1: error[type-assertion-failure] Type `int` does not match asserted type `Literal[3] | Unknown`
 exceptions_context_managers.py:50:5: error[type-assertion-failure] Type `int | str` does not match asserted type `str`
 exceptions_context_managers.py:57:5: error[type-assertion-failure] Type `int | str` does not match asserted type `str`
 generics_base_class.py:26:26: error[invalid-argument-type] Argument to function `takes_dict_incorrect` is incorrect: Expected `dict[str, list[object]]`, found `SymbolTable`
@@ -442,23 +442,23 @@
 generics_defaults.py:30:1: error[type-assertion-failure] Type `type[NoNonDefaults[str, int]]` does not match asserted type `<class 'NoNonDefaults'>`
 generics_defaults.py:31:1: error[type-assertion-failure] Type `type[NoNonDefaults[str, int]]` does not match asserted type `<class 'NoNonDefaults[str, int]'>`
 generics_defaults.py:32:1: error[type-assertion-failure] Type `type[NoNonDefaults[str, int]]` does not match asserted type `<class 'NoNonDefaults[str, int]'>`
-generics_defaults.py:38:1: error[type-assertion-failure] Type `type[OneDefault[int | float, bool]]` does not match asserted type `<class 'OneDefault[int | float, bool]'>`
+generics_defaults.py:38:1: error[type-assertion-failure] Type `type[OneDefault[float | int, bool]]` does not match asserted type `<class 'OneDefault[float | int, bool]'>`
 generics_defaults.py:45:1: error[type-assertion-failure] Type `type[AllTheDefaults[Any, Any, str, int, bool]]` does not match asserted type `<class 'AllTheDefaults'>`
-generics_defaults.py:46:1: error[type-assertion-failure] Type `type[AllTheDefaults[int, int | float | complex, str, int, bool]]` does not match asserted type `<class 'AllTheDefaults[int, int | float | complex, str, int, bool]'>`
+generics_defaults.py:46:1: error[type-assertion-failure] Type `type[AllTheDefaults[int, complex | float | int, str, int, bool]]` does not match asserted type `<class 'AllTheDefaults[int, complex | float | int, str, int, bool]'>`
 generics_defaults.py:50:1: error[invalid-type-arguments] No type argument provided for required type variable `T2` of class `AllTheDefaults`
-generics_defaults.py:52:1: error[type-assertion-failure] Type `type[AllTheDefaults[int, int | float | complex, str, int, bool]]` does not match asserted type `<class 'AllTheDefaults[int, int | float | complex, str, int, bool]'>`
-generics_defaults.py:55:1: error[type-assertion-failure] Type `type[AllTheDefaults[int, int | float | complex, str, int, bool]]` does not match asserted type `<class 'AllTheDefaults[int, int | float | complex, str, int, bool]'>`
-generics_defaults.py:59:1: error[type-assertion-failure] Type `type[AllTheDefaults[int, int | float | complex, str, int, bool]]` does not match asserted type `<class 'AllTheDefaults[int, int | float | complex, str, int, bool]'>`
-generics_defaults.py:63:1: error[type-assertion-failure] Type `type[AllTheDefaults[int, int | float | complex, str, int, bool]]` does not match asserted type `<class 'AllTheDefaults[int, int | float | complex, str, int, bool]'>`
+generics_defaults.py:52:1: error[type-assertion-failure] Type `type[AllTheDefaults[int, complex | float | int, str, int, bool]]` does not match asserted type `<class 'AllTheDefaults[int, complex | float | int, str, int, bool]'>`
+generics_defaults.py:55:1: error[type-assertion-failure] Type `type[AllTheDefaults[int, complex | float | int, str, int, bool]]` does not match asserted type `<class 'AllTheDefaults[int, complex | float | int, str, int, bool]'>`
+generics_defaults.py:59:1: error[type-assertion-failure] Type `type[AllTheDefaults[int, complex | float | int, str, int, bool]]` does not match asserted type `<class 'AllTheDefaults[int, complex | float | int, str, int, bool]'>`
+generics_defaults.py:63:1: error[type-assertion-failure] Type `type[AllTheDefaults[int, complex | float | int, str, int, bool]]` does not match asserted type `<class 'AllTheDefaults[int, complex | float | int, str, int, bool]'>`
 generics_defaults.py:79:1: error[type-assertion-failure] Type `type[Class_ParamSpec[(str, int, /)]]` does not match asserted type `<class 'Class_ParamSpec'>`
 generics_defaults.py:94:1: error[type-assertion-failure] Type `@Todo(specialized non-generic class)` does not match asserted type `<class 'Class_TypeVarTuple'>`
 generics_defaults.py:95:1: error[type-assertion-failure] Type `@Todo(specialized non-generic class)` does not match asserted type `Class_TypeVarTuple`
 generics_defaults.py:127:32: error[invalid-return-type] Function always implicitly returns `None`, which is not assignable to return type `T4@func1`
 generics_defaults.py:131:1: error[type-assertion-failure] Type `Any` does not match asserted type `int`
-generics_defaults.py:155:49: error[invalid-type-form] List literals are not allowed in this context in a type expression: Did you mean `tuple[int | float, bool]`?
+generics_defaults.py:155:49: error[invalid-type-form] List literals are not allowed in this context in a type expression: Did you mean `tuple[float | int, bool]`?
 generics_defaults.py:156:58: error[invalid-type-form] List literals are not allowed in this context in a type expression: Did you mean `list[bytes]`?
 generics_defaults.py:170:1: error[type-assertion-failure] Type `(Foo7[int], /) -> Foo7[int]` does not match asserted type `def meth(self, /) -> Self@meth`
-generics_defaults_referential.py:23:1: error[type-assertion-failure] Type `type[slice[int, int, int | None]]` does not match asserted type `<class 'slice'>`
+generics_defaults_referential.py:23:1: error[type-assertion-failure] Type `type[slice[int, int, None | int]]` does not match asserted type `<class 'slice'>`
 generics_defaults_referential.py:36:13: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `int`, found `Literal[""]`
 generics_defaults_referential.py:37:10: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `int`, found `Literal[""]`
 generics_defaults_referential.py:94:1: error[type-assertion-failure] Type `type[Bar[Any, list[Any]]]` does not match asserted type `<class 'Bar'>`
@@ -519,9 +519,9 @@
 generics_self_advanced.py:43:9: error[type-assertion-failure] Type `list[Self@method3]` does not match asserted type `Unknown`
 generics_self_advanced.py:44:9: error[type-assertion-failure] Type `Self@method3` does not match asserted type `Unknown`
 generics_self_advanced.py:45:9: error[type-assertion-failure] Type `Self@method3` does not match asserted type `Unknown`
-generics_self_attributes.py:26:33: error[invalid-argument-type] Argument is incorrect: Expected `<special form 'typing.Self'> | None`, found `LinkedList[int]`
-generics_self_attributes.py:29:5: error[invalid-assignment] Object of type `OrdinalLinkedList` is not assignable to attribute `next` of type `<special form 'typing.Self'> | None`
-generics_self_attributes.py:32:5: error[invalid-assignment] Object of type `LinkedList[int]` is not assignable to attribute `next` of type `<special form 'typing.Self'> | None`
+generics_self_attributes.py:26:33: error[invalid-argument-type] Argument is incorrect: Expected `None | <special form 'typing.Self'>`, found `LinkedList[int]`
+generics_self_attributes.py:29:5: error[invalid-assignment] Object of type `OrdinalLinkedList` is not assignable to attribute `next` of type `None | <special form 'typing.Self'>`
+generics_self_attributes.py:32:5: error[invalid-assignment] Object of type `LinkedList[int]` is not assignable to attribute `next` of type `None | <special form 'typing.Self'>`
 generics_self_basic.py:20:16: error[invalid-return-type] Return type does not match returned value: expected `Self@method2`, found `Shape`
 generics_self_basic.py:27:9: error[type-assertion-failure] Type `type[Self@from_config]` does not match asserted type `Unknown`
 generics_self_basic.py:33:16: error[invalid-return-type] Return type does not match returned value: expected `Self@cls_method2`, found `Shape`
@@ -545,8 +545,8 @@
 generics_self_usage.py:116:40: error[invalid-return-type] Function always implicitly returns `None`, which is not assignable to return type `Self@return_parameter`
 generics_self_usage.py:121:37: error[invalid-return-type] Function always implicitly returns `None`, which is not assignable to return type `Self@__new__`
 generics_self_usage.py:125:37: error[invalid-return-type] Function always implicitly returns `None`, which is not assignable to return type `list[Self@__mul__]`
-generics_syntax_compatibility.py:23:38: error[invalid-return-type] Function always implicitly returns `None`, which is not assignable to return type `V@ClassC | K@method1`
-generics_syntax_compatibility.py:26:41: error[invalid-return-type] Function always implicitly returns `None`, which is not assignable to return type `M@method2 | K@method2`
+generics_syntax_compatibility.py:23:38: error[invalid-return-type] Function always implicitly returns `None`, which is not assignable to return type `K@method1 | V@ClassC`
+generics_syntax_compatibility.py:26:41: error[invalid-return-type] Function always implicitly returns `None`, which is not assignable to return type `K@method2 | M@method2`
 generics_syntax_declarations.py:17:1: error[invalid-generic-class] Cannot both inherit from `typing.Generic` and use PEP 695 type variables
 generics_syntax_declarations.py:25:20: error[invalid-generic-class] Cannot both inherit from subscripted `Protocol` and use PEP 695 type variables
 generics_syntax_declarations.py:32:9: error[unresolved-attribute] Object of type `T@ClassD` has no attribute `is_integer`
@@ -558,42 +558,42 @@
 generics_syntax_declarations.py:79:23: error[unresolved-reference] Name `S` used when not defined
 generics_syntax_infer_variance.py:21:42: error[invalid-return-type] Function always implicitly returns `None`, which is not assignable to return type `T@ShouldBeCovariant1`
 generics_syntax_infer_variance.py:24:27: error[invalid-return-type] Function always implicitly returns `None`, which is not assignable to return type `Iterator[T@ShouldBeCovariant1]`
-generics_syntax_infer_variance.py:28:37: error[invalid-assignment] Object of type `ShouldBeCovariant1[int]` is not assignable to `ShouldBeCovariant1[int | float]`
-generics_syntax_infer_variance.py:29:35: error[invalid-assignment] Object of type `ShouldBeCovariant1[int | float]` is not assignable to `ShouldBeCovariant1[int]`
-generics_syntax_infer_variance.py:39:50: error[invalid-return-type] Function always implicitly returns `None`, which is not assignable to return type `T@ShouldBeCovariant2 | Sequence[T@ShouldBeCovariant2]`
+generics_syntax_infer_variance.py:28:37: error[invalid-assignment] Object of type `ShouldBeCovariant1[int]` is not assignable to `ShouldBeCovariant1[float | int]`
+generics_syntax_infer_variance.py:29:35: error[invalid-assignment] Object of type `ShouldBeCovariant1[float | int]` is not assignable to `ShouldBeCovariant1[int]`
+generics_syntax_infer_variance.py:39:50: error[invalid-return-type] Function always implicitly returns `None`, which is not assignable to return type `Sequence[T@ShouldBeCovariant2] | T@ShouldBeCovariant2`
 generics_syntax_infer_variance.py:42:26: error[invalid-return-type] Function always implicitly returns `None`, which is not assignable to return type `int`
-generics_syntax_infer_variance.py:46:37: error[invalid-assignment] Object of type `ShouldBeCovariant2[int]` is not assignable to `ShouldBeCovariant2[int | float]`
-generics_syntax_infer_variance.py:47:35: error[invalid-assignment] Object of type `ShouldBeCovariant2[int | float]` is not assignable to `ShouldBeCovariant2[int]`
+generics_syntax_infer_variance.py:46:37: error[invalid-assignment] Object of type `ShouldBeCovariant2[int]` is not assignable to `ShouldBeCovariant2[float | int]`
+generics_syntax_infer_variance.py:47:35: error[invalid-assignment] Object of type `ShouldBeCovariant2[float | int]` is not assignable to `ShouldBeCovariant2[int]`
 generics_syntax_infer_variance.py:51:26: error[invalid-return-type] Function always implicitly returns `None`, which is not assignable to return type `ShouldBeCovariant2[T@ShouldBeCovariant3]`
-generics_syntax_infer_variance.py:55:37: error[invalid-assignment] Object of type `ShouldBeCovariant3[int]` is not assignable to `ShouldBeCovariant3[int | float]`
-generics_syntax_infer_variance.py:56:35: error[invalid-assignment] Object of type `ShouldBeCovariant3[int | float]` is not assignable to `ShouldBeCovariant3[int]`
-generics_syntax_infer_variance.py:84:36: error[invalid-assignment] Object of type `ShouldBeCovariant5[int]` is not assignable to `ShouldBeCovariant5[int | float]`
-generics_syntax_infer_variance.py:85:34: error[invalid-assignment] Object of type `ShouldBeCovariant5[int | float]` is not assignable to `ShouldBeCovariant5[int]`
+generics_syntax_infer_variance.py:55:37: error[invalid-assignment] Object of type `ShouldBeCovariant3[int]` is not assignable to `ShouldBeCovariant3[float | int]`
+generics_syntax_infer_variance.py:56:35: error[invalid-assignment] Object of type `ShouldBeCovariant3[float | int]` is not assignable to `ShouldBeCovariant3[int]`
+generics_syntax_infer_variance.py:84:36: error[invalid-assignment] Object of type `ShouldBeCovariant5[int]` is not assignable to `ShouldBeCovariant5[float | int]`
+generics_syntax_infer_variance.py:85:34: error[invalid-assignment] Object of type `ShouldBeCovariant5[float | int]` is not assignable to `ShouldBeCovariant5[int]`
 generics_syntax_infer_variance.py:92:9: error[invalid-assignment] Cannot assign to final attribute `x` on type `Self@__init__`
-generics_syntax_infer_variance.py:95:36: error[invalid-assignment] Object of type `ShouldBeCovariant6[int]` is not assignable to `ShouldBeCovariant6[int | float]`
-generics_syntax_infer_variance.py:96:34: error[invalid-assignment] Object of type `ShouldBeCovariant6[int | float]` is not assignable to `ShouldBeCovariant6[int]`
-generics_syntax_infer_variance.py:112:38: error[invalid-assignment] Object of type `ShouldBeInvariant1[int]` is not assignable to `ShouldBeInvariant1[int | float]`
-generics_syntax_infer_variance.py:113:36: error[invalid-assignment] Object of type `ShouldBeInvariant1[int | float]` is not assignable to `ShouldBeInvariant1[int]`
-generics_syntax_infer_variance.py:127:38: error[invalid-assignment] Object of type `ShouldBeInvariant2[int]` is not assignable to `ShouldBeInvariant2[int | float]`
-generics_syntax_infer_variance.py:128:36: error[invalid-assignment] Object of type `ShouldBeInvariant2[int | float]` is not assignable to `ShouldBeInvariant2[int]`
-generics_syntax_infer_variance.py:135:43: error[invalid-assignment] Object of type `ShouldBeInvariant3[int, str]` is not assignable to `ShouldBeInvariant3[int | float, str]`
-generics_syntax_infer_variance.py:136:41: error[invalid-assignment] Object of type `ShouldBeInvariant3[int | float, str]` is not assignable to `ShouldBeInvariant3[int, str]`
-generics_syntax_infer_variance.py:137:43: error[invalid-assignment] Object of type `ShouldBeInvariant3[str, int]` is not assignable to `ShouldBeInvariant3[str, int | float]`
-generics_syntax_infer_variance.py:138:41: error[invalid-assignment] Object of type `ShouldBeInvariant3[str, int | float]` is not assignable to `ShouldBeInvariant3[str, int]`
-generics_syntax_infer_variance.py:146:38: error[invalid-assignment] Object of type `ShouldBeInvariant4[int]` is not assignable to `ShouldBeInvariant4[int | float]`
-generics_syntax_infer_variance.py:154:38: error[invalid-assignment] Object of type `ShouldBeInvariant5[int]` is not assignable to `ShouldBeInvariant5[int | float]`
-generics_syntax_infer_variance.py:165:45: error[invalid-assignment] Object of type `ShouldBeContravariant1[int]` is not assignable to `ShouldBeContravariant1[int | float]`
-generics_syntax_infer_variance.py:166:43: error[invalid-assignment] Object of type `ShouldBeContravariant1[int | float]` is not assignable to `ShouldBeContravariant1[int]`
+generics_syntax_infer_variance.py:95:36: error[invalid-assignment] Object of type `ShouldBeCovariant6[int]` is not assignable to `ShouldBeCovariant6[float | int]`
+generics_syntax_infer_variance.py:96:34: error[invalid-assignment] Object of type `ShouldBeCovariant6[float | int]` is not assignable to `ShouldBeCovariant6[int]`
+generics_syntax_infer_variance.py:112:38: error[invalid-assignment] Object of type `ShouldBeInvariant1[int]` is not assignable to `ShouldBeInvariant1[float | int]`
+generics_syntax_infer_variance.py:113:36: error[invalid-assignment] Object of type `ShouldBeInvariant1[float | int]` is not assignable to `ShouldBeInvariant1[int]`
+generics_syntax_infer_variance.py:127:38: error[invalid-assignment] Object of type `ShouldBeInvariant2[int]` is not assignable to `ShouldBeInvariant2[float | int]`
+generics_syntax_infer_variance.py:128:36: error[invalid-assignment] Object of type `ShouldBeInvariant2[float | int]` is not assignable to `ShouldBeInvariant2[int]`
+generics_syntax_infer_variance.py:135:43: error[invalid-assignment] Object of type `ShouldBeInvariant3[int, str]` is not assignable to `ShouldBeInvariant3[float | int, str]`
+generics_syntax_infer_variance.py:136:41: error[invalid-assignment] Object of type `ShouldBeInvariant3[float | int, str]` is not assignable to `ShouldBeInvariant3[int, str]`
+generics_syntax_infer_variance.py:137:43: error[invalid-assignment] Object of type `ShouldBeInvariant3[str, int]` is not assignable to `ShouldBeInvariant3[str, float | int]`
+generics_syntax_infer_variance.py:138:41: error[invalid-assignment] Object of type `ShouldBeInvariant3[str, float | int]` is not assignable to `ShouldBeInvariant3[str, int]`
+generics_syntax_infer_variance.py:146:38: error[invalid-assignment] Object of type `ShouldBeInvariant4[int]` is not assignable to `ShouldBeInvariant4[float | int]`
+generics_syntax_infer_variance.py:154:38: error[invalid-assignment] Object of type `ShouldBeInvariant5[int]` is not assignable to `ShouldBeInvariant5[float | int]`
+generics_syntax_infer_variance.py:165:45: error[invalid-assignment] Object of type `ShouldBeContravariant1[int]` is not assignable to `ShouldBeContravariant1[float | int]`
+generics_syntax_infer_variance.py:166:43: error[invalid-assignment] Object of type `ShouldBeContravariant1[float | int]` is not assignable to `ShouldBeContravariant1[int]`
 generics_syntax_scoping.py:35:7: error[unresolved-reference] Name `T` used when not defined
 generics_syntax_scoping.py:40:23: error[invalid-return-type] Function always implicitly returns `None`, which is not assignable to return type `((**P@decorator1) -> R@decorator1, /) -> (**P@decorator1) -> R@decorator1`
 generics_syntax_scoping.py:44:17: error[unresolved-reference] Name `T` used when not defined
 generics_syntax_scoping.py:81:35: error[invalid-return-type] Function always implicitly returns `None`, which is not assignable to return type `((**P@decorator2) -> R@decorator2, /) -> (**P@decorator2) -> R@decorator2`
 generics_syntax_scoping.py:113:9: error[type-assertion-failure] Type `str` does not match asserted type `Literal[""]`
 generics_syntax_scoping.py:116:13: error[type-assertion-failure] Type `TypeVar` does not match asserted type `typing.TypeVar`
-generics_syntax_scoping.py:121:9: error[type-assertion-failure] Type `int | float | complex` does not match asserted type `complex`
-generics_syntax_scoping.py:124:13: error[type-assertion-failure] Type `int | float | complex` does not match asserted type `complex`
-generics_type_erasure.py:38:16: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `int | None`, found `Literal[""]`
-generics_type_erasure.py:40:16: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `str | None`, found `Literal[0]`
+generics_syntax_scoping.py:121:9: error[type-assertion-failure] Type `complex | float | int` does not match asserted type `complex`
+generics_syntax_scoping.py:124:13: error[type-assertion-failure] Type `complex | float | int` does not match asserted type `complex`
+generics_type_erasure.py:38:16: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `None | int`, found `Literal[""]`
+generics_type_erasure.py:40:16: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `None | str`, found `Literal[0]`
 generics_typevartuple_args.py:16:34: error[invalid-return-type] Function always implicitly returns `None`, which is not assignable to return type `tuple[@Todo(PEP 646), ...]`
 generics_typevartuple_args.py:20:1: error[type-assertion-failure] Type `tuple[int, str]` does not match asserted type `tuple[@Todo(PEP 646), ...]`
 generics_typevartuple_args.py:27:77: error[invalid-return-type] Function always implicitly returns `None`, which is not assignable to return type `tuple[@Todo(PEP 646), ...]`
@@ -607,23 +607,23 @@
 generics_typevartuple_basic.py:75:50: error[invalid-return-type] Function always implicitly returns `None`, which is not assignable to return type `tuple[@Todo(PEP 646), ...]`
 generics_typevartuple_basic.py:84:1: error[type-assertion-failure] Type `tuple[int]` does not match asserted type `tuple[@Todo(PEP 646), ...]`
 generics_typevartuple_callable.py:29:57: error[invalid-return-type] Function always implicitly returns `None`, which is not assignable to return type `tuple[@Todo(PEP 646), ...]`
-generics_typevartuple_callable.py:33:54: error[invalid-return-type] Function always implicitly returns `None`, which is not assignable to return type `tuple[int | float | complex, str, int]`
+generics_typevartuple_callable.py:33:54: error[invalid-return-type] Function always implicitly returns `None`, which is not assignable to return type `tuple[complex | float | int, str, int]`
 generics_typevartuple_callable.py:37:34: error[invalid-return-type] Function always implicitly returns `None`, which is not assignable to return type `tuple[str]`
-generics_typevartuple_callable.py:41:1: error[type-assertion-failure] Type `tuple[str, int, int | float | complex]` does not match asserted type `tuple[@Todo(PEP 646), ...]`
+generics_typevartuple_callable.py:41:1: error[type-assertion-failure] Type `tuple[str, int, complex | float | int]` does not match asserted type `tuple[@Todo(PEP 646), ...]`
 generics_typevartuple_callable.py:42:1: error[type-assertion-failure] Type `tuple[str]` does not match asserted type `tuple[@Todo(PEP 646), ...]`
 generics_typevartuple_callable.py:45:43: error[invalid-return-type] Function always implicitly returns `None`, which is not assignable to return type `tuple[@Todo(PEP 646), ...]`
-generics_typevartuple_callable.py:49:1: error[type-assertion-failure] Type `tuple[int | float, str, int | float | complex]` does not match asserted type `tuple[@Todo(PEP 646), ...]`
+generics_typevartuple_callable.py:49:1: error[type-assertion-failure] Type `tuple[float | int, str, complex | float | int]` does not match asserted type `tuple[@Todo(PEP 646), ...]`
 generics_typevartuple_concat.py:47:42: error[invalid-return-type] Function always implicitly returns `None`, which is not assignable to return type `tuple[@Todo(PEP 646), ...]`
 generics_typevartuple_concat.py:52:1: error[type-assertion-failure] Type `tuple[int, bool, str]` does not match asserted type `tuple[@Todo(PEP 646), ...]`
 generics_typevartuple_specialization.py:45:23: error[invalid-type-arguments] Too many type arguments: expected 0, got 2
 generics_typevartuple_specialization.py:45:51: error[invalid-type-arguments] Too many type arguments: expected 0, got 1
-generics_typevartuple_specialization.py:46:5: error[type-assertion-failure] Type `tuple[int, int | float, bool]` does not match asserted type `tuple[@Todo(PEP 646), ...]`
+generics_typevartuple_specialization.py:46:5: error[type-assertion-failure] Type `tuple[int, float | int, bool]` does not match asserted type `tuple[@Todo(PEP 646), ...]`
 generics_typevartuple_specialization.py:51:5: error[type-assertion-failure] Type `tuple[int]` does not match asserted type `tuple[@Todo(PEP 646), ...]`
 generics_typevartuple_specialization.py:52:37: error[invalid-type-form] Tuple literals are not allowed in this context in a type expression: Did you mean `tuple[()]`?
 generics_typevartuple_specialization.py:92:28: error[invalid-type-arguments] Too many type arguments: expected 0, got 2
 generics_typevartuple_specialization.py:92:56: error[invalid-type-arguments] Too many type arguments: expected 0, got 1
 generics_typevartuple_specialization.py:93:5: error[type-assertion-failure] Type `tuple[str, int]` does not match asserted type `tuple[@Todo(PEP 646), ...]`
-generics_typevartuple_specialization.py:94:5: error[type-assertion-failure] Type `tuple[int | float]` does not match asserted type `tuple[@Todo(PEP 646), ...]`
+generics_typevartuple_specialization.py:94:5: error[type-assertion-failure] Type `tuple[float | int]` does not match asserted type `tuple[@Todo(PEP 646), ...]`
 generics_typevartuple_specialization.py:95:5: error[type-assertion-failure] Type `tuple[Any, *tuple[Any, ...]]` does not match asserted type `tuple[@Todo(PEP 646), ...]`
 generics_typevartuple_specialization.py:102:32: error[invalid-type-arguments] Too many type arguments: expected 0, got 2
 generics_typevartuple_specialization.py:103:33: error[invalid-type-arguments] Too many type arguments: expected 0, got 1
@@ -634,14 +634,14 @@
 generics_typevartuple_specialization.py:134:37: error[invalid-type-arguments] Too many type arguments: expected 0, got 3
 generics_typevartuple_specialization.py:134:63: error[invalid-type-arguments] Too many type arguments: expected 0, got 4
 generics_typevartuple_specialization.py:135:5: error[type-assertion-failure] Type `tuple[tuple[()], str, bool]` does not match asserted type `tuple[tuple[@Todo(PEP 646), ...], Unknown, Unknown]`
-generics_typevartuple_specialization.py:136:5: error[type-assertion-failure] Type `tuple[tuple[str], bool, int | float]` does not match asserted type `tuple[tuple[@Todo(PEP 646), ...], Unknown, Unknown]`
-generics_typevartuple_specialization.py:137:5: error[type-assertion-failure] Type `tuple[tuple[str, bool], int | float, int]` does not match asserted type `tuple[tuple[@Todo(PEP 646), ...], Unknown, Unknown]`
+generics_typevartuple_specialization.py:136:5: error[type-assertion-failure] Type `tuple[tuple[str], bool, float | int]` does not match asserted type `tuple[tuple[@Todo(PEP 646), ...], Unknown, Unknown]`
+generics_typevartuple_specialization.py:137:5: error[type-assertion-failure] Type `tuple[tuple[str, bool], float | int, int]` does not match asserted type `tuple[tuple[@Todo(PEP 646), ...], Unknown, Unknown]`
 generics_typevartuple_specialization.py:143:18: error[invalid-type-arguments] Too many type arguments: expected 0, got 4
 generics_typevartuple_specialization.py:143:39: error[invalid-return-type] Function always implicitly returns `None`, which is not assignable to return type `tuple[tuple[@Todo(PEP 646), ...], T1@func9, T2@func9, T3@func9]`
 generics_typevartuple_specialization.py:147:19: error[invalid-type-arguments] Too many type arguments: expected 0, got 3
 generics_typevartuple_specialization.py:147:45: error[invalid-type-arguments] Too many type arguments: expected 0, got 4
-generics_typevartuple_specialization.py:148:5: error[type-assertion-failure] Type `tuple[tuple[()], str, bool, int | float]` does not match asserted type `tuple[tuple[@Todo(PEP 646), ...], Unknown, Unknown, Unknown]`
-generics_typevartuple_specialization.py:149:5: error[type-assertion-failure] Type `tuple[tuple[bool], str, int | float, int]` does not match asserted type `tuple[tuple[@Todo(PEP 646), ...], Unknown, Unknown, Unknown]`
+generics_typevartuple_specialization.py:148:5: error[type-assertion-failure] Type `tuple[tuple[()], str, bool, float | int]` does not match asserted type `tuple[tuple[@Todo(PEP 646), ...], Unknown, Unknown, Unknown]`
+generics_typevartuple_specialization.py:149:5: error[type-assertion-failure] Type `tuple[tuple[bool], str, float | int, int]` does not match asserted type `tuple[tuple[@Todo(PEP 646), ...], Unknown, Unknown, Unknown]`
 generics_typevartuple_specialization.py:153:12: error[invalid-type-arguments] Too many type arguments: expected 0, got 1
 generics_typevartuple_specialization.py:156:28: error[invalid-type-arguments] Too many type arguments: expected 0, got 2
 generics_typevartuple_specialization.py:156:59: error[invalid-type-arguments] Too many type arguments: expected 0, got 2
@@ -649,9 +649,9 @@
 generics_typevartuple_specialization.py:158:5: error[type-assertion-failure] Type `tuple[*tuple[int, ...], str]` does not match asserted type `tuple[@Todo(PEP 646), ...]`
 generics_typevartuple_specialization.py:159:5: error[type-assertion-failure] Type `tuple[*tuple[int, ...], str]` does not match asserted type `tuple[@Todo(PEP 646), ...]`
 generics_typevartuple_specialization.py:163:13: error[invalid-type-arguments] Too many type arguments: expected 0, got 1
-generics_upper_bound.py:37:1: error[type-assertion-failure] Type `list[int]` does not match asserted type `list[Unknown | int]`
-generics_upper_bound.py:38:1: error[type-assertion-failure] Type `set[int]` does not match asserted type `set[Unknown | int]`
-generics_upper_bound.py:43:1: error[type-assertion-failure] Type `list[int] | set[int]` does not match asserted type `list[Unknown | int] | set[Unknown | int]`
+generics_upper_bound.py:37:1: error[type-assertion-failure] Type `list[int]` does not match asserted type `list[int | Unknown]`
+generics_upper_bound.py:38:1: error[type-assertion-failure] Type `set[int]` does not match asserted type `set[int | Unknown]`
+generics_upper_bound.py:43:1: error[type-assertion-failure] Type `list[int] | set[int]` does not match asserted type `list[int | Unknown] | set[int | Unknown]`
 generics_upper_bound.py:51:8: error[invalid-argument-type] Argument to function `longer` is incorrect: Argument type `Literal[3]` does not satisfy upper bound `Sized` of type variable `ST`
 generics_upper_bound.py:51:11: error[invalid-argument-type] Argument to function `longer` is incorrect: Argument type `Literal[3]` does not satisfy upper bound `Sized` of type variable `ST`
 generics_upper_bound.py:56:10: error[invalid-legacy-type-variable] A `TypeVar` cannot have both a bound and constraints
@@ -659,33 +659,33 @@
 generics_variance.py:26:27: error[invalid-return-type] Function always implicitly returns `None`, which is not assignable to return type `Iterator[T_co@ImmutableList]`
 generics_variance.py:57:28: error[invalid-return-type] Function always implicitly returns `None`, which is not assignable to return type `B_co@func`
 generics_variance_inference.py:19:26: error[invalid-return-type] Function always implicitly returns `None`, which is not assignable to return type `T3@ClassA`
-generics_variance_inference.py:24:33: error[invalid-assignment] Object of type `ClassA[int | float, int, int]` is not assignable to `ClassA[int, int, int]`
-generics_variance_inference.py:25:37: error[invalid-assignment] Object of type `ClassA[int | float, int, int]` is not assignable to `ClassA[int | float, int | float, int]`
-generics_variance_inference.py:28:33: error[invalid-assignment] Object of type `ClassA[int, int | float, int | float]` is not assignable to `ClassA[int, int, int]`
+generics_variance_inference.py:24:33: error[invalid-assignment] Object of type `ClassA[float | int, int, int]` is not assignable to `ClassA[int, int, int]`
+generics_variance_inference.py:25:37: error[invalid-assignment] Object of type `ClassA[float | int, int, int]` is not assignable to `ClassA[float | int, float | int, int]`
+generics_variance_inference.py:28:33: error[invalid-assignment] Object of type `ClassA[int, float | int, float | int]` is not assignable to `ClassA[int, int, int]`
 generics_variance_inference.py:33:42: error[invalid-return-type] Function always implicitly returns `None`, which is not assignable to return type `T@ShouldBeCovariant1`
 generics_variance_inference.py:36:27: error[invalid-return-type] Function always implicitly returns `None`, which is not assignable to return type `Iterator[T@ShouldBeCovariant1]`
-generics_variance_inference.py:41:35: error[invalid-assignment] Object of type `ShouldBeCovariant1[int | float]` is not assignable to `ShouldBeCovariant1[int]`
-generics_variance_inference.py:49:35: error[invalid-assignment] Object of type `ShouldBeCovariant2[int | float]` is not assignable to `ShouldBeCovariant2[int]`
+generics_variance_inference.py:41:35: error[invalid-assignment] Object of type `ShouldBeCovariant1[float | int]` is not assignable to `ShouldBeCovariant1[int]`
+generics_variance_inference.py:49:35: error[invalid-assignment] Object of type `ShouldBeCovariant2[float | int]` is not assignable to `ShouldBeCovariant2[int]`
 generics_variance_inference.py:53:26: error[invalid-return-type] Function always implicitly returns `None`, which is not assignable to return type `ShouldBeCovariant2[T@ShouldBeCovariant3]`
-generics_variance_inference.py:58:35: error[invalid-assignment] Object of type `ShouldBeCovariant3[int | float]` is not assignable to `ShouldBeCovariant3[int]`
-generics_variance_inference.py:66:36: error[invalid-assignment] Object of type `ShouldBeCovariant4[int]` is not assignable to `ShouldBeCovariant4[int | float]`
-generics_variance_inference.py:67:34: error[invalid-assignment] Object of type `ShouldBeCovariant4[int | float]` is not assignable to `ShouldBeCovariant4[int]`
-generics_variance_inference.py:80:34: error[invalid-assignment] Object of type `ShouldBeCovariant5[int | float]` is not assignable to `ShouldBeCovariant5[int]`
-generics_variance_inference.py:96:38: error[invalid-assignment] Object of type `ShouldBeInvariant1[int]` is not assignable to `ShouldBeInvariant1[int | float]`
-generics_variance_inference.py:97:36: error[invalid-assignment] Object of type `ShouldBeInvariant1[int | float]` is not assignable to `ShouldBeInvariant1[int]`
-generics_variance_inference.py:111:38: error[invalid-assignment] Object of type `ShouldBeInvariant2[int]` is not assignable to `ShouldBeInvariant2[int | float]`
-generics_variance_inference.py:112:36: error[invalid-assignment] Object of type `ShouldBeInvariant2[int | float]` is not assignable to `ShouldBeInvariant2[int]`
-generics_variance_inference.py:119:43: error[invalid-assignment] Object of type `ShouldBeInvariant3[int, str]` is not assignable to `ShouldBeInvariant3[int | float, str]`
-generics_variance_inference.py:120:41: error[invalid-assignment] Object of type `ShouldBeInvariant3[int | float, str]` is not assignable to `ShouldBeInvariant3[int, str]`
-generics_variance_inference.py:121:43: error[invalid-assignment] Object of type `ShouldBeInvariant3[str, int]` is not assignable to `ShouldBeInvariant3[str, int | float]`
-generics_variance_inference.py:122:41: error[invalid-assignment] Object of type `ShouldBeInvariant3[str, int | float]` is not assignable to `ShouldBeInvariant3[str, int]`
-generics_variance_inference.py:130:38: error[invalid-assignment] Object of type `ShouldBeInvariant4[int]` is not assignable to `ShouldBeInvariant4[int | float]`
-generics_variance_inference.py:138:38: error[invalid-assignment] Object of type `ShouldBeInvariant5[int]` is not assignable to `ShouldBeInvariant5[int | float]`
-generics_variance_inference.py:149:45: error[invalid-assignment] Object of type `ShouldBeContravariant1[int]` is not assignable to `ShouldBeContravariant1[int | float]`
-generics_variance_inference.py:169:31: error[invalid-assignment] Object of type `ShouldBeInvariant6[int | float]` is not assignable to `ShouldBeInvariant6[int]`
-generics_variance_inference.py:170:33: error[invalid-assignment] Object of type `ShouldBeInvariant6[int]` is not assignable to `ShouldBeInvariant6[int | float]`
-generics_variance_inference.py:181:31: error[invalid-assignment] Object of type `ShouldBeCovariant6[int | float]` is not assignable to `ShouldBeCovariant6[int]`
-generics_variance_inference.py:194:37: error[invalid-assignment] Object of type `ShouldBeContravariant2[int]` is not assignable to `ShouldBeContravariant2[int | float

... (truncated 137 lines) ...

@astral-sh-bot
Copy link

astral-sh-bot bot commented Dec 1, 2025

mypy_primer results

Changes were detected when running on open source projects
parso (https://github.com/davidhalter/parso)
- parso/python/pep8.py:258:16: warning[possibly-missing-attribute] Attribute `type` may be missing on object of type `Unknown | None | IndentationNode`
+ parso/python/pep8.py:258:16: warning[possibly-missing-attribute] Attribute `type` may be missing on object of type `IndentationNode | None | Unknown`
- parso/python/pep8.py:259:41: warning[possibly-missing-attribute] Attribute `parent` may be missing on object of type `Unknown | None | IndentationNode`
+ parso/python/pep8.py:259:41: warning[possibly-missing-attribute] Attribute `parent` may be missing on object of type `IndentationNode | None | Unknown`
- parso/python/pep8.py:263:17: warning[possibly-missing-attribute] Attribute `indentation` may be missing on object of type `Unknown | None | IndentationNode`
+ parso/python/pep8.py:263:17: warning[possibly-missing-attribute] Attribute `indentation` may be missing on object of type `IndentationNode | None | Unknown`
- parso/python/pep8.py:270:20: warning[possibly-missing-attribute] Attribute `type` may be missing on object of type `Unknown | None | IndentationNode`
+ parso/python/pep8.py:270:20: warning[possibly-missing-attribute] Attribute `type` may be missing on object of type `IndentationNode | None | Unknown`
- parso/python/pep8.py:271:37: warning[possibly-missing-attribute] Attribute `parent` may be missing on object of type `Unknown | None | IndentationNode`
+ parso/python/pep8.py:271:37: warning[possibly-missing-attribute] Attribute `parent` may be missing on object of type `IndentationNode | None | Unknown`
- parso/python/pep8.py:276:16: warning[possibly-missing-attribute] Attribute `type` may be missing on object of type `Unknown | None | IndentationNode`
+ parso/python/pep8.py:276:16: warning[possibly-missing-attribute] Attribute `type` may be missing on object of type `IndentationNode | None | Unknown`
- parso/python/pep8.py:277:41: warning[possibly-missing-attribute] Attribute `parent` may be missing on object of type `Unknown | None | IndentationNode`
+ parso/python/pep8.py:277:41: warning[possibly-missing-attribute] Attribute `parent` may be missing on object of type `IndentationNode | None | Unknown`
- parso/python/pep8.py:290:22: warning[possibly-missing-attribute] Attribute `get_latest_suite_node` may be missing on object of type `Unknown | None | IndentationNode`
+ parso/python/pep8.py:290:22: warning[possibly-missing-attribute] Attribute `get_latest_suite_node` may be missing on object of type `IndentationNode | None | Unknown`
- parso/python/pep8.py:362:17: warning[possibly-missing-attribute] Attribute `type` may be missing on object of type `Unknown | None | IndentationNode`
+ parso/python/pep8.py:362:17: warning[possibly-missing-attribute] Attribute `type` may be missing on object of type `IndentationNode | None | Unknown`
- parso/python/pep8.py:363:37: warning[possibly-missing-attribute] Attribute `parent` may be missing on object of type `Unknown | None | IndentationNode`
+ parso/python/pep8.py:363:37: warning[possibly-missing-attribute] Attribute `parent` may be missing on object of type `IndentationNode | None | Unknown`
- parso/python/pep8.py:385:37: warning[possibly-missing-attribute] Attribute `parent` may be missing on object of type `Unknown | None | IndentationNode`
+ parso/python/pep8.py:385:37: warning[possibly-missing-attribute] Attribute `parent` may be missing on object of type `IndentationNode | None | Unknown`
- parso/python/pep8.py:414:16: warning[possibly-missing-attribute] Attribute `type` may be missing on object of type `Unknown | None | IndentationNode`
+ parso/python/pep8.py:414:16: warning[possibly-missing-attribute] Attribute `type` may be missing on object of type `IndentationNode | None | Unknown`
- parso/python/pep8.py:415:20: warning[possibly-missing-attribute] Attribute `type` may be missing on object of type `Unknown | None | IndentationNode`
+ parso/python/pep8.py:415:20: warning[possibly-missing-attribute] Attribute `type` may be missing on object of type `IndentationNode | None | Unknown`
- parso/python/pep8.py:418:35: warning[possibly-missing-attribute] Attribute `indentation` may be missing on object of type `Unknown | None | IndentationNode`
+ parso/python/pep8.py:418:35: warning[possibly-missing-attribute] Attribute `indentation` may be missing on object of type `IndentationNode | None | Unknown`
- parso/python/pep8.py:419:54: warning[possibly-missing-attribute] Attribute `type` may be missing on object of type `Unknown | None | IndentationNode`
+ parso/python/pep8.py:419:54: warning[possibly-missing-attribute] Attribute `type` may be missing on object of type `IndentationNode | None | Unknown`
- parso/python/pep8.py:431:16: warning[possibly-missing-attribute] Attribute `type` may be missing on object of type `Unknown | None | IndentationNode`
+ parso/python/pep8.py:431:16: warning[possibly-missing-attribute] Attribute `type` may be missing on object of type `IndentationNode | None | Unknown`
- parso/python/pep8.py:432:25: warning[possibly-missing-attribute] Attribute `type` may be missing on object of type `Unknown | None`
+ parso/python/pep8.py:432:25: warning[possibly-missing-attribute] Attribute `type` may be missing on object of type `None | Unknown`
- parso/python/pep8.py:433:41: warning[possibly-missing-attribute] Attribute `parent` may be missing on object of type `Unknown | None | IndentationNode`
+ parso/python/pep8.py:433:41: warning[possibly-missing-attribute] Attribute `parent` may be missing on object of type `IndentationNode | None | Unknown`
- parso/python/pep8.py:436:41: warning[possibly-missing-attribute] Attribute `indentation` may be missing on object of type `Unknown | None | IndentationNode`
+ parso/python/pep8.py:436:41: warning[possibly-missing-attribute] Attribute `indentation` may be missing on object of type `IndentationNode | None | Unknown`
- parso/python/pep8.py:441:51: warning[possibly-missing-attribute] Attribute `indentation` may be missing on object of type `Unknown | IndentationNode | None`
+ parso/python/pep8.py:441:51: warning[possibly-missing-attribute] Attribute `indentation` may be missing on object of type `IndentationNode | None | Unknown`
- parso/python/pep8.py:444:49: warning[possibly-missing-attribute] Attribute `indentation` may be missing on object of type `Unknown | IndentationNode | None`
+ parso/python/pep8.py:444:49: warning[possibly-missing-attribute] Attribute `indentation` may be missing on object of type `IndentationNode | None | Unknown`
- parso/python/pep8.py:449:29: warning[possibly-missing-attribute] Attribute `parent` may be missing on object of type `Unknown | IndentationNode | None`
+ parso/python/pep8.py:449:29: warning[possibly-missing-attribute] Attribute `parent` may be missing on object of type `IndentationNode | None | Unknown`
- parso/python/pep8.py:460:49: warning[possibly-missing-attribute] Attribute `bracket_indentation` may be missing on object of type `Unknown | None | IndentationNode`
+ parso/python/pep8.py:460:49: warning[possibly-missing-attribute] Attribute `bracket_indentation` may be missing on object of type `IndentationNode | None | Unknown`
- parso/python/pep8.py:462:49: warning[possibly-missing-attribute] Attribute `indentation` may be missing on object of type `Unknown | None | IndentationNode`
+ parso/python/pep8.py:462:49: warning[possibly-missing-attribute] Attribute `indentation` may be missing on object of type `IndentationNode | None | Unknown`
- parso/python/pep8.py:464:29: warning[possibly-missing-attribute] Attribute `get_latest_suite_node` may be missing on object of type `Unknown | None | IndentationNode`
+ parso/python/pep8.py:464:29: warning[possibly-missing-attribute] Attribute `get_latest_suite_node` may be missing on object of type `IndentationNode | None | Unknown`
- parso/python/pep8.py:471:36: warning[possibly-missing-attribute] Attribute `type` may be missing on object of type `Unknown | None | IndentationNode`
+ parso/python/pep8.py:471:36: warning[possibly-missing-attribute] Attribute `type` may be missing on object of type `IndentationNode | None | Unknown`
- parso/python/pep8.py:486:40: warning[possibly-missing-attribute] Attribute `type` may be missing on object of type `Unknown | None | IndentationNode`
+ parso/python/pep8.py:486:40: warning[possibly-missing-attribute] Attribute `type` may be missing on object of type `IndentationNode | None | Unknown`
- parso/python/pep8.py:492:42: warning[possibly-missing-attribute] Attribute `type` may be missing on object of type `Unknown | None | IndentationNode`
+ parso/python/pep8.py:492:42: warning[possibly-missing-attribute] Attribute `type` may be missing on object of type `IndentationNode | None | Unknown`
- parso/python/pep8.py:498:42: warning[possibly-missing-attribute] Attribute `type` may be missing on object of type `Unknown | None | IndentationNode`
+ parso/python/pep8.py:498:42: warning[possibly-missing-attribute] Attribute `type` may be missing on object of type `IndentationNode | None | Unknown`
- parso/python/pep8.py:507:40: warning[possibly-missing-attribute] Attribute `type` may be missing on object of type `Unknown | None | IndentationNode`
+ parso/python/pep8.py:507:40: warning[possibly-missing-attribute] Attribute `type` may be missing on object of type `IndentationNode | None | Unknown`
- parso/python/pep8.py:513:42: warning[possibly-missing-attribute] Attribute `type` may be missing on object of type `Unknown | None | IndentationNode`
+ parso/python/pep8.py:513:42: warning[possibly-missing-attribute] Attribute `type` may be missing on object of type `IndentationNode | None | Unknown`
- parso/python/pep8.py:537:24: warning[possibly-missing-attribute] Attribute `type` may be missing on object of type `Unknown | None | IndentationNode`
+ parso/python/pep8.py:537:24: warning[possibly-missing-attribute] Attribute `type` may be missing on object of type `IndentationNode | None | Unknown`
- parso/python/pep8.py:538:41: warning[possibly-missing-attribute] Attribute `parent` may be missing on object of type `Unknown | None | IndentationNode`
+ parso/python/pep8.py:538:41: warning[possibly-missing-attribute] Attribute `parent` may be missing on object of type `IndentationNode | None | Unknown`
- parso/python/pep8.py:541:27: warning[possibly-missing-attribute] Attribute `indentation` may be missing on object of type `Unknown | None | IndentationNode`
+ parso/python/pep8.py:541:27: warning[possibly-missing-attribute] Attribute `indentation` may be missing on object of type `IndentationNode | None | Unknown`

kornia (https://github.com/kornia/kornia)
- kornia/geometry/camera/pinhole.py:179:5: error[invalid-argument-type] Argument to bound method `setter` is incorrect: Expected `(Any, Any, /) -> None`, found `def tx(self, value: Unknown | int | float) -> PinholeCamera`
+ kornia/geometry/camera/pinhole.py:179:5: error[invalid-argument-type] Argument to bound method `setter` is incorrect: Expected `(Any, Any, /) -> None`, found `def tx(self, value: float | int | Unknown) -> PinholeCamera`
- kornia/geometry/camera/pinhole.py:195:5: error[invalid-argument-type] Argument to bound method `setter` is incorrect: Expected `(Any, Any, /) -> None`, found `def ty(self, value: Unknown | int | float) -> PinholeCamera`
+ kornia/geometry/camera/pinhole.py:195:5: error[invalid-argument-type] Argument to bound method `setter` is incorrect: Expected `(Any, Any, /) -> None`, found `def ty(self, value: float | int | Unknown) -> PinholeCamera`
- kornia/geometry/camera/pinhole.py:211:5: error[invalid-argument-type] Argument to bound method `setter` is incorrect: Expected `(Any, Any, /) -> None`, found `def tz(self, value: Unknown | int | float) -> PinholeCamera`
+ kornia/geometry/camera/pinhole.py:211:5: error[invalid-argument-type] Argument to bound method `setter` is incorrect: Expected `(Any, Any, /) -> None`, found `def tz(self, value: float | int | Unknown) -> PinholeCamera`

pip (https://github.com/pypa/pip)
- src/pip/_vendor/rich/table.py:359:5: error[invalid-argument-type] Argument to bound method `setter` is incorrect: Expected `(Any, Any, /) -> None`, found `def padding(self, padding: int | tuple[int] | tuple[int, int] | tuple[int, int, int, int]) -> Table`
+ src/pip/_vendor/rich/table.py:359:5: error[invalid-argument-type] Argument to bound method `setter` is incorrect: Expected `(Any, Any, /) -> None`, found `def padding(self, padding: tuple[int] | tuple[int, int] | tuple[int, int, int, int] | int) -> Table`
- src/pip/_vendor/urllib3/connectionpool.py:276:20: warning[possibly-missing-attribute] Attribute `get` may be missing on object of type `Unknown | LifoQueue | None`
+ src/pip/_vendor/urllib3/connectionpool.py:276:20: warning[possibly-missing-attribute] Attribute `get` may be missing on object of type `LifoQueue | None | Unknown`
- src/pip/_vendor/urllib3/connectionpool.py:316:13: warning[possibly-missing-attribute] Attribute `put` may be missing on object of type `Unknown | LifoQueue | None`
+ src/pip/_vendor/urllib3/connectionpool.py:316:13: warning[possibly-missing-attribute] Attribute `put` may be missing on object of type `LifoQueue | None | Unknown`
- src/pip/_vendor/urllib3/connectionpool.py:326:17: warning[possibly-missing-attribute] Attribute `qsize` may be missing on object of type `Unknown | LifoQueue | None`
+ src/pip/_vendor/urllib3/connectionpool.py:326:17: warning[possibly-missing-attribute] Attribute `qsize` may be missing on object of type `LifoQueue | None | Unknown`

spack (https://github.com/spack/spack)
- lib/spack/spack/config.py:675:17: error[invalid-assignment] Object of type `ConfigScope` is not assignable to `str | None`
+ lib/spack/spack/config.py:675:17: error[invalid-assignment] Object of type `ConfigScope` is not assignable to `None | str`
- lib/spack/spack/config.py:678:40: error[unresolved-attribute] Object of type `str | None` has no attribute `sections`
+ lib/spack/spack/config.py:678:40: error[unresolved-attribute] Object of type `None | str` has no attribute `sections`
- lib/spack/spack/config.py:678:59: error[unresolved-attribute] Object of type `str | None` has no attribute `sections`
+ lib/spack/spack/config.py:678:59: error[unresolved-attribute] Object of type `None | str` has no attribute `sections`
- lib/spack/spack/config.py:680:47: error[unresolved-attribute] Object of type `str | None` has no attribute `sections`
+ lib/spack/spack/config.py:680:47: error[unresolved-attribute] Object of type `None | str` has no attribute `sections`
- lib/spack/spack/config.py:683:9: error[unresolved-attribute] Object of type `str | None` has no attribute `sections`
+ lib/spack/spack/config.py:683:9: error[unresolved-attribute] Object of type `None | str` has no attribute `sections`
- lib/spack/spack/config.py:685:32: error[unresolved-attribute] Object of type `str | None` has no attribute `sections`
+ lib/spack/spack/config.py:685:32: error[unresolved-attribute] Object of type `None | str` has no attribute `sections`
- lib/spack/spack/config.py:687:9: error[unresolved-attribute] Object of type `str | None` has no attribute `_write_section`
+ lib/spack/spack/config.py:687:9: error[unresolved-attribute] Object of type `None | str` has no attribute `_write_section`
- lib/spack/spack/mirrors/mirror.py:114:16: error[invalid-return-type] Return type does not match returned value: expected `bool`, found `Literal[True] | Unknown | str | Divergent`
+ lib/spack/spack/mirrors/mirror.py:114:16: error[invalid-return-type] Return type does not match returned value: expected `bool`, found `Literal[True] | Unknown | Divergent | str`
- lib/spack/spack/mirrors/mirror.py:120:16: error[invalid-return-type] Return type does not match returned value: expected `bool`, found `Unknown | str | Divergent`
+ lib/spack/spack/mirrors/mirror.py:120:16: error[invalid-return-type] Return type does not match returned value: expected `bool`, found `Unknown | Divergent | str`
- lib/spack/spack/mirrors/mirror.py:263:45: error[invalid-argument-type] Argument to bound method `_update_connection_dict` is incorrect: Expected `dict[Unknown, Unknown]`, found `@Todo | str | Divergent`
+ lib/spack/spack/mirrors/mirror.py:263:45: error[invalid-argument-type] Argument to bound method `_update_connection_dict` is incorrect: Expected `dict[Unknown, Unknown]`, found `Unknown | Divergent | str`
- lib/spack/spack/spec.py:3142:21: warning[possibly-missing-attribute] Attribute `intersects` may be missing on object of type `Unknown | None | ArchSpec`
+ lib/spack/spack/spec.py:3142:21: warning[possibly-missing-attribute] Attribute `intersects` may be missing on object of type `ArchSpec | None | Unknown`
- lib/spack/spack/spec.py:3163:24: warning[possibly-missing-attribute] Attribute `constrain` may be missing on object of type `Unknown | None | ArchSpec`
+ lib/spack/spack/spec.py:3163:24: warning[possibly-missing-attribute] Attribute `constrain` may be missing on object of type `ArchSpec | None | Unknown`
- lib/spack/spack/spec.py:4626:16: warning[possibly-missing-attribute] Attribute `platform` may be missing on object of type `Unknown | None | ArchSpec`
+ lib/spack/spack/spec.py:4626:16: warning[possibly-missing-attribute] Attribute `platform` may be missing on object of type `ArchSpec | None | Unknown`
- lib/spack/spack/spec.py:4630:16: warning[possibly-missing-attribute] Attribute `os` may be missing on object of type `Unknown | None | ArchSpec`
+ lib/spack/spack/spec.py:4630:16: warning[possibly-missing-attribute] Attribute `os` may be missing on object of type `ArchSpec | None | Unknown`
- lib/spack/spack/spec.py:4634:16: warning[possibly-missing-attribute] Attribute `target` may be missing on object of type `Unknown | None | ArchSpec`
+ lib/spack/spack/spec.py:4634:16: warning[possibly-missing-attribute] Attribute `target` may be missing on object of type `ArchSpec | None | Unknown`
- lib/spack/spack/util/gcs.py:92:20: warning[possibly-missing-attribute] Attribute `get_blob` may be missing on object of type `Unknown | None`
+ lib/spack/spack/util/gcs.py:92:20: warning[possibly-missing-attribute] Attribute `get_blob` may be missing on object of type `None | Unknown`
- lib/spack/spack/util/gcs.py:97:20: warning[possibly-missing-attribute] Attribute `blob` may be missing on object of type `Unknown | None`
+ lib/spack/spack/util/gcs.py:97:20: warning[possibly-missing-attribute] Attribute `blob` may be missing on object of type `None | Unknown`
- lib/spack/spack/util/gcs.py:116:25: warning[possibly-missing-attribute] Attribute `list_blobs` may be missing on object of type `Unknown | None`
+ lib/spack/spack/util/gcs.py:116:25: warning[possibly-missing-attribute] Attribute `list_blobs` may be missing on object of type `None | Unknown`
- lib/spack/spack/vendor/jinja2/environment.py:725:10: error[invalid-return-type] Function can implicitly return `None`, which is not assignable to return type `str | CodeType`
+ lib/spack/spack/vendor/jinja2/environment.py:725:10: error[invalid-return-type] Function can implicitly return `None`, which is not assignable to return type `CodeType | str`
- lib/spack/spack/vendor/macholib/MachO.py:411:13: error[unsupported-operator] Operator `+` is unsupported between objects of type `Unknown | None` and `Unknown | None | Literal[0]`
+ lib/spack/spack/vendor/macholib/MachO.py:411:13: error[unsupported-operator] Operator `+` is unsupported between objects of type `None | Unknown` and `Unknown | None | Literal[0]`
- lib/spack/spack/vendor/macholib/MachO.py:419:21: error[unsupported-operator] Operator `+` is unsupported between objects of type `Unknown | None` and `Unknown | None | Literal[0]`
+ lib/spack/spack/vendor/macholib/MachO.py:419:21: error[unsupported-operator] Operator `+` is unsupported between objects of type `None | Unknown` and `Unknown | None | Literal[0]`
- lib/spack/spack/vendor/pyrsistent/_plist.py:22:13: error[invalid-assignment] Object of type `Unknown` is not assignable to attribute `rest` on type `(Unknown & ~AlwaysFalsy) | (_EmptyPList & ~AlwaysFalsy)`
+ lib/spack/spack/vendor/pyrsistent/_plist.py:22:13: error[invalid-assignment] Object of type `Unknown` is not assignable to attribute `rest` on type `(_EmptyPList & ~AlwaysFalsy) | (Unknown & ~AlwaysFalsy)`
- lib/spack/spack/vendor/ruamel/yaml/emitter.py:806:26: warning[possibly-missing-attribute] Attribute `empty` may be missing on object of type `Unknown | None`
+ lib/spack/spack/vendor/ruamel/yaml/emitter.py:806:26: warning[possibly-missing-attribute] Attribute `empty` may be missing on object of type `None | Unknown`
- lib/spack/spack/vendor/ruamel/yaml/emitter.py:807:25: warning[possibly-missing-attribute] Attribute `multiline` may be missing on object of type `Unknown | None`
+ lib/spack/spack/vendor/ruamel/yaml/emitter.py:807:25: warning[possibly-missing-attribute] Attribute `multiline` may be missing on object of type `None | Unknown`

jinja (https://github.com/pallets/jinja)
- tests/test_loader.py:240:17: warning[possibly-missing-attribute] Attribute `get_template` may be missing on object of type `Unknown | None | Environment`
+ tests/test_loader.py:240:17: warning[possibly-missing-attribute] Attribute `get_template` may be missing on object of type `Environment | None | Unknown`
- tests/test_loader.py:244:17: warning[possibly-missing-attribute] Attribute `get_template` may be missing on object of type `Unknown | None | Environment`
+ tests/test_loader.py:244:17: warning[possibly-missing-attribute] Attribute `get_template` may be missing on object of type `Environment | None | Unknown`
- tests/test_loader.py:261:9: warning[possibly-missing-attribute] Attribute `get_template` may be missing on object of type `Unknown | None | Environment`
+ tests/test_loader.py:261:9: warning[possibly-missing-attribute] Attribute `get_template` may be missing on object of type `Environment | None | Unknown`
- tests/test_loader.py:263:16: warning[possibly-missing-attribute] Attribute `loader` may be missing on object of type `Unknown | None | Environment`
+ tests/test_loader.py:263:16: warning[possibly-missing-attribute] Attribute `loader` may be missing on object of type `Environment | None | Unknown`
- tests/test_loader.py:263:16: warning[possibly-missing-attribute] Attribute `module` may be missing on object of type `Unknown | BaseLoader | None`
+ tests/test_loader.py:263:16: warning[possibly-missing-attribute] Attribute `module` may be missing on object of type `BaseLoader | None | Unknown`
- tests/test_loader.py:265:24: warning[possibly-missing-attribute] Attribute `loader` may be missing on object of type `Unknown | None | Environment`
+ tests/test_loader.py:265:24: warning[possibly-missing-attribute] Attribute `loader` may be missing on object of type `Environment | None | Unknown`
- tests/test_loader.py:265:24: warning[possibly-missing-attribute] Attribute `module` may be missing on object of type `Unknown | BaseLoader | None`
+ tests/test_loader.py:265:24: warning[possibly-missing-attribute] Attribute `module` may be missing on object of type `BaseLoader | None | Unknown`
- tests/test_loader.py:282:9: error[invalid-assignment] Object of type `ChoiceLoader` is not assignable to attribute `loader` on type `Unknown | None | Environment`
+ tests/test_loader.py:282:9: error[invalid-assignment] Object of type `ChoiceLoader` is not assignable to attribute `loader` on type `Environment | None | Unknown`
- tests/test_loader.py:283:13: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Sequence[BaseLoader]`, found `list[Unknown | BaseLoader | None]`
+ tests/test_loader.py:283:13: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Sequence[BaseLoader]`, found `list[BaseLoader | None | Unknown]`
- tests/test_loader.py:283:14: warning[possibly-missing-attribute] Attribute `loader` may be missing on object of type `Unknown | None | Environment`
+ tests/test_loader.py:283:14: warning[possibly-missing-attribute] Attribute `loader` may be missing on object of type `Environment | None | Unknown`
- tests/test_loader.py:285:17: warning[possibly-missing-attribute] Attribute `get_template` may be missing on object of type `Unknown | None | Environment`
+ tests/test_loader.py:285:17: warning[possibly-missing-attribute] Attribute `get_template` may be missing on object of type `Environment | None | Unknown`
- tests/test_loader.py:287:17: warning[possibly-missing-attribute] Attribute `get_template` may be missing on object of type `Unknown | None | Environment`
+ tests/test_loader.py:287:17: warning[possibly-missing-attribute] Attribute `get_template` may be missing on object of type `Environment | None | Unknown`
- tests/test_loader.py:292:9: error[invalid-assignment] Object of type `PrefixLoader` is not assignable to attribute `loader` on type `Unknown | None | Environment`
+ tests/test_loader.py:292:9: error[invalid-assignment] Object of type `PrefixLoader` is not assignable to attribute `loader` on type `Environment | None | Unknown`
- tests/test_loader.py:293:13: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Mapping[str, BaseLoader]`, found `dict[Unknown | str, Unknown | BaseLoader | None]`
+ tests/test_loader.py:293:13: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Mapping[str, BaseLoader]`, found `dict[Unknown | str, BaseLoader | None | Unknown]`
- tests/test_loader.py:294:24: warning[possibly-missing-attribute] Attribute `loader` may be missing on object of type `Unknown | None | Environment`
+ tests/test_loader.py:294:24: warning[possibly-missing-attribute] Attribute `loader` may be missing on object of type `Environment | None | Unknown`
- tests/test_loader.py:298:17: warning[possibly-missing-attribute] Attribute `get_template` may be missing on object of type `Unknown | None | Environment`
+ tests/test_loader.py:298:17: warning[possibly-missing-attribute] Attribute `get_template` may be missing on object of type `Environment | None | Unknown`
- tests/test_loader.py:300:17: warning[possibly-missing-attribute] Attribute `get_template` may be missing on object of type `Unknown | None | Environment`
+ tests/test_loader.py:300:17: warning[possibly-missing-attribute] Attribute `get_template` may be missing on object of type `Environment | None | Unknown`
- tests/test_loader.py:306:20: warning[possibly-missing-attribute] Attribute `loader` may be missing on object of type `Unknown | None | Environment`
+ tests/test_loader.py:306:20: warning[possibly-missing-attribute] Attribute `loader` may be missing on object of type `Environment | None | Unknown`
- tests/test_loader.py:306:20: warning[possibly-missing-attribute] Attribute `module` may be missing on object of type `Unknown | BaseLoader | None`
+ tests/test_loader.py:306:20: warning[possibly-missing-attribute] Attribute `module` may be missing on object of type `BaseLoader | None | Unknown`
- tests/test_loader.py:315:20: warning[possibly-missing-attribute] Attribute `loader` may be missing on object of type `Unknown | None | Environment`
+ tests/test_loader.py:315:20: warning[possibly-missing-attribute] Attribute `loader` may be missing on object of type `Environment | None | Unknown`
- tests/test_loader.py:315:20: warning[possibly-missing-attribute] Attribute `module` may be missing on object of type `Unknown | BaseLoader | None`
+ tests/test_loader.py:315:20: warning[possibly-missing-attribute] Attribute `module` may be missing on object of type `BaseLoader | None | Unknown`

aiortc (https://github.com/aiortc/aiortc)
- src/aiortc/rtcpeerconnection.py:580:21: error[invalid-argument-type] Argument to function `create_media_description_for_transceiver` is incorrect: Expected `str`, found `str | None | @Todo`
+ src/aiortc/rtcpeerconnection.py:580:21: error[invalid-argument-type] Argument to function `create_media_description_for_transceiver` is incorrect: Expected `str`, found `None | str | @Todo`
- src/aiortc/rtcpeerconnection.py:1223:13: error[invalid-argument-type] Argument is incorrect: Expected `str`, found `str | None`
+ src/aiortc/rtcpeerconnection.py:1223:13: error[invalid-argument-type] Argument is incorrect: Expected `str`, found `None | str`

black (https://github.com/psf/black)
- src/black/linegen.py:1821:25: warning[possibly-missing-attribute] Attribute `value` may be missing on object of type `Node | Leaf`
+ src/black/linegen.py:1821:25: warning[possibly-missing-attribute] Attribute `value` may be missing on object of type `Leaf | Node`

alerta (https://github.com/alerta/alerta)
- alerta/auth/basic.py:31:48: error[invalid-argument-type] Argument to function `not_authorized` is incorrect: Expected `list[str]`, found `list[str | None]`
+ alerta/auth/basic.py:31:48: error[invalid-argument-type] Argument to function `not_authorized` is incorrect: Expected `list[str]`, found `list[None | str]`
- alerta/auth/github.py:85:115: error[invalid-argument-type] Argument to function `not_authorized` is incorrect: Expected `list[str]`, found `list[str | None]`
+ alerta/auth/github.py:85:115: error[invalid-argument-type] Argument to function `not_authorized` is incorrect: Expected `list[str]`, found `list[None | str]`
- alerta/auth/oidc.py:192:95: error[invalid-argument-type] Argument to function `not_authorized` is incorrect: Expected `list[str]`, found `list[str | None]`
+ alerta/auth/oidc.py:192:95: error[invalid-argument-type] Argument to function `not_authorized` is incorrect: Expected `list[str]`, found `list[None | str]`
- alerta/auth/saml.py:100:98: error[invalid-argument-type] Argument to function `not_authorized` is incorrect: Expected `list[str]`, found `list[str | None]`
+ alerta/auth/saml.py:100:98: error[invalid-argument-type] Argument to function `not_authorized` is incorrect: Expected `list[str]`, found `list[None | str]`
- alerta/tasks.py:23:80: error[invalid-argument-type] Argument to function `process_action` is incorrect: Expected `int`, found `int | None`
+ alerta/tasks.py:23:80: error[invalid-argument-type] Argument to function `process_action` is incorrect: Expected `int`, found `None | int`
- alerta/views/users.py:33:48: error[invalid-argument-type] Argument to function `not_authorized` is incorrect: Expected `list[str]`, found `list[str | None]`
+ alerta/views/users.py:33:48: error[invalid-argument-type] Argument to function `not_authorized` is incorrect: Expected `list[str]`, found `list[None | str]`

paasta (https://github.com/yelp/paasta)
- paasta_tools/config_utils.py:196:18: error[invalid-argument-type] Argument to function `chdir` is incorrect: Expected `int | str | bytes | PathLike[str] | PathLike[bytes]`, found `Unknown | str | None`
+ paasta_tools/config_utils.py:196:18: error[invalid-argument-type] Argument to function `chdir` is incorrect: Expected `int | str | bytes | PathLike[str] | PathLike[bytes]`, found `None | str | Unknown`
- paasta_tools/config_utils.py:232:13: error[invalid-argument-type] Argument to function `write_auto_config_data` is incorrect: Expected `str`, found `Unknown | str | None`
+ paasta_tools/config_utils.py:232:13: error[invalid-argument-type] Argument to function `write_auto_config_data` is incorrect: Expected `str`, found `None | str | Unknown`
- paasta_tools/kubernetes/application/controller_wrappers.py:125:56: warning[possibly-missing-attribute] Attribute `get_namespace` may be missing on object of type `Unknown | None | KubernetesDeploymentConfig`
+ paasta_tools/kubernetes/application/controller_wrappers.py:125:56: warning[possibly-missing-attribute] Attribute `get_namespace` may be missing on object of type `KubernetesDeploymentConfig | None | Unknown`
- paasta_tools/kubernetes/application/controller_wrappers.py:140:12: warning[possibly-missing-attribute] Attribute `get_iam_role` may be missing on object of type `Unknown | None | KubernetesDeploymentConfig`
+ paasta_tools/kubernetes/application/controller_wrappers.py:140:12: warning[possibly-missing-attribute] Attribute `get_iam_role` may be missing on object of type `KubernetesDeploymentConfig | None | Unknown`
- paasta_tools/kubernetes/application/controller_wrappers.py:142:26: warning[possibly-missing-attribute] Attribute `get_iam_role` may be missing on object of type `Unknown | None | KubernetesDeploymentConfig`
+ paasta_tools/kubernetes/application/controller_wrappers.py:142:26: warning[possibly-missing-attribute] Attribute `get_iam_role` may be missing on object of type `KubernetesDeploymentConfig | None | Unknown`
- paasta_tools/kubernetes/application/controller_wrappers.py:143:27: warning[possibly-missing-attribute] Attribute `get_namespace` may be missing on object of type `Unknown | None | KubernetesDeploymentConfig`
+ paasta_tools/kubernetes/application/controller_wrappers.py:143:27: warning[possibly-missing-attribute] Attribute `get_namespace` may be missing on object of type `KubernetesDeploymentConfig | None | Unknown`
- paasta_tools/kubernetes/application/controller_wrappers.py:179:38: warning[possibly-missing-attribute] Attribute `config_dict` may be missing on object of type `Unknown | None | KubernetesDeploymentConfig`
+ paasta_tools/kubernetes/application/controller_wrappers.py:179:38: warning[possibly-missing-attribute] Attribute `config_dict` may be missing on object of type `KubernetesDeploymentConfig | None | Unknown`
- paasta_tools/kubernetes/application/controller_wrappers.py:181:29: warning[possibly-missing-attribute] Attribute `get_bounce_margin_factor` may be missing on object of type `Unknown | None | KubernetesDeploymentConfig`
+ paasta_tools/kubernetes/application/controller_wrappers.py:181:29: warning[possibly-missing-attribute] Attribute `get_bounce_margin_factor` may be missing on object of type `KubernetesDeploymentConfig | None | Unknown`
- paasta_tools/kubernetes/application/controller_wrappers.py:186:47: warning[possibly-missing-attribute] Attribute `config_dict` may be missing on object of type `Unknown | None | KubernetesDeploymentConfig`
+ paasta_tools/kubernetes/application/controller_wrappers.py:186:47: warning[possibly-missing-attribute] Attribute `config_dict` may be missing on object of type `KubernetesDeploymentConfig | None | Unknown`
- paasta_tools/kubernetes/application/controller_wrappers.py:188:17: warning[possibly-missing-attribute] Attribute `get_unhealthy_pod_eviction_policy` may be missing on object of type `Unknown | None | KubernetesDeploymentConfig`
+ paasta_tools/kubernetes/application/controller_wrappers.py:188:17: warning[possibly-missing-attribute] Attribute `get_unhealthy_pod_eviction_policy` may be missing on object of type `KubernetesDeploymentConfig | None | Unknown`
- paasta_tools/kubernetes/application/controller_wrappers.py:296:23: warning[possibly-missing-attribute] Attribute `get_namespace` may be missing on object of type `Unknown | None | KubernetesDeploymentConfig`
+ paasta_tools/kubernetes/application/controller_wrappers.py:296:23: warning[possibly-missing-attribute] Attribute `get_namespace` may be missing on object of type `KubernetesDeploymentConfig | None | Unknown`
- paasta_tools/kubernetes/application/controller_wrappers.py:298:56: warning[possibly-missing-attribute] Attribute `get_namespace` may be missing on object of type `Unknown | None | KubernetesDeploymentConfig`
+ paasta_tools/kubernetes/application/controller_wrappers.py:298:56: warning[possibly-missing-attribute] Attribute `get_namespace` may be missing on object of type `KubernetesDeploymentConfig | None | Unknown`
- paasta_tools/kubernetes/application/controller_wrappers.py:307:23: warning[possibly-missing-attribute] Attribute `get_namespace` may be missing on object of type `Unknown | None | KubernetesDeploymentConfig`
+ paasta_tools/kubernetes/application/controller_wrappers.py:307:23: warning[possibly-missing-attribute] Attribute `get_namespace` may be missing on object of type `KubernetesDeploymentConfig | None | Unknown`
- paasta_tools/kubernetes/application/controller_wrappers.py:319:28: warning[possibly-missing-attribute] Attribute `get_autoscaling_metric_spec` may be missing on object of type `Unknown | None | KubernetesDeploymentConfig`
+ paasta_tools/kubernetes/application/controller_wrappers.py:319:28: warning[possibly-missing-attribute] Attribute `get_autoscaling_metric_spec` may be missing on object of type `KubernetesDeploymentConfig | None | Unknown`
- paasta_tools/kubernetes/application/controller_wrappers.py:321:21: warning[possibly-missing-attribute] Attribute `cluster` may be missing on object of type `Unknown | None | KubernetesDeploymentConfig`
+ paasta_tools/kubernetes/application/controller_wrappers.py:321:21: warning[possibly-missing-attribute] Attribute `cluster` may be missing on object of type `KubernetesDeploymentConfig | None | Unknown`
- paasta_tools/kubernetes/application/controller_wrappers.py:441:23: warning[possibly-missing-attribute] Attribute `get_namespace` may be missing on object of type `Unknown | None | KubernetesDeploymentConfig`
+ paasta_tools/kubernetes/application/controller_wrappers.py:441:23: warning[possibly-missing-attribute] Attribute `get_namespace` may be missing on object of type `KubernetesDeploymentConfig | None | Unknown`
- paasta_tools/kubernetes/application/controller_wrappers.py:443:56: warning[possibly-missing-attribute] Attribute `get_namespace` may be missing on object of type `Unknown | None | KubernetesDeploymentConfig`
+ paasta_tools/kubernetes/application/controller_wrappers.py:443:56: warning[possibly-missing-attribute] Attribute `get_namespace` may be missing on object of type `KubernetesDeploymentConfig | None | Unknown`
- paasta_tools/kubernetes/application/controller_wrappers.py:449:23: warning[possibly-missing-attribute] Attribute `get_namespace` may be missing on object of type `Unknown | None | KubernetesDeploymentConfig`
+ paasta_tools/kubernetes/application/controller_wrappers.py:449:23: warning[possibly-missing-attribute] Attribute `get_namespace` may be missing on object of type `KubernetesDeploymentConfig | None | Unknown`
- paasta_tools/kubernetes/application/controller_wrappers.py:496:23: warning[possibly-missing-attribute] Attribute `get_namespace` may be missing on object of type `Unknown | None | KubernetesDeploymentConfig`
+ paasta_tools/kubernetes/application/controller_wrappers.py:496:23: warning[possibly-missing-attribute] Attribute `get_namespace` may be missing on object of type `KubernetesDeploymentConfig | None | Unknown`
- paasta_tools/setup_kubernetes_job.py:440:24: warning[possibly-missing-attribute] Attribute `get_bounce_method` may be missing on object of type `Unknown | None | KubernetesDeploymentConfig`
+ paasta_tools/setup_kubernetes_job.py:440:24: warning[possibly-missing-attribute] Attribute `get_bounce_method` may be missing on object of type `KubernetesDeploymentConfig | None | Unknown`

sockeye (https://github.com/awslabs/sockeye)
- sockeye/lr_scheduler.py:138:29: warning[possibly-missing-attribute] Attribute `param_groups` may be missing on object of type `Unknown | None`
+ sockeye/lr_scheduler.py:138:29: warning[possibly-missing-attribute] Attribute `param_groups` may be missing on object of type `None | Unknown`
- sockeye/lr_scheduler.py:168:29: warning[possibly-missing-attribute] Attribute `param_groups` may be missing on object of type `Unknown | None`
+ sockeye/lr_scheduler.py:168:29: warning[possibly-missing-attribute] Attribute `param_groups` may be missing on object of type `None | Unknown`
- sockeye/lr_scheduler.py:236:29: warning[possibly-missing-attribute] Attribute `param_groups` may be missing on object of type `Unknown | None`
+ sockeye/lr_scheduler.py:236:29: warning[possibly-missing-attribute] Attribute `param_groups` may be missing on object of type `None | Unknown`

rich (https://github.com/Textualize/rich)
- rich/table.py:359:5: error[invalid-argument-type] Argument to bound method `setter` is incorrect: Expected `(Any, Any, /) -> None`, found `def padding(self, padding: int | tuple[int] | tuple[int, int] | tuple[int, int, int, int]) -> Table`
+ rich/table.py:359:5: error[invalid-argument-type] Argument to bound method `setter` is incorrect: Expected `(Any, Any, /) -> None`, found `def padding(self, padding: tuple[int] | tuple[int, int] | tuple[int, int, int, int] | int) -> Table`
- tests/test_console.py:173:16: error[invalid-return-type] Return type does not match returned value: expected `tuple[int, int]`, found `(Unknown & ~<class 'ValueError'>) | tuple[int, int] | (type[ValueError] & ~<class 'ValueError'>)`
+ tests/test_console.py:173:16: error[invalid-return-type] Return type does not match returned value: expected `tuple[int, int]`, found `(type[ValueError] & ~<class 'ValueError'>) | tuple[int, int] | (Unknown & ~<class 'ValueError'>)`

ignite (https://github.com/pytorch/ignite)
- ignite/handlers/lr_finder.py:186:16: error[unsupported-operator] Operator `<` is not supported between objects of type `Unknown | int | float` and `Unknown | None | int | float`
+ ignite/handlers/lr_finder.py:186:16: error[unsupported-operator] Operator `<` is not supported between objects of type `Unknown | int | float` and `None | float | int | Unknown`
- tests/ignite/handlers/test_checkpoint.py:1429:17: error[invalid-argument-type] Argument to function `__new__` is incorrect: Expected `str | PathLike[str]`, found `str | Path | None`
+ tests/ignite/handlers/test_checkpoint.py:1429:17: error[invalid-argument-type] Argument to function `__new__` is incorrect: Expected `str | PathLike[str]`, found `None | Path | str`
- tests/ignite/handlers/test_checkpoint.py:1812:25: error[invalid-argument-type] Argument to function `__new__` is incorrect: Expected `str | PathLike[str]`, found `str | Path | None`
+ tests/ignite/handlers/test_checkpoint.py:1812:25: error[invalid-argument-type] Argument to function `__new__` is incorrect: Expected `str | PathLike[str]`, found `None | Path | str`
- tests/ignite/handlers/test_checkpoint.py:1814:25: error[invalid-argument-type] Argument to function `__new__` is incorrect: Expected `str | PathLike[str]`, found `str | Path | None`
+ tests/ignite/handlers/test_checkpoint.py:1814:25: error[invalid-argument-type] Argument to function `__new__` is incorrect: Expected `str | PathLike[str]`, found `None | Path | str`

ppb-vector (https://github.com/ppb/ppb-vector)
- ppb_vector/__init__.py:567:16: error[invalid-return-type] Return type does not match returned value: expected `Vector`, found `int | float`
+ ppb_vector/__init__.py:567:16: error[invalid-return-type] Return type does not match returned value: expected `Vector`, found `float | int`
- tests/test_length.py:41:20: error[unresolved-attribute] Object of type `int | float` has no attribute `length`
+ tests/test_length.py:41:20: error[unresolved-attribute] Object of type `float | int` has no attribute `length`
- tests/test_project.py:50:8: error[unresolved-attribute] Object of type `int | float` has no attribute `isclose`
+ tests/test_project.py:50:8: error[unresolved-attribute] Object of type `float | int` has no attribute `isclose`
- tests/test_scalar_multiplication.py:10:28: error[unresolved-attribute] Object of type `int | float` has no attribute `x`
+ tests/test_scalar_multiplication.py:10:28: error[unresolved-attribute] Object of type `float | int` has no attribute `x`
- tests/test_scalar_multiplication.py:11:28: error[unresolved-attribute] Object of type `int | float` has no attribute `y`
+ tests/test_scalar_multiplication.py:11:28: error[unresolved-attribute] Object of type `float | int` has no attribute `y`
- tests/test_scalar_multiplication.py:19:12: error[unresolved-attribute] Object of type `int | float` has no attribute `isclose`
+ tests/test_scalar_multiplication.py:19:12: error[unresolved-attribute] Object of type `float | int` has no attribute `isclose`
- tests/test_scalar_multiplication.py:24:12: error[unresolved-attribute] Object of type `int | float` has no attribute `isclose`
+ tests/test_scalar_multiplication.py:24:12: error[unresolved-attribute] Object of type `float | int` has no attribute `isclose`
- tests/test_scalar_multiplication.py:32:20: error[unresolved-attribute] Object of type `int | float` has no attribute `length`
+ tests/test_scalar_multiplication.py:32:20: error[unresolved-attribute] Object of type `float | int` has no attribute `length`

optuna (https://github.com/optuna/optuna)
- optuna/importance/_fanova/_tree.py:45:16: error[invalid-return-type] Return type does not match returned value: expected `int | float`, found `(Unknown & ~None) | floating[Any]`
+ optuna/importance/_fanova/_tree.py:45:16: error[invalid-return-type] Return type does not match returned value: expected `int | float`, found `floating[Any] | (Unknown & ~None)`
- tutorial/20_recipes/005_user_defined_sampler.py:88:29: warning[possibly-missing-attribute] Attribute `params` may be missing on object of type `Unknown | None`
+ tutorial/20_recipes/005_user_defined_sampler.py:88:29: warning[possibly-missing-attribute] Attribute `params` may be missing on object of type `None | Unknown`

poetry (https://github.com/python-poetry/poetry)
- src/poetry/utils/env/env_manager.py:260:48: error[invalid-type-form] Invalid subscript of object of type `def list(self, name: str | None = None) -> Unknown` in type expression
+ src/poetry/utils/env/env_manager.py:260:48: error[invalid-type-form] Invalid subscript of object of type `def list(self, name: None | str = None) -> Unknown` in type expression

tornado (https://github.com/tornadoweb/tornado)
- tornado/iostream.py:1343:13: warning[possibly-missing-attribute] Attribute `getpeername` may be missing on object of type `Unknown | None | socket`
+ tornado/iostream.py:1343:13: warning[possibly-missing-attribute] Attribute `getpeername` may be missing on object of type `None | socket | Unknown`
- tornado/iostream.py:1363:13: warning[possibly-missing-attribute] Attribute `do_handshake` may be missing on object of type `Unknown | None | socket`
+ tornado/iostream.py:1363:13: warning[possibly-missing-attribute] Attribute `do_handshake` may be missing on object of type `None | socket | Unknown`
- tornado/iostream.py:1375:28: warning[possibly-missing-attribute] Attribute `getpeername` may be missing on object of type `Unknown | None | socket`
+ tornado/iostream.py:1375:28: warning[possibly-missing-attribute] Attribute `getpeername` may be missing on object of type `None | socket | Unknown`
- tornado/iostream.py:1379:47: warning[possibly-missing-attribute] Attribute `fileno` may be missing on object of type `Unknown | None | socket`
+ tornado/iostream.py:1379:47: warning[possibly-missing-attribute] Attribute `fileno` may be missing on object of type `None | socket | Unknown`
- tornado/iostream.py:1461:37: error[invalid-argument-type] Argument to bound method `remove_handler` is incorrect: Expected `int | _Selectable`, found `Unknown | None | socket`
+ tornado/iostream.py:1461:37: error[invalid-argument-type] Argument to bound method `remove_handler` is incorrect: Expected `int | _Selectable`, found `None | socket | Unknown`
- tornado/iostream.py:1466:13: error[invalid-argument-type] Argument to function `ssl_wrap_socket` is incorrect: Expected `socket`, found `Unknown | None | socket`
+ tornado/iostream.py:1466:13: error[invalid-argument-type] Argument to function `ssl_wrap_socket` is incorrect: Expected `socket`, found `None | socket | Unknown`
- tornado/iostream.py:1542:24: warning[possibly-missing-attribute] Attribute `recv_into` may be missing on object of type `Unknown | None | socket`
+ tornado/iostream.py:1542:24: warning[possibly-missing-attribute] Attribute `recv_into` may be missing on object of type `None | socket | Unknown`
- tornado/test/iostream_test.py:1128:34: warning[possibly-missing-attribute] Attribute `cipher` may be missing on object of type `Unknown | None | socket`
+ tornado/test/iostream_test.py:1128:34: warning[possibly-missing-attribute] Attribute `cipher` may be missing on object of type `None | socket | Unknown`

pylox (https://github.com/sco1/pylox)
- pylox/interpreter.py:127:20: warning[possibly-missing-attribute] Attribute `get_at` may be missing on object of type `Unknown | Environment | None`
+ pylox/interpreter.py:127:20: warning[possibly-missing-attribute] Attribute `get_at` may be missing on object of type `Environment | None | Unknown`
- pylox/interpreter.py:142:9: warning[possibly-missing-attribute] Attribute `define` may be missing on object of type `Unknown | Environment | None`
+ pylox/interpreter.py:142:9: warning[possibly-missing-attribute] Attribute `define` may be missing on object of type `Environment | None | Unknown`
- pylox/interpreter.py:152:25: error[invalid-argument-type] Argument is incorrect: Expected `Environment`, found `Unknown | Environment | None`
+ pylox/interpreter.py:152:25: error[invalid-argument-type] Argument is incorrect: Expected `Environment`, found `Environment | None | Unknown`
- pylox/interpreter.py:160:33: warning[possibly-missing-attribute] Attribute `enclosing` may be missing on object of type `Unknown | Environment | None`
+ pylox/interpreter.py:160:33: warning[possibly-missing-attribute] Attribute `enclosing` may be missing on object of type `Environment | None | Unknown`
- pylox/interpreter.py:162:9: warning[possibly-missing-attribute] Attribute `assign` may be missing on object of type `Unknown | Environment | None`
+ pylox/interpreter.py:162:9: warning[possibly-missing-attribute] Attribute `assign` may be missing on object of type `Environment | None | Unknown`
- pylox/interpreter.py:168:38: error[invalid-argument-type] Argument is incorrect: Expected `Environment`, found `Unknown | Environment | None`
+ pylox/interpreter.py:168:38: error[invalid-argument-type] Argument is incorrect: Expected `Environment`, found `Environment | None | Unknown`
- pylox/interpreter.py:169:9: warning[possibly-missing-attribute] Attribute `define` may be missing on object of type `Unknown | Environment | None`
+ pylox/interpreter.py:169:9: warning[possibly-missing-attribute] A

... (truncated 2819 lines) ...

No memory usage changes detected ✅

@AlexWaygood AlexWaygood added the ty Multi-file analysis & type inference label Dec 1, 2025
@astral-sh-bot
Copy link

astral-sh-bot bot commented Dec 1, 2025

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

@mtshiba mtshiba closed this Dec 1, 2025
@mtshiba mtshiba reopened this Dec 1, 2025
@mtshiba
Copy link
Contributor Author

mtshiba commented Dec 1, 2025

Hmm, at least, this approach alone doesn't seem to eliminate the instability of the diagnostic itself, rather than the instability of the output type.

1st: https://github.com/astral-sh/ruff/actions/runs/19820273428/job/56780817916?pr=21722

scikit-build-core (https://github.com/scikit-build/scikit-build-core)
+ src/scikit_build_core/_logging.py:153:13: warning[unsupported-base] Unsupported class base with type `<class 'Mapping[str, Style]'> | <class 'Mapping[str, Divergent]'>`
- Found 41 diagnostics
+ Found 42 diagnostics

2nd: https://github.com/astral-sh/ruff/actions/runs/19820836584/job/56782606719?pr=21722

scikit-build-core (https://github.com/scikit-build/scikit-build-core)
- src/scikit_build_core/_logging.py:153:13: warning[unsupported-base] Unsupported class base with type `<class 'Mapping[str, Style]'> | <class 'Mapping[str, Divergent]'>`
- Found 42 diagnostics
+ Found 41 diagnostics

@MichaReiser
Copy link
Member

Hmm, at least, this approach alone doesn't seem to eliminate the instability of the diagnostic itself, rather than the instability of the output type.

I think you need to create a PR targeting this PR to verify your change because mypy primer compares main vs this branch. What you want is to compare the branch to itself to see if there are any remaining instabilities

@mtshiba
Copy link
Contributor Author

mtshiba commented Dec 1, 2025

I think you need to create a PR targeting this PR to verify your change because mypy primer compares main vs this branch. What you want is to compare the branch to itself to see if there are any remaining instabilities

Ah, I see, main is unstable, so it can't be used for comparison.

@codspeed-hq
Copy link

codspeed-hq bot commented Dec 6, 2025

CodSpeed Performance Report

Merging #21722 will degrade performances by 33.52%

Comparing mtshiba:sort-recursive-union (7c89918) with main (ef45c97)

Summary

⚡ 1 improvement
❌ 3 regressions
✅ 44 untouched
⏩ 4 skipped1

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Mode Benchmark BASE HEAD Change
WallTime large[pydantic] 199.9 s 95.3 s ×2.1
WallTime small[altair] 5.5 s 5.8 s -4.39%
Simulation anyio 1.4 s 1.6 s -8.61%
Simulation hydra-zen 1.2 s 1.8 s -33.52%

Footnotes

  1. 4 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ty Multi-file analysis & type inference

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Non deterministic diagnostics

3 participants