Skip to content

[ty] Fix false-positive diagnostics for PEP-604 union annotations on attribute targets on Python 3.9 when from __future__ import annotations is active#23915

Merged
AlexWaygood merged 1 commit intomainfrom
alex/attr-annotations
Mar 12, 2026
Merged

Conversation

@AlexWaygood
Copy link
Member

@AlexWaygood AlexWaygood commented Mar 12, 2026

Summary

This PR fixes a regression introduced in 0.0.22 just now. This works fine at runtime, even on Python 3.9 -- because of __future__.annotations, the annotation is never evaluated:

from __future__ import annotations

class Foo:
    def __init__(self):
        self.x: int | str

but a latent bug in infer/builder.rs (that must have been there for quite some time) meant that we weren't setting deferred_state to DeferredExpressionState::Deferred for annotations on attribute expressions even when __future__.annotations was imported -- we were only doing so for annotations on name expressions.

This PR fixes the regression.

Test Plan

New mdtests

@AlexWaygood AlexWaygood added ty Multi-file analysis & type inference bug Something isn't working labels Mar 12, 2026
@astral-sh-bot
Copy link

astral-sh-bot bot commented Mar 12, 2026

Typing conformance results

No changes detected ✅

Current numbers
The percentage of diagnostics emitted that were expected errors held steady at 85.29%. The percentage of expected errors that received a diagnostic held steady at 78.13%. The number of fully passing files held steady at 64/132.

…attribute targets on Python 3.9 when `from __future__ import annotations` is active
@AlexWaygood AlexWaygood force-pushed the alex/attr-annotations branch from b4d7f5d to 2cbdd3a Compare March 12, 2026 18:30
@astral-sh-bot
Copy link

astral-sh-bot bot commented Mar 12, 2026

mypy_primer results

