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

No changes detected when running ty on typing conformance tests ✅

@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`

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`

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`

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`

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`

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`

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

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 for types `int` and `None`, in comparing `Unknown | int | float` with `Unknown | None | int | float`
+ ignite/handlers/lr_finder.py:186:16: error[unsupported-operator] Operator `<` is not supported for types `int` and `None`, in comparing `Unknown | int | float` with `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`

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`

schemathesis (https://github.com/schemathesis/schemathesis)
- src/schemathesis/generation/hypothesis/builder.py:137:30: warning[possibly-missing-attribute] Attribute `verbosity` may be missing on object of type `settings | None`
+ src/schemathesis/generation/hypothesis/builder.py:137:30: warning[possibly-missing-attribute] Attribute `verbosity` may be missing on object of type `None | settings`

pandera (https://github.com/pandera-dev/pandera)
- tests/pandas/test_decorators.py:1093:9: error[invalid-argument-type] Argument to function `get_star_kwargs_keys_dataframe` is incorrect: Expected `DataFrame[InSchema] | None`, found `DataFrame`
+ tests/pandas/test_decorators.py:1093:9: error[invalid-argument-type] Argument to function `get_star_kwargs_keys_dataframe` is incorrect: Expected `None | DataFrame[InSchema]`, found `DataFrame`
- tests/pandas/test_decorators.py:1097:9: error[invalid-argument-type] Argument to function `get_star_kwargs_keys_dataframe` is incorrect: Expected `DataFrame[InSchema] | None`, found `DataFrame`
+ tests/pandas/test_decorators.py:1097:9: error[invalid-argument-type] Argument to function `get_star_kwargs_keys_dataframe` is incorrect: Expected `None | DataFrame[InSchema]`, found `DataFrame`
- tests/pandas/test_decorators.py:1108:13: error[invalid-argument-type] Argument to function `get_star_kwargs_keys_dataframe` is incorrect: Expected `DataFrame[InSchema] | None`, found `DataFrame`
+ tests/pandas/test_decorators.py:1108:13: error[invalid-argument-type] Argument to function `get_star_kwargs_keys_dataframe` is incorrect: Expected `None | DataFrame[InSchema]`, found `DataFrame`

mitmproxy (https://github.com/mitmproxy/mitmproxy)
- examples/contrib/sslstrip.py:39:29: warning[possibly-missing-attribute] Attribute `replace` may be missing on object of type `bytes | None`
+ examples/contrib/sslstrip.py:39:29: warning[possibly-missing-attribute] Attribute `replace` may be missing on object of type `None | bytes`
- examples/contrib/webscanner_helper/urlinjection.py:71:27: warning[possibly-missing-attribute] Attribute `decode` may be missing on object of type `bytes | None`
+ examples/contrib/webscanner_helper/urlinjection.py:71:27: warning[possibly-missing-attribute] Attribute `decode` may be missing on object of type `None | bytes`
- mitmproxy/http.py:383:54: error[invalid-argument-type] Argument to function `len` is incorrect: Expected `Sized`, 

... (truncated 1236 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.

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