Skip to content

[ty] [experiment] improve narrowing from conditional terminals#23172

Closed
mtshiba wants to merge 5 commits intoastral-sh:mainfrom
mtshiba:improve-terminal-analysis
Closed

[ty] [experiment] improve narrowing from conditional terminals#23172
mtshiba wants to merge 5 commits intoastral-sh:mainfrom
mtshiba:improve-terminal-analysis

Conversation

@mtshiba
Copy link
Collaborator

@mtshiba mtshiba commented Feb 9, 2026

Summary

This is an experiment. What this PR is trying to fix is ​​already covered by #23109, but I started working on it without realizing it... (because it was needed for #23136). However, since it uses a different approach than #23109, I'll look at the performance differences. The scope of changes seems to be smaller, but the display of union types seems to change significantly. Additional work may be needed to minimize the display changes.

The core change in this PR is that when merging identical bindings in Bindings::merge, instead of simply combining the bindings into one, it tries to keep the two bindings as separate as possible.

Fixes astral-sh/ty#690

Test Plan

mdtest updated

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

astral-sh-bot bot commented Feb 9, 2026

Typing conformance results

No changes detected ✅

@codspeed-hq
Copy link

codspeed-hq bot commented Feb 9, 2026

CodSpeed Performance Report

Merging this PR will degrade performance by 16.1%

Comparing mtshiba:improve-terminal-analysis (7fd61ad) with main (20a1741)

Summary

❌ 2 regressed benchmarks
✅ 22 untouched benchmarks
⏩ 30 skipped benchmarks1

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

Performance Changes

Mode Benchmark BASE HEAD Efficiency
WallTime pydantic 7.1 s 7.5 s -5.18%
Simulation hydra-zen 1.3 s 1.5 s -16.1%

Footnotes

  1. 30 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.

@AlexWaygood AlexWaygood closed this Feb 9, 2026
@AlexWaygood AlexWaygood reopened this Feb 9, 2026
@astral-sh-bot
Copy link

astral-sh-bot bot commented Feb 9, 2026

mypy_primer results

Changes were detected when running on open source projects
parso (https://github.com/davidhalter/parso)
- parso/python/pep8.py:631:33: warning[possibly-missing-attribute] Attribute `parent` may be missing on object of type `None | Unknown`
+ parso/python/pep8.py:631:33: warning[possibly-missing-attribute] Attribute `parent` may be missing on object of type `Unknown | None`
- parso/python/pep8.py:651:40: warning[possibly-missing-attribute] Attribute `type` may be missing on object of type `None | Unknown`
+ parso/python/pep8.py:651:40: warning[possibly-missing-attribute] Attribute `type` may be missing on object of type `Unknown | None`

anyio (https://github.com/agronholm/anyio)
- src/anyio/_core/_sockets.py:988:39: error[invalid-argument-type] Argument is incorrect: Expected `str | bytes | PathLike[str] | PathLike[bytes]`, found `(str & ~ByteStreamConnectable) | (bytes & ~ByteStreamConnectable) | (tuple[str | IPv4Address | IPv6Address, int] & PathLike[object] & ~ByteStreamConnectable) | (PathLike[str] & ~ByteStreamConnectable)`
+ src/anyio/_core/_sockets.py:988:39: error[invalid-argument-type] Argument is incorrect: Expected `str | bytes | PathLike[str] | PathLike[bytes]`, found `(tuple[str | IPv4Address | IPv6Address, int] & PathLike[object] & ~ByteStreamConnectable) | (PathLike[str] & ~ByteStreamConnectable) | (str & ~ByteStreamConnectable) | (bytes & ~ByteStreamConnectable)`

pyinstrument (https://github.com/joerick/pyinstrument)
- pyinstrument/__main__.py:377:27: error[no-matching-overload] No overload of function `dirname` matches arguments
- Found 42 diagnostics
+ Found 41 diagnostics

spack (https://github.com/spack/spack)
- lib/spack/spack/ci/__init__.py:959:8: error[unsupported-operator] Operator `in` is not supported between objects of type `Any` and `None | Unknown`
+ lib/spack/spack/ci/__init__.py:959:8: error[unsupported-operator] Operator `in` is not supported between objects of type `Any` and `None | (Unknown & ~AlwaysTruthy) | (Unknown & ~AlwaysFalsy)`
- lib/spack/spack/ci/__init__.py:968:8: error[unsupported-operator] Operator `in` is not supported between objects of type `Literal["image"]` and `None | Unknown`
+ lib/spack/spack/ci/__init__.py:968:8: error[unsupported-operator] Operator `in` is not supported between objects of type `Literal["image"]` and `None | (Unknown & ~AlwaysTruthy) | (Unknown & ~AlwaysFalsy)`
- lib/spack/spack/ci/__init__.py:1050:8: error[unsupported-operator] Operator `in` is not supported between objects of type `Literal["tags"]` and `None | Unknown`
+ lib/spack/spack/ci/__init__.py:1050:8: error[unsupported-operator] Operator `in` is not supported between objects of type `Literal["tags"]` and `None | (Unknown & ~AlwaysTruthy) | (Unknown & ~AlwaysFalsy)`
- lib/spack/spack/cmd/checksum.py:164:20: error[invalid-assignment] Object of type `dict[StandardVersion, str] | None` is not assignable to `dict[StandardVersion, str]`
- lib/spack/spack/cmd/patch.py:30:27: error[invalid-argument-type] Argument to function `_patch_env` is incorrect: Expected `Environment`, found `Environment | None`
- lib/spack/spack/cmd/repo.py:388:22: warning[possibly-missing-attribute] Attribute `package_api` may be missing on object of type `Repo | None`
- lib/spack/spack/cmd/repo.py:389:49: error[invalid-argument-type] Argument to function `migrate_v1_to_v2` is incorrect: Expected `Repo`, found `Repo | None`
- lib/spack/spack/cmd/repo.py:391:24: warning[possibly-missing-attribute] Attribute `package_api` may be missing on object of type `Repo | None`
- lib/spack/spack/cmd/repo.py:395:39: warning[possibly-missing-attribute] Attribute `packages_path` may be missing on object of type `Repo | None`
- lib/spack/spack/cmd/repo.py:395:59: warning[possibly-missing-attribute] Attribute `root` may be missing on object of type `Repo | None`
- lib/spack/spack/cmd/repo.py:408:45: warning[possibly-missing-attribute] Attribute `namespace` may be missing on object of type `Repo | None`
- lib/spack/spack/cmd/repo.py:416:28: warning[possibly-missing-attribute] Attribute `namespace` may be missing on object of type `Repo | None`
- lib/spack/spack/cmd/repo.py:423:28: warning[possibly-missing-attribute] Attribute `package_api_str` may be missing on object of type `Repo | None`
- lib/spack/spack/cmd/repo.py:427:50: warning[possibly-missing-attribute] Attribute `root` may be missing on object of type `Repo | None`
- lib/spack/spack/cmd/repo.py:432:33: warning[possibly-missing-attribute] Attribute `namespace` may be missing on object of type `Repo | None`
- lib/spack/spack/cmd/stage.py:77:27: error[invalid-argument-type] Argument to function `_stage_env` is incorrect: Expected `Environment`, found `Environment | None`
- lib/spack/spack/cmd/style.py:697:27: error[unresolved-attribute] Object of type `AST` has no attribute `lineno`
- lib/spack/spack/cmd/style.py:697:40: error[unresolved-attribute] Object of type `AST` has no attribute `col_offset`
- lib/spack/spack/vendor/jinja2/exceptions.py:43:23: error[invalid-assignment] Object of type `str | Undefined | None` is not assignable to `str | None`
- lib/spack/spack/vendor/jinja2/parser.py:433:9: error[invalid-assignment] Object of type `Expr` is not assignable to attribute `call` of type `Call`
- Found 4365 diagnostics
+ Found 4348 diagnostics

pip (https://github.com/pypa/pip)
- src/pip/_internal/operations/prepare.py:290:12: warning[possibly-missing-attribute] Attribute `is_file` may be missing on object of type `Unknown | Link | None`
+ src/pip/_internal/operations/prepare.py:290:12: warning[possibly-missing-attribute] Attribute `is_file` may be missing on object of type `Unknown | None | Link`
- src/pip/_internal/operations/prepare.py:292:44: warning[possibly-missing-attribute] Attribute `file_path` may be missing on object of type `Unknown | Link | None`
+ src/pip/_internal/operations/prepare.py:292:44: warning[possibly-missing-attribute] Attribute `file_path` may be missing on object of type `Unknown | None | Link`
- src/pip/_internal/operations/prepare.py:313:48: warning[possibly-missing-attribute] Attribute `filename` may be missing on object of type `Unknown | Link | None`
+ src/pip/_internal/operations/prepare.py:313:48: warning[possibly-missing-attribute] Attribute `filename` may be missing on object of type `Unknown | None | Link`
- src/pip/_internal/operations/prepare.py:320:12: warning[possibly-missing-attribute] Attribute `is_wheel` may be missing on object of type `Unknown | Link | None`
+ src/pip/_internal/operations/prepare.py:320:12: warning[possibly-missing-attribute] Attribute `is_wheel` may be missing on object of type `Unknown | None | Link`
- src/pip/_internal/operations/prepare.py:325:12: warning[possibly-missing-attribute] Attribute `is_existing_dir` may be missing on object of type `Unknown | Link | None`
+ src/pip/_internal/operations/prepare.py:325:12: warning[possibly-missing-attribute] Attribute `is_existing_dir` may be missing on object of type `Unknown | None | Link`
- src/pip/_internal/operations/prepare.py:327:30: warning[possibly-missing-attribute] Attribute `file_path` may be missing on object of type `Unknown | Link | None`
+ src/pip/_internal/operations/prepare.py:327:30: warning[possibly-missing-attribute] Attribute `file_path` may be missing on object of type `Unknown | None | Link`
- src/pip/_internal/operations/prepare.py:351:12: warning[possibly-missing-attribute] Attribute `is_vcs` may be missing on object of type `Unknown | Link | None`
+ src/pip/_internal/operations/prepare.py:351:12: warning[possibly-missing-attribute] Attribute `is_vcs` may be missing on object of type `Unknown | None | Link`
- src/pip/_internal/operations/prepare.py:353:12: warning[possibly-missing-attribute] Attribute `is_existing_dir` may be missing on object of type `Unknown | Link | None`
+ src/pip/_internal/operations/prepare.py:353:12: warning[possibly-missing-attribute] Attribute `is_existing_dir` may be missing on object of type `Unknown | None | Link`
- src/pip/_internal/operations/prepare.py:387:52: error[invalid-argument-type] Argument to bound method `_fetch_metadata_using_lazy_wheel` is incorrect: Expected `Link`, found `Unknown | Link | None`
+ src/pip/_internal/operations/prepare.py:387:52: error[invalid-argument-type] Argument to bound method `_fetch_metadata_using_lazy_wheel` is incorrect: Expected `Link`, found `Unknown | None | Link`
- src/pip/_internal/operations/prepare.py:395:25: warning[possibly-missing-attribute] Attribute `metadata_link` may be missing on object of type `Unknown | Link | None`
+ src/pip/_internal/operations/prepare.py:395:25: warning[possibly-missing-attribute] Attribute `metadata_link` may be missing on object of type `Unknown | None | Link`
- src/pip/_internal/operations/prepare.py:415:13: warning[possibly-missing-attribute] Attribute `filename` may be missing on object of type `Unknown | Link | None`
+ src/pip/_internal/operations/prepare.py:415:13: warning[possibly-missing-attribute] Attribute `filename` may be missing on object of type `Unknown | None | Link`
- src/pip/_internal/operations/prepare.py:486:30: warning[possibly-missing-attribute] Attribute `url` may be missing on object of type `Unknown | Link | None`
+ src/pip/_internal/operations/prepare.py:486:30: warning[possibly-missing-attribute] Attribute `url` may be missing on object of type `Unknown | None | Link`
- src/pip/_internal/operations/prepare.py:551:50: warning[possibly-missing-attribute] Attribute `is_wheel` may be missing on object of type `Unknown | Link | None`
+ src/pip/_internal/operations/prepare.py:551:50: warning[possibly-missing-attribute] Attribute `is_wheel` may be missing on object of type `Unknown | None | Link`
- src/pip/_internal/operations/prepare.py:553:49: error[invalid-argument-type] Argument to function `_check_download_dir` is incorrect: Expected `Link`, found `Unknown | Link | None`
+ src/pip/_internal/operations/prepare.py:553:49: error[invalid-argument-type] Argument to function `_check_download_dir` is incorrect: Expected `Link`, found `Unknown | None | Link`
- src/pip/_internal/operations/prepare.py:555:38: warning[possibly-missing-attribute] Attribute `url` may be missing on object of type `Unknown | Link | None`
+ src/pip/_internal/operations/prepare.py:555:38: warning[possibly-missing-attribute] Attribute `url` may be missing on object of type `Unknown | None | Link`
- src/pip/_internal/resolution/resolvelib/candidates.py:293:12: warning[possibly-missing-attribute] Attribute `is_wheel` may be missing on object of type `Unknown | Link | None`
+ src/pip/_internal/resolution/resolvelib/candidates.py:293:12: warning[possibly-missing-attribute] Attribute `is_wheel` may be missing on object of type `Unknown | None | Link`
- src/pip/_internal/resolution/resolvelib/candidates.py:293:39: warning[possibly-missing-attribute] Attribute `is_file` may be missing on object of type `Unknown | Link | None`
+ src/pip/_internal/resolution/resolvelib/candidates.py:293:39: warning[possibly-missing-attribute] Attribute `is_file` may be missing on object of type `Unknown | None | Link`
- src/pip/_internal/resolution/resolvelib/candidates.py:294:27: warning[possibly-missing-attribute] Attribute `filename` may be missing on object of type `Unknown | Link | None`
+ src/pip/_internal/resolution/resolvelib/candidates.py:294:27: warning[possibly-missing-attribute] Attribute `filename` may be missing on object of type `Unknown | None | Link`
- src/pip/_internal/resolution/resolvelib/candidates.py:305:20: warning[possibly-missing-attribute] Attribute `is_wheel` may be missing on object of type `Unknown | Link | None`
+ src/pip/_internal/resolution/resolvelib/candidates.py:305:20: warning[possibly-missing-attribute] Attribute `is_wheel` may be missing on object of type `Unknown | None | Link`
- src/pip/_internal/resolution/resolvelib/candidates.py:306:20: warning[possibly-missing-attribute] Attribute `is_file` may be missing on object of type `Unknown | Link | None`
+ src/pip/_internal/resolution/resolvelib/candidates.py:306:20: warning[possibly-missing-attribute] Attribute `is_file` may be missing on object of type `Unknown | None | Link`

jinja (https://github.com/pallets/jinja)
- src/jinja2/exceptions.py:43:23: error[invalid-assignment] Object of type `str | Undefined | None` is not assignable to `str | None`
- src/jinja2/parser.py:429:9: error[invalid-assignment] Object of type `Expr` is not assignable to attribute `call` of type `Call`
- Found 179 diagnostics
+ Found 177 diagnostics

beartype (https://github.com/beartype/beartype)
- beartype/_check/code/_pep/pep484585/codepep484585subclass.py:126:59: warning[unused-type-ignore-comment] Unused blanket `type: ignore` directive
- beartype/_util/hint/pep/utilpepsign.py:239:12: error[invalid-return-type] Return type does not match returned value: expected `HintSign`, found `HintSign | None`
- Found 522 diagnostics
+ Found 520 diagnostics

yarl (https://github.com/aio-libs/yarl)
- yarl/_url.py:1663:20: error[no-matching-overload] No overload of function `lru_cache` matches arguments
- Found 45 diagnostics
+ Found 44 diagnostics

websockets (https://github.com/aaugustin/websockets)
- src/websockets/asyncio/connection.py:1219:17: error[unresolved-reference] Name `exceptions` used when not defined
- src/websockets/asyncio/connection.py:1235:17: error[unresolved-reference] Name `exceptions` used when not defined
- src/websockets/asyncio/connection.py:1242:29: error[unresolved-reference] Name `exceptions` used when not defined
- src/websockets/asyncio/connection.py:1243:15: error[unresolved-reference] Name `ExceptionGroup` used when not defined
- src/websockets/asyncio/connection.py:1243:51: error[unresolved-reference] Name `exceptions` used when not defined
- src/websockets/legacy/protocol.py:1610:17: error[unresolved-reference] Name `exceptions` used when not defined
- src/websockets/legacy/protocol.py:1623:17: error[unresolved-reference] Name `exceptions` used when not defined
- src/websockets/legacy/protocol.py:1630:29: error[unresolved-reference] Name `exceptions` used when not defined
- src/websockets/legacy/protocol.py:1631:15: error[unresolved-reference] Name `ExceptionGroup` used when not defined
- src/websockets/legacy/protocol.py:1631:51: error[unresolved-reference] Name `exceptions` used when not defined
- Found 35 diagnostics
+ Found 25 diagnostics

black (https://github.com/psf/black)
- src/blib2to3/pgen2/conv.py:77:34: warning[possibly-missing-attribute] Attribute `groups` may be missing on object of type `Match[str] | None`
+ src/blib2to3/pgen2/conv.py:77:34: warning[possibly-missing-attribute] Attribute `groups` may be missing on object of type `None | Match[str]`

paasta (https://github.com/yelp/paasta)
- paasta_tools/cleanup_expired_autoscaling_overrides.py:72:12: warning[possibly-missing-attribute] Attribute `data` may be missing on object of type `Unknown | None`
- paasta_tools/cleanup_expired_autoscaling_overrides.py:83:44: warning[possibly-missing-attribute] Attribute `data` may be missing on object of type `Unknown | None`
- paasta_tools/cleanup_expired_autoscaling_overrides.py:136:9: error[invalid-assignment] Object of type `dict[Unknown, Unknown]` is not assignable to attribute `data` on type `Unknown | None`
- paasta_tools/cli/cmds/mesh_status.py:111:23: warning[possibly-missing-attribute] Attribute `service` may be missing on object of type `PaastaOApiClient | None`
- paasta_tools/cli/cmds/mesh_status.py:115:12: warning[possibly-missing-attribute] Attribute `api_error` may be missing on object of type `PaastaOApiClient | None`
- paasta_tools/cli/cmds/mesh_status.py:122:13: warning[possibly-missing-attribute] Attribute `connection_error` may be missing on object of type `PaastaOApiClient | None`
- paasta_tools/cli/cmds/mesh_status.py:122:38: warning[possibly-missing-attribute] Attribute `timeout_error` may be missing on object of type `PaastaOApiClient | None`
- paasta_tools/cli/cmds/start_stop_restart.py:313:17: warning[possibly-missing-attribute] Attribute `service` may be missing on object of type `PaastaOApiClient | None`
- paasta_tools/cli/cmds/start_stop_restart.py:318:20: warning[possibly-missing-attribute] Attribute `api_error` may be missing on object of type `PaastaOApiClient | None`
- paasta_tools/cli/cmds/status.py:322:18: warning[possibly-missing-attribute] Attribute `service` may be missing on object of type `PaastaOApiClient | None`
- paasta_tools/cli/cmds/status.py:329:12: warning[possibly-missing-attribute] Attribute `api_error` may be missing on object of type `PaastaOApiClient | None`
- paasta_tools/cli/cmds/status.py:332:13: warning[possibly-missing-attribute] Attribute `connection_error` may be missing on object of type `PaastaOApiClient | None`
- paasta_tools/cli/cmds/status.py:332:38: warning[possibly-missing-attribute] Attribute `timeout_error` may be missing on object of type `PaastaOApiClient | None`
- paasta_tools/kubernetes_tools.py:4455:12: error[invalid-return-type] Return type does not match returned value: expected `int | None`, found `str | int | None`
- paasta_tools/utils.py:2909:12: error[invalid-return-type] Return type does not match returned value: expected `tuple[int, str]`, found `tuple[int | Any | None, str]`
+ paasta_tools/utils.py:2909:12: error[invalid-return-type] Return type does not match returned value: expected `tuple[int, str]`, found `tuple[int | (Any & ~Literal[-9]) | (Any & ~None) | None, str]`
- Found 1074 diagnostics
+ Found 1060 diagnostics

pytest (https://github.com/pytest-dev/pytest)
- src/_pytest/python.py:951:31: error[not-subscriptable] Cannot subscript object of type `_HiddenParam` with no `__getitem__` method
- src/_pytest/python.py:953:45: error[invalid-argument-type] Method `__getitem__` of type `bound method defaultdict[str, int].__getitem__(key: str, /) -> int` cannot be called with key of type `_HiddenParam` on object of type `defaultdict[str, int]`
- src/_pytest/python.py:955:25: error[invalid-argument-type] Method `__getitem__` of type `bound method defaultdict[str, int].__getitem__(key: str, /) -> int` cannot be called with key of type `_HiddenParam` on object of type `defaultdict[str, int]`
- src/_pytest/python.py:956:49: error[invalid-argument-type] Method `__getitem__` of type `bound method defaultdict[str, int].__getitem__(key: str, /) -> int` cannot be called with key of type `_HiddenParam` on object of type `defaultdict[str, int]`
- src/_pytest/python.py:958:21: error[invalid-argument-type] Method `__getitem__` of type `bound method defaultdict[str, int].__getitem__(key: str, /) -> int` cannot be called with key of type `_HiddenParam` on object of type `defaultdict[str, int]`
- src/_pytest/raises.py:1427:56: error[invalid-argument-type] Argument to function `issubclass` is incorrect: Expected `type`, found `type[BaseException] | None`
+ src/_pytest/unittest.py:624:28: warning[unused-type-ignore-comment] Unused blanket `type: ignore` directive
- Found 397 diagnostics
+ Found 392 diagnostics

scrapy (https://github.com/scrapy/scrapy)
- scrapy/cmdline.py:186:11: error[invalid-argument-type] Method `__getitem__` of type `bound method dict[str, ScrapyCommand].__getitem__(key: str, /) -> ScrapyCommand` cannot be called with key of type `None` on object of type `dict[str, ScrapyCommand]`
- tests/test_pipeline_files.py:652:31: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `str`, found `str | None`
+ tests/test_pipeline_files.py:652:31: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `str`, found `(str & ~AlwaysFalsy) | (str & ~AlwaysTruthy) | None`
- Found 1781 diagnostics
+ Found 1780 diagnostics

ignite (https://github.com/pytorch/ignite)
+ ignite/engine/deterministic.py:270:37: warning[unused-type-ignore-comment] Unused blanket `type: ignore` directive
- tests/ignite/distributed/utils/__init__.py:143:8: error[unsupported-operator] Operator `in` is not supported between objects of type `str | None` and `Literal["horovod"]`
+ tests/ignite/distributed/utils/__init__.py:143:8: error[unsupported-operator] Operator `in` is not supported between objects of type `None | str` and `Literal["horovod"]`
- Found 2096 diagnostics
+ Found 2097 diagnostics

sockeye (https://github.com/awslabs/sockeye)
- sockeye/inference.py:346:28: error[invalid-argument-type] Argument to function `len` is incorrect: Expected `Sized`, found `list[str] | None`
+ sockeye/inference.py:346:28: error[invalid-argument-type] Argument to function `len` is incorrect: Expected `Sized`, found `(list[str] & ~AlwaysFalsy) | (list[str] & ~AlwaysTruthy) | None`
- sockeye/inference.py:348:34: error[invalid-argument-type] Argument to function `len` is incorrect: Expected `Sized`, found `list[str] | None`
+ sockeye/inference.py:348:34: error[invalid-argument-type] Argument to function `len` is incorrect: Expected `Sized`, found `(list[str] & ~AlwaysFalsy) | (list[str] & ~AlwaysTruthy) | None`
- test/unit/test_data_io.py:361:20: error[invalid-argument-type] Argument to function `len` is incorrect: Expected `Sized`, found `Unknown | list[Unknown] | None`
+ test/unit/test_data_io.py:361:20: error[invalid-argument-type] Argument to function `len` is incorrect: Expected `Sized`, found `Unknown | None | list[Unknown]`
- test/unit/test_data_io.py:361:70: error[invalid-argument-type] Argument to function `len` is incorrect: Expected `Sized`, found `Unknown | list[Unknown] | None`
+ test/unit/test_data_io.py:361:70: error[invalid-argument-type] Argument to function `len` is incorrect: Expected `Sized`, found `Unknown | None | list[Unknown]`

pylint (https://github.com/pycqa/pylint)
- pylint/checkers/typecheck.py:729:46: warning[possibly-missing-attribute] Attribute `parent` may be missing on object of type `Unknown | None`
- pylint/checkers/typecheck.py:732:34: warning[possibly-missing-attribute] Attribute `parent` may be missing on object of type `Unknown | None`
- pylint/checkers/typecheck.py:734:34: warning[possibly-missing-attribute] Attribute `statement` may be missing on object of type `Unknown | None`
- Found 218 diagnostics
+ Found 215 diagnostics

dulwich (https://github.com/dulwich/dulwich)
- dulwich/notes.py:644:20: error[invalid-argument-type] Argument is incorrect: Expected `bytes`, found `bytes | None`
- Found 223 diagnostics
+ Found 222 diagnostics

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

mkosi (https://github.com/systemd/mkosi)
- mkosi/__init__.py:1700:9: error[invalid-argument-type] Argument to function `run` is incorrect: Expected `Sequence[Path | str]`, found `list[Unknown | Path | str | None]`
- mkosi/__init__.py:1793:17: error[invalid-argument-type] Argument to function `systemd_tool_version` is incorrect: Expected `Path | str`, found `Unknown | Path | None`
- mkosi/__init__.py:1853:17: error[invalid-argument-type] Argument to function `systemd_tool_version` is incorrect: Expected `Path | str`, found `Unknown | Path | None`
- mkosi/__init__.py:1910:27: warning[possibly-missing-attribute] Attribute `group` may be missing on object of type `Match[str] | None`
- mkosi/__init__.py:2809:12: error[invalid-return-type] Return type does not match returned value: expected `Path`, found `Path | None`
- mkosi/__init__.py:4459:9: error[invalid-argument-type] Argument to function `run` is incorrect: Expected `Sequence[Path | str]`, found `list[Path | None | str]`
- mkosi/__init__.py:4550:15: error[unsupported-operator] Operator `/` is not supported between objects of type `Path | None` and `Literal["mkosi.key"]`
- mkosi/__init__.py:4550:40: error[unsupported-operator] Operator `/` is not supported between objects of type `Path | None` and `Literal["mkosi.crt"]`
- mkosi/__init__.py:4574:24: error[unsupported-operator] Operator `/` is not supported between objects of type `Path | None` and `Literal["mkosi.key"]`
- mkosi/__init__.py:4575:21: error[unsupported-operator] Operator `/` is not supported between objects of type `Path | None` and `Literal["mkosi.crt"]`
- mkosi/__init__.py:4588:9: error[unsupported-operator] Operator `/` is not supported between objects of type `Path | None` and `Literal["mkosi.version"]`
- mkosi/bootloader.py:395:52: error[invalid-argument-type] Argument to function `extract_pe_section` is incorrect: Expected `Path`, found `Path | None`
- mkosi/config.py:291:16: error[invalid-return-type] Return type does not match returned value: expected `str`, found `Unknown | str | None`
- mkosi/config.py:497:16: error[invalid-return-type] Return type does not match returned value: expected `Architecture`, found `Unknown | Architecture | None`
- mkosi/config.py:540:16: error[invalid-return-type] Return type does not match returned value: expected `str`, found `Unknown | str | None`
- mkosi/config.py:562:16: error[invalid-return-type] Return type does not match returned value: expected `str`, found `Unknown | str | None`
- mkosi/config.py:707:12: error[invalid-return-type] Return type does not match returned value: expected `bool`, found `bool | None`
- mkosi/distribution/arch.py:148:16: error[invalid-return-type] Return type does not match returned value: expected `str`, found `Unknown | str | None`
- mkosi/distribution/azure.py:112:16: error[invalid-return-type] Return type does not match returned value: expected `str`, found `Unknown | str | None`
- mkosi/distribution/centos.py:96:16: error[invalid-return-type] Return type does not match returned value: expected `str`, found `Unknown | str | None`
- mkosi/distribution/debian.py:257:16: error[invalid-return-type] Return type does not match returned value: expected `str`, found `Unknown | str | None`
- mkosi/distribution/fedora.py:57:23: warning[possibly-missing-attribute] Attribute `group` may be missing on object of type `Match[str] | None`
- mkosi/distribution/fedora.py:268:16: error[invalid-return-type] Return type does not match returned value: expected `str`, found `Unknown | str | None`
- mkosi/distribution/kali.py:65:16: error[invalid-return-type] Return type does not match returned value: expected `str`, found `Unknown | str | None`
- mkosi/distribution/mageia.py:67:16: error[invalid-return-type] Return type does not match returned value: expected `str`, found `Unknown | str | None`
- mkosi/distribution/openmandriva.py:63:16: error[invalid-return-type] Return type does not match returned value: expected `str`, found `Unknown | str | None`
- mkosi/distribution/opensuse.py:280:16: error[invalid-return-type] Return type does not match returned value: expected `str`, found `Unknown | str | None`
- mkosi/distribution/opensuse.py:340:18: warning[possibly-missing-attribute] Attribute `iter` may be missing on object of type `Element[str] | None`
- mkosi/distribution/postmarketos.py:111:16: error[invalid-return-type] Return type does not match returned value: expected `str`, found `Unknown | str | None`
- mkosi/qemu.py:341:33: error[invalid-assignment] Object of type `list[Path | str | None]` is not assignable to `list[Path | str]`
- mkosi/qemu.py:496:13: error[invalid-argument-type] Argument is incorrect: Expected `Sequence[Path | str]`, found `list[Path | None | str]`
- Found 75 diagnostics
+ Found 44 diagnostics

poetry (https://github.com/python-poetry/poetry)
- src/poetry/inspection/info.py:466:9: error[invalid-assignment] Object of type `Literal["directory"]` is not assignable to attribute `_source_type` on type `PackageInfo | None`
- src/poetry/inspection/info.py:467:9: error[invalid-assignment] Object of type `str` is not assignable to attribute `_source_url` on type `PackageInfo | None`
- src/poetry/inspection/info.py:469:16: error[invalid-return-type] Return type does not match returned value: expected `PackageInfo`, found `PackageInfo | None`
- Found 978 diagnostics
+ Found 975 diagnostics

pydantic (https://github.com/pydantic/pydantic)
- pydantic/v1/utils.py:613:16: error[invalid-return-type] Return type does not match returned value: expected `Mapping[int | str, Any]`, found `AbstractSet[int | str] | Mapping[int | str, Any] | dict[int | str, ellipsis]`
+ pydantic/v1/utils.py:613:16: error[invalid-return-type] Return type does not match returned value: expected `Mapping[int | str, Any]`, found `(AbstractSet[int | str] & Top[Mapping[Unknown, object]]) | Mapping[int | str, Any] | dict[int | str, ellipsis]`

schemathesis (https://github.com/schemathesis/schemathesis)
- src/schemathesis/specs/openapi/schemas.py:322:32: warning[possibly-missing-attribute] Attribute `items` may be missing on object of type `Mapping[str, Any] | None`
- Found 321 diagnostics
+ Found 320 diagnostics

nox (https://github.com/wntrblm/nox)
- nox/sessions.py:780:49: warning[possibly-missing-attribute] Attribute `_reused` may be missing on object of type `(Unknown & ~PassthroughEnv) | (ProcessEnv & ~PassthroughEnv) | None`
- nox/sessions.py:792:29: warning[possibly-missing-attribute] Attribute `is_offline` may be missing on object of type `Unknown | ProcessEnv | None`
+ nox/sessions.py:792:29: warning[possibly-missing-attribute] Attribute `is_offline` may be missing on object of type `ProcessEnv | Unknown | None`
- nox/sessions.py:806:13: warning[possibly-missing-attribute] Attribute `conda_cmd` may be missing on object of type `Unknown | ProcessEnv | None`
+ nox/sessions.py:806:13: warning[possibly-missing-attribute] Attribute `conda_cmd` may be missing on object of type `ProcessEnv | Unknown | None`
- Found 24 diagnostics
+ Found 23 diagnostics

mitmproxy (https://github.com/mitmproxy/mitmproxy)
- mitmproxy/net/encoding.py:62:47: error[invalid-argument-type] Argument is incorrect: Expected `bytes`, found `str | bytes`
+ mitmproxy/net/encoding.py:62:47: error[invalid-argument-type] Argument is incorrect: Expected `bytes`, found `bytes | str`
- mitmproxy/net/encoding.py:120:47: error[invalid-argument-type] Argument is incorrect: Expected `bytes`, found `str | bytes`
+ mitmproxy/net/encoding.py:120:47: error[invalid-argument-type] Argument is incorrect: Expected `bytes`, found `bytes | str`
+ mitmproxy/tools/console/master.py:155:16: error[invalid-return-type] Return type does not match returned value: expected `T@spawn_editor`, found `bytes | T@spawn_editor | Any`
- Found 2124 diagnostics
+ Found 2125 diagnostics

vision (https://github.com/pytorch/vision)
- .github/process_commit.py:77:47: error[invalid-argument-type] Argument to function `get_pr_merger_and_labels` is incorrect: Expected `int`, found `int | None`
+ .github/process_commit.py:77:47: error[invalid-argument-type] Argument to function `get_pr_merger_and_labels` is incorrect: Expected `int`, found `(int & ~AlwaysFalsy) | (int & ~AlwaysTruthy) | None`
- release/apply-release-changes.py:89:20: error[unsupported-operator] Operator `/` is not supported between objects of type `Path | None` and `Literal[".github"]`
- test/datasets_utils.py:861:21: warning[possibly-missing-attribute] Attribute `shape` may be missing on object of type `ndarray[tuple[Any, ...], dtype[Any]] | None`
+ test/datasets_utils.py:861:21: warning[possibly-missing-attribute] Attribute `shape` may be missing on object of type `None | ndarray[tuple[Any, ...], dtype[Any]]`
- test/test_transforms_v2.py:6533:42: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Sequence[int | float]`, found `Unknown | None | int | list[Unknown | int]`
+ test/test_transforms_v2.py:6533:42: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Sequence[int | float]`, found `(Unknown & ~Top[list[Unknown]]) | None | int | (Unknown & Top[list[Unknown]]) | list[Unknown | int]`
- Found 1391 diagnostics
+ Found 1390 diagnostics

urllib3 (https://github.com/urllib3/urllib3)
- test/test_response.py:426:16: warning[possibly-missing-attribute] Attribute `compress` may be missing on object of type `Unknown | None`
+ test/test_response.py:426:16: warning[possibly-missing-attribute] Attribute `compress` may be missing on object of type `None | Unknown`
- test/test_response.py:434:16: warning[possibly-missing-attribute] Attribute `compress` may be missing on object of type `Unknown | None`
+ test/test_response.py:434:16: warning[possibly-missing-attribute] Attribute `compress` may be missing on object of type `None | Unknown`
- test/test_response.py:646:58: warning[possibly-missing-attribute] Attribute `compress` may be missing on object of type `Unknown | None`
+ test/test_response.py:646:58: warning[possibly-missing-attribute] Attribute `compress` may be missing on object of type `None | (Unknown & ~AlwaysTruthy) | (Unknown & ~AlwaysFalsy)`
- test/test_response.py:669:31: error[not-iterable] Object of type `None` is not iterable
- test/test_response.py:706:31: error[not-iterable] Object of type `None` is not iterable
- test/test_response.py:761:31: error[not-iterable] Object of type `None` is not iterable
- test/test_response.py:816:33: error[not-iterable] Object of type `None` is not iterable
- test/test_response.py:839:28: warning[possibly-missing-attribute] Attribute `__name__` may be missing on object of type `Unknown | None`
+ test/test_response.py:839:28: warning[possibly-missing-attribute] Attribute `__name__` may be missing on object of type `None | Unknown`
- Found 285 diagnostics
+ Found 281 diagnostics

pandera (https://github.com/pandera-dev/pandera)
- pandera/api/pandas/components.py:193:13: error[invalid-argument-type] Argument to function `column_strategy` is incorrect: Expected `str | None`, found `Unknown | str | tuple[str, ...] | None`
+ pandera/api/pandas/components.py:193:13: error[invalid-argument-type] Argument to function `column_strategy` is incorrect: Expected `str | None`, found `Unknown | tuple[str, ...] | str | None`
+ tests/modin/test_logical_dtypes.py:156:13: error[invalid-argument-type] Argument to bound method `check` is incorrect: Expected `pandera.engines.pandas_engine.DataType`, found `pandera.dtypes.DataType`
+ tests/modin/test_logical_dtypes.py:156:61: error[invalid-argument-type] Argument to bound method `check` is incorrect: Expected `Series[Any] | None`, found `Series[Any] | DataFrame`
- Found 1644 diagnostics
+ Found 1646 diagnostics

mypy (https://github.com/python/mypy)
- mypy/semanal_newtype.py:125:82: error[invalid-argument-type] Argument to function `has_any_from_unimported_type` is incorrect: Expected `Type`, found `ProperType | None`
- mypy/semanal_newtype.py:126:80: error[invalid-argument-type] Argument to bound method `unimported_type_becomes_any` is incorrect: Expected `Type`, found `ProperType | None`
- mypy/test/data.py:146:23: warning[possibly-missing-attribute] Attribute `group` may be missing on object of type `Match[str] | None`
- mypy/test/data.py:149:36: warning[possibly-missing-attribute] Attribute `group` may be missing on object of type `Match[str] | None`
- Found 1723 diagnostics
+ Found 1719 diagnostics

Expression (https://github.com/cognitedata/Expression)
- tests/test_compose.py:21:16: error[invalid-assignment] Object of type `(Never, /) -> Never` is not assignable to `(int, /) -> int`
- Found 205 diagnostics
+ Found 204 diagnostics

psycopg (https://github.com/psycopg/psycopg)
- tests/utils.py:95:17: warning[possibly-missing-attribute] Attribute `group` may be missing on object of type `Match[str] | None`
- tests/utils.py:96:14: warning[possibly-missing-attribute] Attribute `group` may be missing on object of type `Match[str] | None`
- tests/utils.py:97:47: warning[possibly-missing-attribute] Attribute `groups` may be missing on object of type `Match[str] | None`
- Found 654 diagnostics
+ Found 651 diagnostics

discord.py (https://github.com/Rapptz/discord.py)
- discord/audit_logs.py:550:56: error[invalid-argument-type] Argument to bound method `from_data` is incorrect: Expected `int`, found `None | Unknown | int`
- discord/audit_logs.py:551:55: error[invalid-argument-type] Argument to bound method `from_data` is incorrect: Expected `int`, found `None | Unknown | int`
- discord/ext/commands/core.py:1944:13: error[unresolved-attribute] Object of type `((...) -> Coroutine[Any, Any, Any]) & ~Top[Command[Unknown, Top[(...)], Unknown]]` has no attribute `__commands_checks__`
+ discord/ext/commands/core.py:1944:13: error[unresolved-attribute] Object of type `object` has no attribute `append`
+ discord/ext/commands/core.py:1944:13: warning[possibly-missing-attribute] Attribute `__commands_checks__` may be missing on object of type `(((...) -> Coroutine[Any, Any, Any]) & <Protocol with members '__commands_checks__'> & ~Top[Command[Unknown, Top[(...)], Unknown]]) | (((...) -> Coroutine[Any, Any, Any]) & ~Top[Command[Unknown, Top[(...)], Unknown]] & ~<Protocol with members '__commands_checks__'>)`
- discord/ext/commands/core.py:2367:13: error[unresolved-attribute] Object of type `((...) -> Coroutine[Any, Any, Any]) & ~Top[Command[Unknown, Top[(...)], Unknown]]` has no attribute `__commands_checks__`
+ discord/ext/commands/core.py:2367:13: error[unresolved-attribute] Object of type `object` has no attribute `append`
+ discord/ext/commands/core.py:2367:13: warning[possibly-missing-attribute] Attribute `__commands_checks__` may be missing on object of type `(((...) -> Coroutine[Any, Any, Any]) & <Protocol with members '__commands_checks__'> & ~Top[Command[Unknown, Top[(...)], Unknown]]) | (((...) -> Coroutine[Any, Any, Any]) & ~Top[Command[Unknown, Top[(...)], Unknown]] & ~<Protocol with members '__commands_checks__'>)`
- discord/ext/commands/core.py:2368:13: error[invalid-assignment] Object of type `Literal[True]` is not assignable to attribute `__discord_app_commands_guild_only__` on type `((...) -> Coroutine[Any, Any, Any]) & ~Top[Command[Unknown, Top[(...)], Unknown]]`
+ discord/ext/commands/core.py:2368:13: error[invalid-assignment] Object of type `Literal[True]` is not assignable to attribute `__discord_app_commands_guild_only__` on type `(((...) -> Coroutine[Any, Any, Any]) & <Protocol with members '__commands_checks__'> & ~Top[Command[Unknown, Top[(...)], Unknown]]) | (((...) -> Coroutine[Any, Any, Any]) & ~Top[Command[Unknown, Top[(...)], Unknown]] & ~<Protocol with members '__commands_checks__'>)`
- discord/ext/commands/core.py:2442:13: error[unresolved-attribute] Object of type `((...) -> Coroutine[Any, Any, Any]) & ~Top[Command[Unknown, Top[(...)], Unknown]]` has no attribute `__commands_checks__`
+ discord/ext/commands/core.py:2442:13: error[unresolved-attribute] Object of type `object` has no attribute `append`
+ discord/ext/commands/core.py:2442:13: warning[possibly-missing-attribute] Attribute `__commands_checks__` may be missing on object of type `(((...) -> Coroutine[Any, Any, Any]) & <Protocol with members '__commands_checks__'> & ~Top[Command[Unknown, Top[(...)], Unknown]]) | (((...) -> Coroutine[Any, Any, Any]) & ~Top[Command[Unknown, Top[(...)], Unknown]] & ~<Protocol with members '__commands_checks__'>)`
- discord/ext/commands/core.py:2443:13: error[invalid-assignment] Object of type `Literal[True]` is not assignable to attribute `__discord_app_commands_is_nsfw__` on type `((...) -> Coroutine[Any, Any, Any]) & ~Top[Command[Unknown, Top[(...)], Unknown]]`
+ discord/ext/commands/core.py:2443:13: error[invalid-assignment] Object of type `Literal[True]` is not assignable to attribute `__discord_app_commands_is_nsfw__` on type `(((...) -> Coroutine[Any, Any, Any]) & <Protocol with members '__commands_checks__'> & ~Top[Command[Unknown, Top[(...)], Unknown]]) | (((...) -> Coroutine[Any, Any, Any]) & ~Top[Command[Unknown, Top[(...)], Unknown]] & ~<Protocol with members '__commands_checks__'>)`
- Found 531 diagnostics
+ Found 532 diagnostics

Tanjun (https://github.com/FasterSpeeding/Tanjun)
- tanjun/annotations.py:1469:46: error[invalid-type-form] Variable of type `type[Unknown]` is not allowed in a type expression
- tanjun/clients.py:2720:13: error[invalid-assignment] Invalid subscript assignment with key of type `str | Path` and value of type `@Todo` on object of type `dict[str, ModuleType]`
+ tanjun/clients.py:2720:13: error[invalid-assignment] Invalid subscript assignment with key of type `Path | str` and value of type `@Todo` on object of type `dict[str, ModuleType]`
- tanjun/clients.py:2720:13: error[invalid-assignment] Invalid subscript assignment with key of type `str | Path` and value of type `@Todo` on object of type `dict[Path, ModuleType]`
+ tanjun/clients.py:2720:13: error[invalid-assignment] Invalid subscript assignment with key of type `Path | str` and value of type `@Todo` on object of type `dict[Path, ModuleType]`
- tanjun/commands/slash.py:2078:97: error[invalid-assignment] Object of type `None | Mapping[str, str] | (Sequence[str] & Top[Mapping[Unknown, object]]) | (Sequence[tuple[str, str]] & Top[Mapping[Unknown, object]]) | (Sequence[CommandChoice] & Top[Mapping[Unknown, object]])` is not assignable to `Mapping[str, str] | list[CommandChoice] | None`
+ tanjun/commands/slash.py:2078:97: error[invalid-assignment] Object of type `Mapping[str, str] | (Sequence[str] & Top[Mapping[Unknown, object]]) | (Sequence[tuple[str, str]] & Top[Mapping[Unknown, object]]) | (Sequence[CommandChoice] & Top[Mapping[Unknown, object]]) | None` is not assignable to `Mapping[str, str] | list[CommandChoice] | None`
- Found 134 diagnostics
+ Found 133 diagnostics

mongo-python-driver (https://github.com/mongodb/mongo-python-driver)
- pymongo/ssl_support.py:124:13: error[invalid-assignment] Object of type `Any | Literal[0]` is not assignable to attribute `verify_flags` on type `pymongo.pyopenssl_context.SSLContext | ssl.SSLContext`
+ pymongo/ssl_support.py:124:13: error[invalid-assignment] Object of type `Any | Literal[0]` is not assignable to attribute `verify_flags` on type `(ssl.SSLContext & ~<Protocol with members 'check_ocsp_endpoint'>) | pymongo.pyopenssl_context.SSLContext | (ssl.SSLContext & <Protocol with members 'check_ocsp_endpoint'>)`

sphinx (https://github.com/sphinx-doc/sphinx)
+ sphinx/ext/autodoc/_legacy_class_based/_documenters.py:1194:45: warning[unused-type-ignore-comment] Unused blanket `type: ignore` directive
- sphinx/ext/viewcode.py:121:59: warning[unused-type-ignore-comment] Unused blanket `type: ignore` directive
+ sphinx/ext/viewcode.py:192:53: warning[unused-type-ignore-comment] Unused blanket `type: ignore` directive
- Found 344 diagnostics
+ Found 345 diagnostics

trio (https://github.com/python-trio/trio)
- src/trio/testing/_fake_net.py:324:56: error[invalid-argument-type] Argument to bound method `from_python_sockaddr` is incorrect: Expected `tuple[str, int] | tuple[str, int, int, int]`, found `None | tuple[str, int]`
- Found 471 diagnostics
+ Found 470 diagnostics

cibuildwheel (https://github.com/pypa/cibuildwheel)
- cibuildwheel/resources/_rust_shim.py:53:14: error[invalid-argument-type] Argument to function `execv` is incorrect: Expected `str | bytes | PathLike[str] | PathLike[bytes]`, found `str | None`
- cibuildwheel/resources/_rust_shim.py:53:24: error[invalid-argument-type] Argument to function `execv` is incorrect: Expected `tuple[str | bytes | PathLike[str] | PathLike[bytes], ...] | list[bytes] | list[str] | ... omitted 5 union elements`, found `list[Unknown | str | None]`
- Found 29 diagnostics
+ Found 27 diagnostics

pyodide (https://github.com/pyodide/pyodide)
- pyodide-build/pyodide_build/pywasmcross.py:384:24: error[no-matching-overload] No overload of function `run` matches arguments
- pyodide-build/pyodide_build/pywasmcross.py:392:27: error[no-matching-overload] No overload of bound method `join` matches arguments
- Found 938 diagnostics
+ Found 936 diagnostics

cloud-init (https://github.com/canonical/cloud-init)
- cloudinit/config/cc_growpart.py:214:12: error[invalid-return-type] Return type does not match returned value: expected `Resizer`, found `None | (ResizeGrowPart & ~AlwaysFalsy) | (ResizeGrowFS & ~AlwaysFalsy) | (ResizeGpart & ~AlwaysFalsy) | (Unknown & ~AlwaysFalsy)`
- cloudinit/config/cc_mounts.py:189:25: error[invalid-argument-type] Argument to function `min` is incorrect: Argument type `Unknown | None | int` does not satisfy upper bound `SupportsDunderLT[Any] | SupportsDunderGT[Any]` of type variable `SupportsRichComparisonT`
- cloudinit/sources/DataSourceOpenNebula.py:106:14: warning[possibly-missing-attribute] Attribute `get` may be missing on object of type `None | Unknown`
+ cloudinit/sources/DataSourceOpenNebula.py:106:14: warning[possibly-missing-attribute] Attribute `get` may be missing on object of type `None | (Unknown & ~AlwaysTruthy) | (Unknown & ~AlwaysFalsy)`
- cloudinit/sources/DataSourceOpenNebula.py:113:24: warning[possibly-missing-attribute] Attribute `get` may be missing on object of type `None | Unknown`
+ cloudinit/sources/DataSourceOpenNebula.py:113:24: warning[possibly-missing-attribute] Attribute `get` may be missing on object of type `None | (Unknown & ~AlwaysTruthy) | (Unknown & ~AlwaysFalsy)`
- cloudinit/sources/DataSourceOpenNebula.py:115:29: warning[possibly-missing-attribute] Attribute `get` may be missing on object of type `None | Unknown`
+ cloudinit/sources/DataSourceOpenNebula.py:115:29: warning[possibly-missing-attribute] Attribute `get` may be missing on object of type `None | (Unknown & ~AlwaysTruthy) | (Unknown & ~AlwaysFalsy)`
- cloudinit/util.py:2007:26: error[not-iterable] Object of type `list[Unknown] | None | list[Unknown | str]` may not be iterable
- tests/unittests/sources/test_ibmcloud.py:278:56: error[not-subscriptable] Cannot subscript object of type `None` with no `__getitem__` method
- tests/unittests/sources/test_ibmcloud.py:279:26: error[not-subscriptable] Cannot subscript object of type `None` with no `__getitem__` method
- tests/unittests/sources/test_ibmcloud.py:280:33: error[not-subscriptable] Cannot subscript object of type `None` with no `__getitem__` method
- tests/unittests/sources/test_ibmcloud.py:281:65: error[not-subscriptable] Cannot subscript object of type `None` with no `__getitem__` method
- tests/unittests/sources/test_ibmcloud.py:282:32: error[not-subscriptable] Cannot subscript object of type `None` with no `__getitem__` method
- tests/unittests/sources/test_ibmcloud.py:304:41: error[not-subscriptable] Cannot subscript object of type `None` with no `__getitem__` method
- tests/unittests/sources/test_ibmcloud.py:305:26: error[not-subscriptable] Cannot subscript object of type `None` with no `__getitem__` method
- tests/unittests/sources/test_ibmcloud.py:306:33: error[not-subscriptable] Cannot subscript object of type `None` with no `__getitem__` method
- tests/unittests/sources/test_ibmcloud.py:307:63: error[not-subscriptable] Cannot subscript object of type `None` with no `__getitem__` method
- tests/unittests/sources/test_ibmcloud.py:326:41: error[not-subscriptable] Cannot subscript object of type `None` with no `__getitem__` method
- tests/unittests/sources/test_ibmcloud.py:327:26: error[not-subscriptable] Cannot subscript object of type `None` with no `__getitem__` method
- tests/unittests/sources/test_ibmcloud.py:328:16: error[not-subscriptable] Cannot subscript object of type `None` with no `__getitem__` method
- tests/unittests/sources/test_ibmcloud.py:329:63: error[not-subscriptable] Cannot subscript object of type `None` with no `__getitem__` method
+ tests/unittests/test_ds_identify.py:960:9: error[invalid-assignment] Invalid subscript assignment with key of type `Literal["etc/cloud/cloud.cfg.d/99_networklayer_common.cfg"]` and value of type `Literal["datasource_list: [ ConfigDrive, IBMCloud ]\n"]` on object of type `list[Unknown | dict[Unknown | str, Unknown | str | int]]`
+ tests/unittests/test_ds_identify.py:960:9: error[invalid-assignment] Invalid subscript assignment with key of type `Literal["etc/cloud/cloud.cfg.d/99_networklayer_common.cfg"]` and value of type `Literal["datasource_list: [ ConfigDrive, IBMCloud ]\n"]` on object of type `list[Unknown | str]`
+ tests/unittests/test_ds_identify.py:960:9: error[invalid-assignment] Cannot assign to a subscript on an object of type `str`
+ tests/unittests/test_ds_identify.py:965:9: error[invalid-assignment] Cannot assign to a subscript on an object of type `str`
+ tests/unittests/test_ds_identify.py:965:9: error[invalid-assignment] Invalid subscript assignment with key of type `Literal["etc/cloud/cloud.cfg.d/99_networklayer_common.cfg"]` and value of type `Literal["datasource_list: [ ConfigDrive, NoCloud ]\n"]` on object of type `list[Unknown | dict[Unknown | str, Unknown | str | int]]`
+ tests/unittests/test_ds_identify.py:965:9: error[invalid-assignment] Invalid subscript assignment with key of type `Literal["etc/cloud/cloud.cfg.d/99_networklayer_common.cfg"]` and value of type `Literal["datasource_list: [ ConfigDrive, NoCloud ]\n"]` on object of type `list[Unknown | str]`
- tests/unittests/test_ds_identify.py:1028:9: warning[possibly-missing-attribute] Attribute `update` may be missing on object of type `Unknown | str | list[Unknown | dict[Unknown | str, Unknown | str | int]] | dict[Unknown | str, Unknown | str] | list[Unknown | str]`
+ tests/unittests/test_ds_identify.py:1028:9: warning[possibly-missing-attribute] Attribute `update` may be missing on object of type `(Unknown & ~AlwaysFalsy) | (str & ~AlwaysFalsy) | (list[Unknown | dict[Unknown | str, Unknown | str | int]] & ~AlwaysFalsy) | ... omitted 7 union elements`
- tests/unittests/test_ds_identify.py:1044:9: warning[possibly-missing-attribute] Attribute `update` may be missing on object of type `Unknown | str | list[Unknown | dict[Unknown | str, Unknown | str | int]] | dict[Unknown | str, Unknown | str] | list[Unknown | str]`
+ tests/unittests/test_ds_identify.py:1044:9: warning[possibly-missing-attribute] Attribute `update` may be missing on object of type `(Unknown & ~AlwaysFalsy) | (str & ~AlwaysFalsy) | (list[Unknown | dict[Unknown | str, Unknown | str | int]] & ~AlwaysFalsy) | ... omitted 7 union elements`
- Found 1145 diagnostics
+ Found 1135 diagnostics

manticore (https://github.com/trailofbits/manticore)
- manticore/core/smtlib/expression.py:1294:25: error[unresolved-attribute] Object of type `Array & ~ArrayVariable` has no attribute `array`
+ manticore/core/smtlib/expression.py:1294:25: warning[possibly-missing-attribute] Attribute `array` may be missing on object of type `(Array & ~ArrayVariable & ~ArraySlice) | (ArraySlice & ~ArrayVariable)`
- manticore/native/state.py:129:15: error[no-matching-overload] No overload of bound method `get` matches arguments
- manticore/native/state.py:135:20: error[no-matching-overload] No overload of bound method `get` matches arguments
- manticore/native/state.py:136:17: error[invalid-argument-type] Method `__delitem__` of type `bound method dict[int | None, set[(StateBase, /) -> None]].__delitem__(key: int | None, /) -> None` cannot be called with key of type `int | str | None | (Any & ~str)` on object of type `dict[int | None, set[(StateBase, /) -> None]]`
- manticore/native/state.py:173:9: error[no-matching-overload] No overload of bound method `setdefault` matches arguments
- manticore/utils/helpers.py:118:17: error[invalid-argument-type] Argument to function `pickle_dump` is incorrect: Expected `IO[bytes]`, found `GzipFile | Unknown`
+ manticore/utils/helpers.py:118:17: error[invalid-argument-type] Argument to function `pickle_dump` is incorrect: Expected `IO[bytes]`, found `GzipFile | (Unknown & ~<Protocol with members 'name'>) | (Unknown & <Protocol with members 'name'>)`
- Found 11088 diagnostics
+ Found 11084 diagnostics

openlibrary (https://github.com/internetarchive/openlibrary)
- openlibrary/core/lists/model.py:474:27: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Thing | str | AnnotatedSeed`, found `str | ThingReferenceDict | AnnotatedSeedDict`
+ openlibrary/core/lists/model.py:474:27: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Thing | str | AnnotatedSeed`, found `str | (ThingReferenceDict & ~Top[dict[Unknown, Unknown]]) | (AnnotatedSeedDict & ~Top[dict[Unknown, Unknown]])`
- openlibrary/plugins/upstream/borrow.py:173:46: warning[possibly-missing-attribute] Attribute `_key` may be missing on object of type `OpenLibraryAccount | None`
+ openlibrary/plugins/upstream/borrow.py:173:46: warning[possibly-missing-attribute] Attribute `_key` may be missing on object of type `(OpenLibraryAccount & ~AlwaysTruthy) | None | (OpenLibraryAccount & ~AlwaysFalsy)`
- openlibrary/solr/types_generator.py:75:24: error[invalid-argument-type] Argument to bound method `add` is incorrect: Expected `str`, found `str | None`
- Found 1128 diagnostics
+ Found 1127 diagnostics

meson (https://github.com/mesonbuild/meson)
- mesonbuild/backend/ninjabackend.py:1891:77: warning[possibly-missing-attribute] Attribute `get_builddir` may be missing on object of type `CustomTarget | CustomTargetIndex | GeneratedList`
+ mesonbuild/backend/ninjabackend.py:1891:77: warning[possibly-missing-attribute] Attribute `get_builddir` may be missing on object of type `(CustomTarget & ~GeneratedList) | (CustomTargetIndex & ~GeneratedList) | GeneratedList`
- mesonbuild/backend/ninjabackend.py:2118:16: warning[possibly-missing-attribute] Attribute `uses_rust_abi` may be missing on object of type `BuildTarget | CustomTarget | CustomTargetIndex`
+ mesonbuild/backend/ninjabackend.py:2118:16: warning[possibly-missing-attribute] Attribute `uses_rust_abi` may be missing on object of type `(BuildTarget & ~StaticLibrary) | (CustomTarget & ~StaticLibrary) | (CustomTargetIndex & ~StaticLibrary) | StaticLibrary`
- mesonbuild/backend/ninjabackend.py:2125:65: error[invalid-argument-type] Argument to function `_get_rust_dependency_name` is incorrect: Expected `SharedLibrary | StaticLibrary | CustomTarget | CustomTargetIndex`, found `BuildTarget | CustomTarget | CustomTargetIndex`
+ mesonbuild/backend/ninjabackend.py:2125:65: error[invalid-argument-type] Argument to function `_get_rust_dependency_name` is incorrect: Expected `SharedLibrary | StaticLibrary | CustomTarget | CustomTargetIndex`, found `(BuildTarget & ~StaticLibrary) | (CustomTarget & ~StaticLibrary) | (CustomTargetIndex & ~StaticLibrary) | StaticLibrary`
- mesonbuild/backend/vs2010backend.py:378:27: warning[possibly-missing-attribute] Attribute `get_generated_sources` may be missing on object of type `(Target & ~CustomTargetIndex) | CustomTarget | CompileTarget`
- mesonbuild/backend/vs2010backend.py:1502:72: error[invalid-argument-type] Argument to bound method `object_filename_from_source` is incorrect: Expected `BuildTarget`, found `BuildTarget | CustomTarget | CustomTargetIndex`
+ mesonbuild/backend/vs2010backend.py:1502:72: error[invalid-argument-type] Argument to bound method `object_filename_from_source` is incorrect: Expected `BuildTarget`, found `(BuildTarget & ~CustomTargetIndex) | (CustomTarget & ~CustomTargetIndex) | CustomTargetIndex`
- mesonbuild/backend/vs2010backend.py:1505:69: error[invalid-argument-type] Argument to bound method `flatten_object_list` is incorrect: Expected `BuildTarget`, found `BuildTarget | CustomTarget | CustomTargetIndex`
+ mesonbuild/backend/vs2010backend.py:1505:69: error[invalid-argument-type] Argument to bound method `flatten_object_list` is incorrect: Expected `BuildTarget`, found `(BuildTarget & ~CustomTargetIndex) | (CustomTarget & ~CustomTargetIndex) | CustomTargetIndex`
- mesonbuild/backend/xcodebackend.py:1761:76: error[invalid-argument-type] Argument to bound method `get_custom_target_dir_include_args` is incorrect: Expected `CustomTarget`, found `BuildTarget`
+ mesonbuild/backend/xcodebackend.py:1761:76: error[invalid-argument-type] Argument to bound method `get_custom_target_dir_include_args` is incorrect: Expected `CustomTarget`, found `(BuildTarget & ~SharedLibrary) | (SharedLibrary & ~SharedModule) | SharedModule`
- mesonbuild/build.py:2074:39: error[invalid-argument-type] Argument to bound method `append` is incorrect: Expected `BuildTarget | CustomTarget | CustomTargetIndex`, found `Unknown | ExternalProgram | Executable | CustomTarget | CustomTargetIndex`
+ mesonbuild/build.py:2074:39: error[invalid-argument-type] Argument to bound method `append` is incorrect: Expected `BuildTarget | CustomTarget | CustomTargetIndex`, found `Unknown | (ExternalProgram & ~CustomTarget) | (Executable & ~CustomTarget) | (CustomTargetIndex & ~CustomTarget) | CustomTarget`
- mesonbuild/interpreter/interpreter.py:815:59: error[unresolved-attribute] Object of type `Executable | Program | Compiler | File | str` has no attribute `get_name`
+ mesonbuild/interpreter/interpreter.py:815:59: warning[possibly-missing-attribute] Attribute `get_name` may be missing on object of type `(Program & ~Executable) | ExternalProgram`
- mesonbuild/interpreter/interpreter.py:830:33: warning[possibly-missing-attribute] Attribute `get_path` may be missing on object of type `Executable | Program | Compiler | File | str`
- mesonbuild/interpreter/interpreter.py:835:27: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Program`, found `Executable | Program | Compiler | File | str`
- mesonbuild/interpreter/interpreter.py:2304:22: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `ExternalProgram | Executable | CustomTarget | CustomTargetIndex`, found `Executable | Jar | Program | ... omitted 4 union elements`
+ mesonbuild/interpreter/interpreter.py:2304:22: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `ExternalProgram | Executable | CustomTarget | CustomTargetIndex`, found `Jar | CustomTargetIndex | Executable | ... omitted 4 union elements`
- mesonbuild/interpreter/interpreter.py:3077:46: error[invalid-argument-type] Argument to function `env_convertor_with_method` is incorrect: Expected `EnvironmentVariables | list[str] | list[list[str]] | ... omitted 3 union elements`, found `str | list[str | int | Sequence[Divergent] | ... omitted 5 union elements] | dict[str, str | int | Sequence[Divergent] | ... omitted 5 union elements]`
+ mesonbuild/interpreter/interpreter.py:3077:46: error[invalid-argument-type] Argument to function `env_convertor_with_method` is incorrect: Expected `EnvironmentVariables | list[str] | list[list[str]] | ... omitted 3 union elements`, found `dict[str, str | int | Sequence[Divergent] | ... omitted 5 union elements] | str | list[str | int | Sequence[Divergent] | ... omitted 5 union elements]`
- mesonbuild/interpreter/mesonmain.py:77:22: error[invalid-argument-type] Argument to bound method `append` is incorrect: Expected `str | Executable | Program`, found `str | File | Executable | Program | Unknown`
- mesonbuild/modules/rust.py:601:13: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Sequence[str | File | BuildTarget | ... omitted 5 union elements]`, found `list[Unknown | File | CustomTarget | ... omitted 5 union elements]`
- mesonbuild/options.py:889:16: error[invalid-return-type] Return type does not match returned value: expected `UserBooleanOption | UserComboOption | UserIntegerOption | ... omitted 3 union elements`, found `UserBooleanOption | UserComboOption | UserIntegerOption | ... omitted 4 union elements`
- mesonbuild/rewriter.py:886:67: warning[possibly-missing-attribute] Attribute `subdir` may be missing on object of type `IntrospectionBuildTarget | None`
+ mesonbuild/rewriter.py:886:67: warning[possibly-missing-attribute] Attribute `subdir` may be missing on object of type `None | IntrospectionBuildTarget`
- mesonbuild/rewriter.py:900:53: error[invalid-argument-type] Argument to bound method `add_src_or_extra` is incorrect: Expected `IntrospectionBuildTarget`, found `IntrospectionBuildTarget | None`
+ mesonbuild/rewriter.py:900:53: error[invalid-argument-type] Argument to bound method `add_src_or_extra` is incorrect: Expected `IntrospectionBuildTarget`, found `None | IntrospectionBuildTarget`
- mesonbuild/rewriter.py:903:52: error[invalid-argument-type] Argument to bound method `rm_src_or_extra` is incorrect: Expected `IntrospectionBuildTarget`, found `IntrospectionBuildTarget | None`
+ mesonbuild/rewriter.py:903:52: error[invalid-argument-type] Argument to bound method `rm_src_or_extra` is incorrect: Expected `IntrospectionBuildTarget`, found `None | IntrospectionBuildTarget`
- mesonbuild/rewriter.py:938:61: warning[possibly-missing-attribute] Attribute `node` may be missing on object of type `IntrospectionBuildTarget | None`
+ mesonbuild/rewriter.py:938:61: warning[possibly-missing-attribute] Attribute `node` may be missing on object of type `None | IntrospectionBuildTarget`
- mesonbuild/rewriter.py:951:83: warning[possibly-missing-attribute] Attribute `subdir` may be missing on object of type `IntrospectionBuildTarget | None`
+ mesonbuild/rewriter.py:951:83: warning[possibly-missing-attribute] Attribute `subdir` may be missing on object of type `None | IntrospectionBuildTarget`
- mesonbuild/rewriter.py:951:98: warning[possibly-missing-attribute] Attribute `source_nodes` may be missing on object of type `IntrospectionBuildTarget | None`
+ mesonbuild/rewriter.py:951:98: warning[possibly-missing-attribute] Attribute `source_nodes` may be missing on object of type `None | IntrospectionBuildTarget`
- mesonbuild/rewriter.py:952:91: warning[possibly-missing-attribute] Attribute `subdir` may be missing on object of type `IntrospectionBuildTarget | None`
+ mesonbuild/rewriter.py:952:91: warning[possibly-missing-attribute] Attribute `subdir` may be missing on object of type `None | IntrospectionBuildTarget`
- mesonbuild/rewriter.py:952:107: warning[possibly-missing-attribute] Attribute `extra_files` may be missing on object of type `IntrospectionBuildTarget | None`
+ mesonbuild/rewriter.py:952:107: warning[possibly-missing-attribute] Attribute `extra_files` may be missing on object of type `None | IntrospectionBuildTarget`
- mesonbuild/rewriter.py:952:130: warning[possibly-missing-attribute] Attribute `extra_files` may be missing 

... (truncated 773 lines) ...

@astral-sh-bot
Copy link

astral-sh-bot bot commented Feb 9, 2026

ecosystem-analyzer results

Lint rule Added Removed Changed
possibly-missing-attribute 22 77 129
invalid-argument-type 13 79 68
invalid-return-type 3 27 14
unresolved-attribute 1 13 13
invalid-assignment 1 11 13
not-subscriptable 8 15 0
unsupported-operator 1 11 11
no-matching-overload 7 11 0
unresolved-reference 0 10 0
not-iterable 0 5 3
call-non-callable 0 7 0
unused-type-ignore-comment 5 2 0
type-assertion-failure 0 0 2
invalid-type-form 0 1 0
redundant-cast 0 1 0
Total 61 270 253

Full report with detailed diff (timing results)

@astral-sh-bot
Copy link

astral-sh-bot bot commented Feb 10, 2026

Memory usage report

Summary

Project Old New Diff Outcome
prefect 709.25MB 714.22MB +0.7% (4.98MB)
sphinx 282.10MB 283.41MB +0.5% (1.31MB)
trio 123.73MB 124.14MB +0.3% (0.40MB)
flake8 51.80MB 51.82MB +0.1% (0.03MB)

Significant changes

Click to expand detailed breakdown

flake8

Name Old New Diff Outcome
is_redundant_with_impl::interned_arguments 0.16MB 0.16MB +1.2% (0.00MB)
IntersectionType 0.08MB 0.08MB +1.6% (0.00MB)
UnionType 0.11MB 0.11MB +0.4% (0.00MB)
CallableType 0.21MB 0.21MB +0.2% (0.00MB)
Type < 'db >::member_lookup_with_policy_::interned_arguments 0.21MB 0.22MB +0.0% (0.00MB)
Type < 'db >::try_call_dunder_get_::interned_arguments 0.09MB 0.09MB -0.1% (-0.00MB)
StaticClassLiteral < 'db >::implicit_attribute_inner_::interned_arguments 0.24MB 0.24MB -0.0% (-0.00MB)
semantic_index 16.15MB 16.15MB +0.0% (0.01MB)
infer_expression_types_impl 1.12MB 1.12MB +0.6% (0.01MB)
all_negative_narrowing_constraints_for_expression 0.03MB 0.03MB +11.6% (0.00MB)
all_narrowing_constraints_for_expression 0.04MB 0.04MB +6.1% (0.00MB)
is_redundant_with_impl 0.15MB 0.15MB +0.9% (0.00MB)
infer_scope_types_impl 1.14MB 1.14MB +0.1% (0.00MB)
infer_definition_types 1.94MB 1.94MB +0.0% (0.00MB)
infer_expression_type_impl 0.12MB 0.12MB +0.4% (0.00MB)
... 6 more

prefect

Name Old New Diff Outcome
is_redundant_with_impl::interned_arguments 6.47MB 6.57MB +1.6% (0.11MB)
IntersectionType 2.73MB 2.77MB +1.5% (0.04MB)
UnionType 4.02MB 4.05MB +0.9% (0.03MB)
Type < 'db >::member_lookup_with_policy_::interned_arguments 5.56MB 5.57MB +0.2% (0.01MB)
Type < 'db >::class_member_with_policy_::interned_arguments 9.33MB 9.34MB +0.0% (0.00MB)
Type < 'db >::apply_specialization_::interned_arguments 2.95MB 2.95MB +0.1% (0.00MB)
CallableType 2.41MB 2.41MB +0.1% (0.00MB)
FunctionType 8.75MB 8.75MB +0.0% (0.00MB)
Specialization 2.55MB 2.55MB +0.1% (0.00MB)
Type < 'db >::try_call_dunder_get_::interned_arguments 3.09MB 3.09MB +0.0% (0.00MB)
StaticClassLiteral < 'db >::implicit_attribute_inner_::interned_arguments 5.17MB 5.17MB +0.0% (0.00MB)
GenericAlias 1.20MB 1.20MB +0.1% (0.00MB)
StaticClassLiteral < 'db >::try_mro_::interned_arguments 1.44MB 1.44MB +0.0% (0.00MB)
BoundMethodType 1.40MB 1.40MB +0.0% (0.00MB)
TupleType 0.69MB 0.69MB +0.1% (0.00MB)
... 32 more

sphinx

Name Old New Diff Outcome
is_redundant_with_impl::interned_arguments 2.77MB 2.85MB +2.7% (0.08MB)
IntersectionType 1.08MB 1.11MB +3.0% (0.03MB)
UnionType 1.65MB 1.67MB +1.2% (0.02MB)
Type < 'db >::member_lookup_with_policy_::interned_arguments 2.66MB 2.67MB +0.2% (0.01MB)
Type < 'db >::class_member_with_policy_::interned_arguments 4.23MB 4.23MB +0.0% (0.00MB)
Type < 'db >::apply_specialization_::interned_arguments 1.54MB 1.54MB +0.1% (0.00MB)
CallableType 1.26MB 1.26MB +0.1% (0.00MB)
Type < 'db >::try_call_dunder_get_::interned_arguments 1.30MB 1.30MB +0.1% (0.00MB)
StaticClassLiteral < 'db >::implicit_attribute_inner_::interned_arguments 2.00MB 2.00MB +0.0% (0.00MB)
Specialization 1.09MB 1.09MB +0.1% (0.00MB)
BoundMethodType 0.74MB 0.74MB +0.0% (0.00MB)
ProtocolInterface 0.16MB 0.16MB +0.2% (0.00MB)
FunctionType 3.32MB 3.32MB +0.0% (0.00MB)
TupleType 0.59MB 0.59MB +0.0% (0.00MB)
OverloadLiteral 1.04MB 1.05MB +0.0% (0.00MB)
... 31 more

trio

Name Old New Diff Outcome
is_redundant_with_impl::interned_arguments 0.59MB 0.65MB +10.0% (0.06MB)
IntersectionType 0.26MB 0.27MB +4.1% (0.01MB)
Type < 'db >::member_lookup_with_policy_::interned_arguments 0.88MB 0.89MB +1.0% (0.01MB)
Type < 'db >::class_member_with_policy_::interned_arguments 1.17MB 1.18MB +0.6% (0.01MB)
UnionType 0.35MB 0.35MB +1.2% (0.00MB)
FunctionType 1.62MB 1.62MB +0.1% (0.00MB)
Type < 'db >::apply_specialization_::interned_arguments 0.68MB 0.68MB +0.1% (0.00MB)
CallableType 0.72MB 0.72MB +0.1% (0.00MB)
Specialization 0.49MB 0.49MB +0.1% (0.00MB)
Type < 'db >::try_call_dunder_get_::interned_arguments 0.37MB 0.37MB +0.1% (0.00MB)
ProtocolInterface 0.11MB 0.11MB +0.2% (0.00MB)
BoundMethodType 0.19MB 0.19MB +0.1% (0.00MB)
StringLiteralType 0.54MB 0.54MB +0.0% (0.00MB)
StaticClassLiteral < 'db >::try_mro_::interned_arguments 0.21MB 0.21MB +0.0% (0.00MB)
GenericAlias 0.21MB 0.21MB +0.0% (0.00MB)
... 21 more

@mtshiba
Copy link
Collaborator Author

mtshiba commented Feb 10, 2026

The codspeed results look a bit better. However, the approach in this PR had the potential for the number of states to explode under complex conditions, forcing an upper limit on the number of states.

The approach in #23109 does not require an artificial upper limit and seems more sophisticated.

But cases like if 1 + 1 == 2: ... were abandoned in #23109 due to performance issues, but this PR does address them.

mtshiba and others added 2 commits February 10, 2026 12:38
Co-Authored-By: Alex Gaynor <alex.gaynor@gmail.com>
@mtshiba mtshiba closed this Feb 11, 2026
@mtshiba
Copy link
Collaborator Author

mtshiba commented Feb 11, 2026

Closed in favor of #23109, #23201

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

Labels

ecosystem-analyzer ty Multi-file analysis & type inference

Projects

None yet

Development

Successfully merging this pull request may close these issues.

better narrowing from conditional terminals and NoReturn calls

2 participants

Comments