Changes were detected when running on open source projects
pyp (https://github.com/hauntsaninja/pyp)
- pyp.py:343:30: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'Call'>` and `None`
- Found 7 diagnostics
+ Found 6 diagnostics

packaging (https://github.com/pypa/packaging)
- src/packaging/_tokenizer.py:106:26: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'Token'>` and `None`
- src/packaging/requirements.py:50:19: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'str'>` and `None`
- src/packaging/requirements.py:53:22: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'Marker'>` and `None`
- src/packaging/specifiers.py:309:29: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'tuple[str, Version]'>` and `None`
- src/packaging/specifiers.py:312:31: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'tuple[list[str], int]'>` and `None`
- src/packaging/specifiers.py:935:29: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'list[tuple[(Version, str, /) -> bool, str, str]]'>` and `None`
- Found 25 diagnostics
+ Found 19 diagnostics

pip (https://github.com/pypa/pip)
- src/pip/_internal/cache.py:193:22: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'DirectUrl'>` and `None`
- src/pip/_internal/cli/base_command.py:65:32: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'TempDirectoryTypeRegistry'>` and `None`
- src/pip/_internal/cli/index_command.py:63:24: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'PipSession'>` and `None`
- src/pip/_internal/index/collector.py:278:24: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'str'>` and `None`
- src/pip/_internal/index/collector.py:279:38: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'str'>` and `None`
- src/pip/_internal/index/package_finder.py:669:24: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'BaseSpecifier'>` and `None`
- src/pip/_internal/index/package_finder.py:669:57: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'Hashes'>` and `None`
- src/pip/_internal/metadata/pkg_resources.py:85:31: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'Mapping[Any, str]'>` and `None`
- src/pip/_internal/models/target_python.py:66:27: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'list[Tag]'>` and `None`
- src/pip/_internal/models/target_python.py:67:31: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'set[Tag]'>` and `None`
- src/pip/_internal/network/auth.py:243:36: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'Credentials'>` and `None`
- src/pip/_internal/network/session.py:348:51: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'int'>` and `None`
- src/pip/_internal/network/session.py:389:37: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'InsecureCacheControlAdapter'>` and `<class 'InsecureHTTPAdapter'>`
- src/pip/_internal/req/req_install.py:97:26: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'str'>` and `None`
- src/pip/_internal/req/req_install.py:113:40: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'Link'>` and `None`
- src/pip/_internal/req/req_install.py:117:29: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'DirectUrl'>` and `None`
- src/pip/_internal/req/req_install.py:120:31: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'str'>` and `None`
- src/pip/_internal/req/req_install.py:135:28: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'BaseDistribution'>` and `None`
- src/pip/_internal/req/req_install.py:140:31: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'TempDirectory'>` and `None`
- src/pip/_internal/req/req_install.py:142:33: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'bool'>` and `None`
- src/pip/_internal/req/req_install.py:160:34: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'str'>` and `None`
- src/pip/_internal/req/req_install.py:164:29: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'BaseDistribution'>` and `None`
- src/pip/_internal/req/req_install.py:167:34: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'list[str]'>` and `None`
- src/pip/_internal/req/req_install.py:173:30: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'BuildBackendHookCaller'>` and `None`
- src/pip/_internal/req/req_install.py:179:31: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'Path'>` and `None`
- src/pip/_internal/req/req_uninstall.py:588:28: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'list[bytes]'>` and `None`
- src/pip/_internal/resolution/resolvelib/candidates.py:162:21: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'int'>` and `None`
- src/pip/_internal/resolution/resolvelib/found_candidates.py:133:21: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'bool'>` and `None`
- src/pip/_internal/resolution/resolvelib/requirements.py:56:28: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'str'>` and `None`
- src/pip/_internal/resolution/resolvelib/requirements.py:57:21: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'int'>` and `None`
- src/pip/_internal/resolution/resolvelib/requirements.py:133:28: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'str'>` and `None`
- src/pip/_internal/resolution/resolvelib/requirements.py:134:21: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'int'>` and `None`
- src/pip/_internal/resolution/resolvelib/requirements.py:164:21: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'int'>` and `None`
- src/pip/_internal/resolution/resolvelib/resolver.py:74:23: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'Result[Requirement, Candidate, str]'>` and `None`
- src/pip/_internal/vcs/subversion.py:196:28: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'tuple[int, ...]'>` and `None`
- src/pip/_vendor/dependency_groups/_implementation.py:81:24: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'Requirement'>` and `<class 'DependencyGroupInclude'>`
- src/pip/_vendor/packaging/_tokenizer.py:106:26: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'Token'>` and `None`
- src/pip/_vendor/packaging/requirements.py:41:19: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'str'>` and `None`
- src/pip/_vendor/packaging/requirements.py:44:22: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'Marker'>` and `None`
- src/pip/_vendor/packaging/specifiers.py:269:29: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'tuple[str, Version]'>` and `None`
- src/pip/_vendor/pkg_resources/__init__.py:3374:30: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'str'>` and `None`
- src/pip/_vendor/resolvelib/resolvers/resolution.py:86:28: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'list[State[RT@Resolution, CT@Resolution, KT@Resolution]]'>` and `None`
- src/pip/_vendor/resolvelib/resolvers/resolution.py:87:39: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'int'>` and `None`
- src/pip/_vendor/resolvelib/structs.py:162:25: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'Iterable[RT@_FactoryIterableView]'>` and `None`
- Found 700 diagnostics
+ Found 656 diagnostics

pyjwt (https://github.com/jpadilla/pyjwt)
- jwt/jwks_client.py:73:29: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'JWKSetCache'>` and `None`
- Found 36 diagnostics
+ Found 35 diagnostics

dedupe (https://github.com/dedupeio/dedupe)
- dedupe/api.py:83:30: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'Fingerprinter'>` and `None`
- dedupe/api.py:677:13: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'MutableMapping[int, Mapping[str, Any]]'>` and `<class 'MutableMapping[str, Mapping[str, Any]]'>`
- dedupe/predicates.py:168:32: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'int'>` and `None`
- Found 56 diagnostics
+ Found 53 diagnostics

PyWinCtl (https://github.com/Kalmat/PyWinCtl)
- src/pywinctl/_main.py:453:25: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class '_WatchDogWorker'>` and `None`
- Found 22 diagnostics
+ Found 21 diagnostics

nox (https://github.com/wntrblm/nox)
- nox/manifest.py:74:32: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'str'>` and `None`
- nox/sessions.py:995:20: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'ProcessEnv'>` and `None`
- nox/sessions.py:997:22: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'Result'>` and `None`
- nox/virtualenv.py:590:25: error[unsupported-operator] Operator `|` is unsupported between objects of type `None` and `<class 'str'>`
- Found 27 diagnostics
+ Found 23 diagnostics

pydantic (https://github.com/pydantic/pydantic)
- pydantic/_internal/_core_metadata.py:87:54: error[invalid-assignment] Invalid assignment to key "pydantic_js_extra" with declared type `dict[str, Divergent] | ((dict[str, Divergent], /) -> None) | ((dict[str, Divergent], type[Any], /) -> None)` on TypedDict `CoreMetadata`: value of type `dict[object, object]`
+ pydantic/_internal/_core_metadata.py:87:54: error[invalid-assignment] Invalid assignment to key "pydantic_js_extra" with declared type `dict[str, int | float | str | ... omitted 3 union elements] | ((dict[str, int | float | str | ... omitted 3 union elements], /) -> None) | ((dict[str, int | float | str | ... omitted 3 union elements], type[Any], /) -> None)` on TypedDict `CoreMetadata`: value of type `dict[object, object]`
- pydantic/_internal/_discriminated_union.py:109:36: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'str'>` and `None`
- pydantic/_internal/_docs_extraction.py:16:22: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'str'>` and `None`
- pydantic/_internal/_docs_extraction.py:18:34: error[unsupported-operator] Operator `|` is unsupported between objects of type `<special-form 'type[AST]'>` and `None`
- pydantic/_internal/_namespace_utils.py:230:33: error[unsupported-operator] Operator `|` is unsupported between objects of type `<special-form 'type[Any]'>` and `<class 'TypeAliasType'>`
- pydantic/fields.py:949:5: error[invalid-parameter-default] Default value of type `PydanticUndefinedType` is not assignable to annotated parameter type `dict[str, Divergent] | ((dict[str, Divergent], /) -> None) | None`
+ pydantic/fields.py:949:5: error[invalid-parameter-default] Default value of type `PydanticUndefinedType` is not assignable to annotated parameter type `dict[str, int | float | str | ... omitted 3 union elements] | ((dict[str, int | float | str | ... omitted 3 union elements], /) -> None) | None`
- pydantic/fields.py:989:5: error[invalid-parameter-default] Default value of type `PydanticUndefinedType` is not assignable to annotated parameter type `dict[str, Divergent] | ((dict[str, Divergent], /) -> None) | None`
+ pydantic/fields.py:989:5: error[invalid-parameter-default] Default value of type `PydanticUndefinedType` is not assignable to annotated parameter type `dict[str, int | float | str | ... omitted 3 union elements] | ((dict[str, int | float | str | ... omitted 3 union elements], /) -> None) | None`
- pydantic/fields.py:1032:5: error[invalid-parameter-default] Default value of type `PydanticUndefinedType` is not assignable to annotated parameter type `dict[str, Divergent] | ((dict[str, Divergent], /) -> None) | None`
+ pydantic/fields.py:1032:5: error[invalid-parameter-default] Default value of type `PydanticUndefinedType` is not assignable to annotated parameter type `dict[str, int | float | str | ... omitted 3 union elements] | ((dict[str, int | float | str | ... omitted 3 union elements], /) -> None) | None`
- pydantic/fields.py:1072:5: error[invalid-parameter-default] Default value of type `PydanticUndefinedType` is not assignable to annotated parameter type `dict[str, Divergent] | ((dict[str, Divergent], /) -> None) | None`
+ pydantic/fields.py:1072:5: error[invalid-parameter-default] Default value of type `PydanticUndefinedType` is not assignable to annotated parameter type `dict[str, int | float | str | ... omitted 3 union elements] | ((dict[str, int | float | str | ... omitted 3 union elements], /) -> None) | None`
- pydantic/fields.py:1115:5: error[invalid-parameter-default] Default value of type `PydanticUndefinedType` is not assignable to annotated parameter type `dict[str, Divergent] | ((dict[str, Divergent], /) -> None) | None`
+ pydantic/fields.py:1115:5: error[invalid-parameter-default] Default value of type `PydanticUndefinedType` is not assignable to annotated parameter type `dict[str, int | float | str | ... omitted 3 union elements] | ((dict[str, int | float | str | ... omitted 3 union elements], /) -> None) | None`
- pydantic/fields.py:1154:5: error[invalid-parameter-default] Default value of type `PydanticUndefinedType` is not assignable to annotated parameter type `dict[str, Divergent] | ((dict[str, Divergent], /) -> None) | None`
+ pydantic/fields.py:1154:5: error[invalid-parameter-default] Default value of type `PydanticUndefinedType` is not assignable to annotated parameter type `dict[str, int | float | str | ... omitted 3 union elements] | ((dict[str, int | float | str | ... omitted 3 union elements], /) -> None) | None`
- pydantic/fields.py:1194:5: error[invalid-parameter-default] Default value of type `PydanticUndefinedType` is not assignable to annotated parameter type `dict[str, Divergent] | ((dict[str, Divergent], /) -> None) | None`
+ pydantic/fields.py:1194:5: error[invalid-parameter-default] Default value of type `PydanticUndefinedType` is not assignable to annotated parameter type `dict[str, int | float | str | ... omitted 3 union elements] | ((dict[str, int | float | str | ... omitted 3 union elements], /) -> None) | None`
- pydantic/fields.py:1573:13: error[invalid-argument-type] Argument is incorrect: Expected `dict[str, Divergent] | ((dict[str, Divergent], /) -> None) | None`, found `dict[str, Divergent] | dict[Never, Never] | (((dict[str, Divergent], /) -> None) & ~Top[dict[Unknown, Unknown]]) | None`
+ pydantic/fields.py:1573:13: error[invalid-argument-type] Argument is incorrect: Expected `dict[str, int | float | str | ... omitted 3 union elements] | ((dict[str, int | float | str | ... omitted 3 union elements], /) -> None) | None`, found `dict[str, int | float | str | ... omitted 3 union elements] | dict[Never, Never] | (((dict[str, int | float | str | ... omitted 3 union elements], /) -> None) & ~Top[dict[Unknown, Unknown]]) | None`
- Found 3194 diagnostics
+ Found 3190 diagnostics

PyGithub (https://github.com/PyGithub/PyGithub)
- github/AccessToken.py:57:37: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'int'>` and `None`
- github/AccessToken.py:58:45: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'int'>` and `None`
- github/AdvisoryVulnerabilityPackage.py:69:31: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'str'>` and `None`
- github/Auth.py:527:22: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'str'>` and `None`
- github/Auth.py:528:25: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'str'>` and `None`
- github/Authorization.py:66:31: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'str'>` and `None`
- github/Authorization.py:67:35: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'str'>` and `None`
- github/CheckRun.py:93:39: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'datetime'>` and `None`
- github/CodeScanAlert.py:70:48: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'NamedUser'>` and `<class 'Organization'>`
- github/CodeScanAlert.py:71:39: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'datetime'>` and `None`
- github/CodeScanAlert.py:72:39: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'NamedUser'>` and `None`
- github/CodeScanAlert.py:73:44: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'str'>` and `None`
- github/CodeScanAlert.py:74:43: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'str'>` and `None`
- github/CodeScanAlert.py:75:35: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'datetime'>` and `None`
- github/CommitComment.py:90:31: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'NamedUser'>` and `<class 'Organization'>`
- github/CommitStatus.py:71:34: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'NamedUser'>` and `<class 'Organization'>`
- github/CopilotSeat.py:52:25: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'Attribute[NamedUser]'>` and `<class '_NotSetType'>`
- github/CopilotSeat.py:53:31: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'Attribute[Team]'>` and `<class '_NotSetType'>`
- github/CopilotSeat.py:54:27: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'Attribute[datetime]'>` and `<class '_NotSetType'>`
- github/CopilotSeat.py:55:33: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'Attribute[datetime]'>` and `<class '_NotSetType'>`
- github/CopilotSeat.py:56:37: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'Attribute[str]'>` and `<class '_NotSetType'>`
- github/CopilotSeat.py:59:42: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'Attribute[datetime]'>` and `<class '_NotSetType'>`
- github/CopilotSeat.py:60:26: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'Attribute[str]'>` and `<class '_NotSetType'>`
- github/CopilotSeat.py:61:27: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'Attribute[datetime]'>` and `<class '_NotSetType'>`
- github/DependabotAlert.py:64:39: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'datetime'>` and `None`
- github/DependabotAlert.py:65:39: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'NamedUser'>` and `<class 'Organization'>`
- github/DependabotAlert.py:66:44: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'str'>` and `None`
- github/DependabotAlert.py:67:43: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'str'>` and `None`
- github/DependabotAlertVulnerability.py:50:51: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'str'>` and `None`
- github/Deployment.py:81:34: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'NamedUser'>` and `<class 'Organization'>`
- github/Deployment.py:96:37: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'datetime'>` and `None`
- github/DiscussionBase.py:59:33: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'NamedUser'>` and `None`
- github/DiscussionCommentBase.py:59:33: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'NamedUser'>` and `None`
- github/EnvironmentProtectionRuleReviewer.py:65:35: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'NamedUser'>` and `<class 'Team'>`
- github/GitReleaseAsset.py:73:33: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'str'>` and `None`
- github/GithubApp.py:88:32: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'NamedUser'>` and `<class 'Organization'>`
- github/Installation.py:106:34: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'NamedUser'>` and `<class 'Organization'>`
- github/Invitation.py:77:34: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'NamedUser'>` and `<class 'Organization'>`
- github/Invitation.py:78:34: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'NamedUser'>` and `<class 'Organization'>`
- github/Issue.py:132:45: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'str'>` and `None`
- github/Issue.py:133:35: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'NamedUser'>` and `None`
- github/Issue.py:162:39: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'str'>` and `None`
- github/IssueComment.py:95:31: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'NamedUser'>` and `<class 'Organization'>`
- github/IssueEvent.py:83:32: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'NamedUser'>` and `<class 'Organization'>`
- github/IssueEvent.py:84:35: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'NamedUser'>` and `<class 'Organization'>`
- github/IssueEvent.py:85:35: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'NamedUser'>` and `<class 'Organization'>`
- github/IssueEvent.py:101:45: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'NamedUser'>` and `<class 'Organization'>`
- github/IssueEvent.py:103:43: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'NamedUser'>` and `<class 'Organization'>`
- github/Migration.py:94:32: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'NamedUser'>` and `<class 'Organization'>`
- github/NamedUser.py:107:30: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'str'>` and `None`
- github/NamedUser.py:108:31: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'str'>` and `None`
- github/NamedUser.py:111:34: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'str'>` and `None`
- github/NamedUser.py:116:32: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'str'>` and `None`
- github/NamedUser.py:123:38: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'str'>` and `None`
- github/NamedUser.py:124:35: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'bool'>` and `None`
- github/NamedUser.py:130:35: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'str'>` and `None`
- github/NamedUser.py:150:39: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'datetime'>` and `None`
- github/NamedUser.py:154:43: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'str'>` and `None`
- github/Organization.py:189:31: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'str'>` and `None`
- github/OrganizationCustomProperty.py:90:40: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'str'>` and `<class 'list[str]'>`
- github/PaginatedList.py:206:28: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'int'>` and `None`
- github/Project.py:83:34: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'NamedUser'>` and `<class 'Organization'>`
- github/PublicKey.py:82:33: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'str'>` and `<class 'int'>`
- github/PullRequest.py:168:36: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'datetime'>` and `None`
- github/PullRequest.py:188:36: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'datetime'>` and `None`
- github/PullRequest.py:203:37: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'datetime'>` and `None`
+ github/Repository.py:381:84: warning[unused-type-ignore-comment] Unused blanket `type: ignore` directive
- github/RepositoryDiscussion.py:65:33: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'RepositoryDiscussionComment'>` and `None`
- github/RepositoryPreferences.py:66:63: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'bool'>` and `<class 'int'>`
- github/Requester.py:431:28: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'HTTPRequestsConnectionClass'>` and `<class 'HTTPSRequestsConnectionClass'>`
- github/Requester.py:433:42: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'HTTPRequestsConnectionClass'>` and `<class 'HTTPSRequestsConnectionClass'>`
+ github/Requester.py:1411:52: warning[unused-type-ignore-comment] Unused blanket `type: ignore` directive
- github/SecretScanAlert.py:60:65: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'str'>` and `None`
- github/SecretScanAlert.py:61:66: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'str'>` and `None`
- github/SecretScanAlert.py:62:66: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'NamedUser'>` and `None`
- github/SecretScanAlert.py:63:74: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'str'>` and `None`
- github/SecretScanAlert.py:65:54: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'datetime'>` and `None`
- github/SecretScanAlert.py:66:54: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'NamedUser'>` and `None`
- github/SecretScanAlert.py:67:37: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'str'>` and `None`
- github/SecretScanAlert.py:68:45: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'str'>` and `None`
- github/SecretScanAlert.py:69:38: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'datetime'>` and `None`
- github/SecretScanAlert.py:70:38: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'NamedUser'>` and `None`
- github/SelfHostedActionsRunner.py:64:48: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'int'>` and `<class 'str'>`
- github/StatsContributor.py:109:33: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'NamedUser'>` and `<class 'Organization'>`
- github/WorkflowJob.py:53:37: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'str'>` and `None`
- tests/Framework.py:383:40: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'float'>` and `None`
- tests/Framework.py:384:38: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'float'>` and `None`
- tests/Framework.py:388:32: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'str'>` and `None`
- Found 410 diagnostics
+ Found 326 diagnostics

optuna (https://github.com/optuna/optuna)
- optuna/_imports.py:27:25: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'tuple[Exception, str]'>` and `None`
- optuna/importance/_fanova/_fanova.py:49:22: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'list[_FanovaTree]'>` and `None`
- optuna/importance/_fanova/_fanova.py:50:26: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'dict[int, ndarray[Unknown, dtype[Any]]]'>` and `None`
- optuna/importance/_fanova/_fanova.py:51:42: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'list[ndarray[Unknown, dtype[Any]]]'>` and `None`
- optuna/pruners/_hyperband.py:162:27: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'int'>` and `None`
- optuna/pruners/_successive_halving.py:162:29: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'int'>` and `None`
- optuna/samplers/_gp/sampler.py:197:32: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'list[GPRegressor]'>` and `None`
- optuna/samplers/_gp/sampler.py:198:44: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'list[GPRegressor]'>` and `None`
- optuna/samplers/_lazy_random_state.py:15:20: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'RandomState'>` and `None`
- optuna/samplers/_qmc.py:164:37: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'dict[str, BaseDistribution]'>` and `None`
- optuna/samplers/_tpe/sampler.py:353:46: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class '_GroupDecomposedSearchSpace'>` and `None`
- optuna/samplers/_tpe/sampler.py:354:35: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class '_SearchSpaceGroup'>` and `None`
- optuna/search_space/group_decomposed.py:43:25: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'int'>` and `None`
- optuna/search_space/intersection.py:79:29: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'dict[str, BaseDistribution]'>` and `None`
- optuna/search_space/intersection.py:80:25: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'int'>` and `None`
- optuna/storages/_cached_storage.py:32:26: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'list[StudyDirection]'>` and `None`
- optuna/storages/_cached_storage.py:33:20: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'str'>` and `None`
- optuna/storages/_heartbeat.py:109:23: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'Thread'>` and `None`
- optuna/storages/_heartbeat.py:110:27: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'Event'>` and `None`
- optuna/storages/_in_memory.py:424:29: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'int'>` and `None`
- optuna/terminator/median_erroreval.py:62:26: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'float'>` and `None`
- optuna/testing/storages.py:85:24: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'IO[Any]'>` and `None`
- optuna/testing/storages.py:87:22: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'Thread'>` and `None`
- optuna/testing/storages.py:88:21: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'GrpcStorageProxy'>` and `None`
- optuna/testing/storages.py:89:23: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'BaseStorage'>` and `None`
- optuna/testing/storages.py:90:31: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'BaseStorage'>` and `None`
- optuna/testing/tempfile_pool.py:25:21: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'IO[bytes]'>` and `<class 'IO[str]'>`
- optuna/testing/threading.py:11:19: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'BaseException'>` and `None`
- optuna/trial/_frozen.py:158:23: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'list[int | float]'>` and `None`
- optuna/trial/_trial.py:62:37: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'dict[str, BaseDistribution]'>` and `None`
- optuna/trial/_trial.py:63:32: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'dict[str, Any]'>` and `None`
- tests/storages_tests/journal_tests/test_journal.py:46:24: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'IO[Any]'>` and `None`
- Found 639 diagnostics
+ Found 607 diagnostics

mkdocs (https://github.com/mkdocs/mkdocs)
- mkdocs/config/config_options.py:698:26: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'str'>` and `None`
- mkdocs/config/config_options.py:1053:23: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'Config'>` and `None`
- mkdocs/contrib/search/search_index.py:176:23: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'ContentSection'>` and `None`
- mkdocs/livereload/__init__.py:120:45: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'bytes'>` and `None`
- mkdocs/structure/pages.py:57:34: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'str'>` and `None`
- Found 225 diagnostics
+ Found 220 diagnostics

mongo-python-driver (https://github.com/mongodb/mongo-python-driver)
- pymongo/asynchronous/mongo_client.py:773:24: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'float'>` and `None`
- pymongo/asynchronous/mongo_client.py:775:32: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class '_EventListeners'>` and `None`
- pymongo/asynchronous/topology.py:114:23: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'Queue[Any]'>` and `None`
- pymongo/synchronous/mongo_client.py:773:24: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'float'>` and `None`
- pymongo/synchronous/mongo_client.py:775:32: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class '_EventListeners'>` and `None`
- pymongo/synchronous/topology.py:114:23: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'Queue[Any]'>` and `None`
- Found 435 diagnostics
+ Found 429 diagnostics

setuptools (https://github.com/pypa/setuptools)
- setuptools/_distutils/command/install.py:251:22: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'str'>` and `None`
- setuptools/_distutils/command/install.py:252:27: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'str'>` and `None`
- setuptools/_distutils/command/install.py:253:20: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'str'>` and `None`
- setuptools/_distutils/command/install.py:261:20: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'str'>` and `None`
- setuptools/_distutils/command/install.py:270:27: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'str'>` and `None`
- setuptools/_distutils/compilers/C/base.py:139:26: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'str'>` and `None`
- setuptools/_distutils/dist.py:192:32: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'str'>` and `<class 'list[str]'>`
- setuptools/_distutils/dist.py:197:27: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'str'>` and `<class 'PathLike[str]'>`
- setuptools/_distutils/dist.py:198:27: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'list[str]'>` and `None`
- setuptools/_distutils/dist.py:1142:24: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'str'>` and `None`
- setuptools/_distutils/dist.py:1143:27: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'str'>` and `None`
- setuptools/_distutils/dist.py:1144:26: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'str'>` and `None`
- setuptools/_distutils/dist.py:1145:32: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'str'>` and `None`
- setuptools/_distutils/dist.py:1146:30: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'str'>` and `None`
- setuptools/_distutils/dist.py:1147:36: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'str'>` and `None`
- setuptools/_distutils/dist.py:1148:23: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'str'>` and `None`
- setuptools/_distutils/dist.py:1149:27: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'str'>` and `None`
- setuptools/_distutils/dist.py:1150:31: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'str'>` and `None`
- setuptools/_distutils/dist.py:1151:36: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'str'>` and `None`
- setuptools/_distutils/dist.py:1152:28: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'str'>` and `<class 'list[str]'>`
- setuptools/_distutils/dist.py:1153:29: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'str'>` and `<class 'list[str]'>`
- setuptools/_distutils/dist.py:1154:31: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'str'>` and `<class 'list[str]'>`
- setuptools/_distutils/dist.py:1155:32: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'str'>` and `None`
- setuptools/_distutils/dist.py:1157:28: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'str'>` and `<class 'list[str]'>`
- setuptools/_distutils/dist.py:1158:28: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'str'>` and `<class 'list[str]'>`
- setuptools/_distutils/dist.py:1159:29: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'str'>` and `<class 'list[str]'>`
- setuptools/_distutils/filelist.py:39:24: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'Iterable[str]'>` and `None`
- setuptools/_vendor/packaging/_tokenizer.py:106:26: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'Token'>` and `None`
- setuptools/_vendor/packaging/requirements.py:41:19: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'str'>` and `None`
- setuptools/_vendor/packaging/requirements.py:44:22: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'Marker'>` and `None`
- setuptools/_vendor/packaging/specifiers.py:269:29: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'tuple[str, Version]'>` and `None`
- setuptools/_vendor/wheel/_bdist_wheel.py:251:25: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'str'>` and `None`
- setuptools/_vendor/wheel/_bdist_wheel.py:255:24: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'str'>` and `None`
- setuptools/_vendor/wheel/_bdist_wheel.py:257:28: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'bool'>` and `None`
- setuptools/_vendor/wheel/_bdist_wheel.py:263:27: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'str'>` and `<class 'int'>`
- setuptools/_vendor/wheel/_bdist_wheel.py:265:28: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'str'>` and `None`
- setuptools/_vendor/wheel/_bdist_wheel.py:266:30: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'str'>` and `<special-form 'Literal[False]'>`
- setuptools/_vendor/wheel/wheelfile.py:82:38: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'tuple[None, None]'>` and `<class 'tuple[int, bytes]'>`
- setuptools/command/bdist_wheel.py:209:25: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'str'>` and `None`
- setuptools/command/bdist_wheel.py:211:25: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'str'>` and `None`
- setuptools/command/bdist_wheel.py:212:24: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'str'>` and `None`
- setuptools/command/bdist_wheel.py:215:24: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'str'>` and `None`
- setuptools/command/bdist_wheel.py:217:27: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'str'>` and `None`
- setuptools/command/bdist_wheel.py:218:28: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'bool'>` and `None`
- setuptools/command/bdist_wheel.py:224:27: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'str'>` and `<class 'int'>`
- setuptools/command/bdist_wheel.py:226:28: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'str'>` and `None`
- setuptools/command/bdist_wheel.py:227:30: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'str'>` and `<special-form 'Literal[False]'>`
- setuptools/config/expand.py:438:22: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'Mapping[_K@LazyMappingProxy, _V_co@LazyMappingProxy]'>` and `None`
- setuptools/dist.py:309:36: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'bool'>` and `None`
- setuptools/dist.py:310:36: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'dict[str, list[str]]'>` and `None`
- setuptools/dist.py:312:24: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'str'>` and `None`
- setuptools/tests/integration/helpers.py:44:24: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'TarFile'>` and `<class 'ZipFile'>`
- Found 1177 diagnostics
+ Found 1125 diagnostics

altair (https://github.com/vega/altair)
- altair/datasets/_data.py:258:30: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'list[LiteralString]'>` and `None`
- altair/datasets/_data.py:258:35: error[unsupported-operator] Operator `|` is unsupported between objects of type `<special-form 'Literal["airports", "annual_precip", "anscombe", "barley", "birdstrikes", ... omitted 68 literals]'>` and `<special-form 'typing.LiteralString'>`
- altair/utils/execeval.py:21:22: error[unsupported-operator] Operator `|` is unsupported between objects of type `<special-form 'typing.Any'>` and `None`
- Found 1072 diagnostics
+ Found 1069 diagnostics

dd-trace-py (https://github.com/DataDog/dd-trace-py)
- ddtrace/profiling/collector/pytorch.py:40:22: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'Tracer'>` and `None`
- Found 9361 diagnostics
+ Found 9360 diagnostics

scikit-build-core (https://github.com/scikit-build/scikit-build-core)
+ src/scikit_build_core/build/wheel.py:99:20: error[no-matching-overload] No overload of bound method `__init__` matches arguments
- src/scikit_build_core/hatch/plugin.py:41:25: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'Path'>` and `None`
- src/scikit_build_core/resources/_editable_redirect.py:30:28: error[unsupported-operator] Operator `|` is unsupported between objects of type `<class 'int'>` and `None`
- Found 59 diagnostics
+ Found 58 diagnostics

@astral-sh-bot
Copy link

astral-sh-bot bot commented Mar 12, 2026

Memory usage report

Summary

Project Old New Diff Outcome
flake8 47.91MB 47.89MB -0.03% (16.17kB) ⬇️
trio 117.80MB 117.77MB -0.03% (33.64kB) ⬇️
prefect 705.00MB 704.94MB -0.01% (65.10kB) ⬇️
sphinx 265.22MB 265.13MB -0.04% (95.75kB) ⬇️

Significant changes

Click to expand detailed breakdown

flake8

Name Old New Diff Outcome
check_file_impl 344.70kB 336.29kB -2.44% (8.41kB) ⬇️
Type<'db>::class_member_with_policy_ 547.17kB 545.16kB -0.37% (2.01kB) ⬇️
infer_scope_types_impl 1004.28kB 1002.57kB -0.17% (1.70kB) ⬇️
Type<'db>::member_lookup_with_policy_::interned_arguments 208.00kB 207.09kB -0.44% (936.00B) ⬇️
Type<'db>::member_lookup_with_policy_ 409.16kB 408.31kB -0.21% (864.00B) ⬇️
Type<'db>::class_member_with_policy_::interned_arguments 300.32kB 299.61kB -0.24% (728.00B) ⬇️
infer_expression_types_impl 1.07MB 1.07MB -0.04% (496.00B) ⬇️
StaticClassLiteral<'db>::implicit_attribute_inner_ 293.97kB 293.53kB -0.15% (448.00B) ⬇️
StaticClassLiteral<'db>::implicit_attribute_inner_::interned_arguments 238.78kB 238.41kB -0.16% (384.00B) ⬇️
place_by_id 143.13kB 143.01kB -0.08% (124.00B) ⬇️
infer_expression_type_impl 157.22kB 157.13kB -0.06% (92.00B) ⬇️
place_by_id::interned_arguments 106.45kB 106.38kB -0.07% (72.00B) ⬇️

trio

Name Old New Diff Outcome
check_file_impl 1.94MB 1.93MB -1.00% (19.88kB) ⬇️
Type<'db>::class_member_with_policy_ 1.98MB 1.98MB -0.18% (3.70kB) ⬇️
infer_scope_types_impl 4.79MB 4.79MB -0.07% (3.59kB) ⬇️
Type<'db>::member_lookup_with_policy_ 1.67MB 1.67MB -0.10% (1.69kB) ⬇️
Type<'db>::member_lookup_with_policy_::interned_arguments 871.41kB 870.09kB -0.15% (1.32kB) ⬇️
Type<'db>::class_member_with_policy_::interned_arguments 1.10MB 1.10MB -0.11% (1.22kB) ⬇️
StaticClassLiteral<'db>::implicit_attribute_inner_ 731.63kB 730.54kB -0.15% (1.09kB) ⬇️
StaticClassLiteral<'db>::implicit_attribute_inner_::interned_arguments 582.75kB 581.81kB -0.16% (960.00B) ⬇️
Type<'db>::apply_specialization_::interned_arguments 645.55kB 645.47kB -0.01% (80.00B) ⬇️
InternedType 1.27kB 1.20kB -5.56% (72.00B) ⬇️
Type<'db>::apply_specialization_ 737.79kB 737.73kB -0.01% (56.00B) ⬇️

prefect

Name Old New Diff Outcome
check_file_impl 17.90MB 17.85MB -0.28% (50.78kB) ⬇️
infer_scope_types_impl 52.93MB 52.93MB -0.01% (7.13kB) ⬇️
Type<'db>::class_member_with_policy_ 17.32MB 17.31MB -0.02% (2.93kB) ⬇️
Type<'db>::member_lookup_with_policy_::interned_arguments 5.53MB 5.53MB -0.02% (1.32kB) ⬇️
Type<'db>::member_lookup_with_policy_ 15.40MB 15.40MB -0.01% (1.25kB) ⬇️
Type<'db>::class_member_with_policy_::interned_arguments 9.36MB 9.36MB -0.01% (1.02kB) ⬇️
GenericContext 292.71kB 292.58kB -0.05% (140.00B) ⬇️
place_by_id 4.53MB 4.53MB -0.00% (124.00B) ⬇️
StaticClassLiteral<'db>::implicit_attribute_inner_ 9.74MB 9.74MB -0.00% (112.00B) ⬇️
StaticClassLiteral<'db>::implicit_attribute_inner_::interned_arguments 5.15MB 5.15MB -0.00% (96.00B) ⬇️
InternedType 4.22kB 4.15kB -1.67% (72.00B) ⬇️
BoundTypeVarInstance 1.35MB 1.35MB -0.01% (72.00B) ⬇️
place_by_id::interned_arguments 3.33MB 3.33MB -0.00% (72.00B) ⬇️

sphinx

Name Old New Diff Outcome
check_file_impl 5.13MB 5.06MB -1.34% (70.26kB) ⬇️
infer_scope_types_impl 15.59MB 15.58MB -0.07% (11.01kB) ⬇️
Type<'db>::class_member_with_policy_ 7.55MB 7.55MB -0.08% (6.00kB) ⬇️
Type<'db>::member_lookup_with_policy_ 6.10MB 6.10MB -0.04% (2.19kB) ⬇️
Type<'db>::member_lookup_with_policy_::interned_arguments 2.54MB 2.54MB -0.08% (2.03kB) ⬇️
Type<'db>::class_member_with_policy_::interned_arguments 3.99MB 3.99MB -0.05% (2.03kB) ⬇️
infer_expression_types_impl 21.51MB 21.51MB -0.00% (496.00B) ⬇️
StaticClassLiteral<'db>::implicit_attribute_inner_ 2.37MB 2.37MB -0.01% (336.00B) ⬇️
StaticClassLiteral<'db>::implicit_attribute_inner_::interned_arguments 1.90MB 1.90MB -0.01% (288.00B) ⬇️
place_by_id 1.37MB 1.37MB -0.02% (248.00B) ⬇️
StaticClassLiteral<'db>::try_metaclass_ 352.09kB 351.89kB -0.06% (208.00B) ⬇️
InternedType 1.69kB 1.55kB -8.33% (144.00B) ⬇️
place_by_id::interned_arguments 1.03MB 1.03MB -0.01% (144.00B) ⬇️
code_generator_of_static_class 529.56kB 529.42kB -0.03% (140.00B) ⬇️
infer_expression_type_impl 3.20MB 3.20MB -0.00% (92.00B) ⬇️
... 3 more

@AlexWaygood
Copy link
Member Author

Whelp. I really should have checked the ecosystem report on #23285 more carefully. This might be bad enough to warrant a hotfix release 😬

@AlexWaygood AlexWaygood marked this pull request as ready for review March 12, 2026 18:37
Copy link
Contributor

@ntBre ntBre left a comment

Choose a reason for hiding this comment

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

Makes sense to me, for what it's worth!

@AlexWaygood AlexWaygood merged commit 91fc7bd into main Mar 12, 2026
50 checks passed
@AlexWaygood AlexWaygood deleted the alex/attr-annotations branch March 12, 2026 19:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working ty Multi-file analysis & type inference

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants