-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Sync typeshed #20729
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
cdce8p
wants to merge
8
commits into
python:master
Choose a base branch
from
cdce8p:sync-typeshed
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Sync typeshed #20729
+125
−99
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This comment has been minimized.
This comment has been minimized.
Source commit: python/typeshed@11ff7e1
This is allegedly causing large performance problems, see 13821 typeshed/8231 had zero hits on mypy_primer, so it's not the worst thing to undo. Patching this in typeshed also feels weird, since there's a more general soundness issue. If a typevar has a bound or constraint, we might not want to solve it to a Literal. If we can confirm the performance regression or fix the unsoundness within mypy, I might pursue upstreaming this in typeshed. (Reminder: add this to the sync_typeshed script once merged)
The plugin provides superior type checking: python#13987 (comment) A manual cherry-pick of e437cdf.
Contributor
|
Diff from mypy_primer, showing the effect of this PR on open source code: prefect (https://github.com/PrefectHQ/prefect)
- src/prefect/deployments/flow_runs.py:441: error: Argument 1 to "sleep" has incompatible type "float | None"; expected "float" [arg-type]
+ src/prefect/deployments/flow_runs.py:441: error: Argument 1 to "sleep" has incompatible type "float | None"; expected "float | SupportsIndex" [arg-type]
- src/prefect/infrastructure/provisioners/container_instance.py:274: error: Invalid index type "str" for "str"; expected type "SupportsIndex | slice[Any, Any, Any]" [index]
+ src/prefect/infrastructure/provisioners/container_instance.py:274: error: Invalid index type "str" for "str"; expected type "SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None]" [index]
- src/prefect/infrastructure/provisioners/container_instance.py:275: error: Invalid index type "str" for "str"; expected type "SupportsIndex | slice[Any, Any, Any]" [index]
+ src/prefect/infrastructure/provisioners/container_instance.py:275: error: Invalid index type "str" for "str"; expected type "SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None]" [index]
- src/prefect/infrastructure/provisioners/container_instance.py:347: error: Invalid index type "str" for "str"; expected type "SupportsIndex | slice[Any, Any, Any]" [index]
+ src/prefect/infrastructure/provisioners/container_instance.py:347: error: Invalid index type "str" for "str"; expected type "SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None]" [index]
- src/prefect/infrastructure/provisioners/container_instance.py:356: error: Invalid index type "str" for "str"; expected type "SupportsIndex | slice[Any, Any, Any]" [index]
+ src/prefect/infrastructure/provisioners/container_instance.py:356: error: Invalid index type "str" for "str"; expected type "SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None]" [index]
- src/prefect/infrastructure/provisioners/container_instance.py:413: error: Invalid index type "str" for "str"; expected type "SupportsIndex | slice[Any, Any, Any]" [index]
+ src/prefect/infrastructure/provisioners/container_instance.py:413: error: Invalid index type "str" for "str"; expected type "SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None]" [index]
- src/prefect/infrastructure/provisioners/container_instance.py:638: error: Invalid index type "str" for "str"; expected type "SupportsIndex | slice[Any, Any, Any]" [index]
+ src/prefect/infrastructure/provisioners/container_instance.py:638: error: Invalid index type "str" for "str"; expected type "SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None]" [index]
- src/prefect/cli/deploy/_actions.py:165: note: def __setitem__(self, slice[Any, Any, Any], Iterable[dict[str, Any]], /) -> None
+ src/prefect/cli/deploy/_actions.py:165: note: def __setitem__(self, slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], Iterable[dict[str, Any]], /) -> None
- src/prefect/cli/deploy/_actions.py:193: note: def __setitem__(self, slice[Any, Any, Any], Iterable[dict[str, Any]], /) -> None
+ src/prefect/cli/deploy/_actions.py:193: note: def __setitem__(self, slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], Iterable[dict[str, Any]], /) -> None
- src/prefect/cli/deploy/_actions.py:201: note: def __setitem__(self, slice[Any, Any, Any], Iterable[dict[str, Any]], /) -> None
+ src/prefect/cli/deploy/_actions.py:201: note: def __setitem__(self, slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], Iterable[dict[str, Any]], /) -> None
- src/prefect/cli/deploy/_actions.py:220: note: def __getitem__(self, slice[Any, Any, Any], /) -> list[dict[str, Any]]
+ src/prefect/cli/deploy/_actions.py:220: note: def __getitem__(self, slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> list[dict[str, Any]]
pydantic (https://github.com/pydantic/pydantic)
- ...venv/lib/python3.14/site-packages/mypy/typeshed/stdlib/typing.pyi:1065: note: "evaluate_forward_ref" defined here
+ ...venv/lib/python3.14/site-packages/mypy/typeshed/stdlib/typing.pyi:1068: note: "evaluate_forward_ref" defined here
mypy-protobuf (https://github.com/dropbox/mypy-protobuf)
+ mypy_protobuf/main.py:358: error: overload def [_P, _T_co] (func: def (*_P.args, **_P.kwargs) -> typing.Iterator[_T_co`-2]) -> def (*_P.args, **_P.kwargs) -> contextlib._GeneratorContextManager[_T_co`-2, None, None] of function contextlib.contextmanager is deprecated: Annotating the return type as `-> Iterator[Foo]` with `@contextmanager` is deprecated. Use `-> Generator[Foo]` instead. [deprecated]
+ mypy_protobuf/main.py:1447: error: overload def [_P, _T_co] (func: def (*_P.args, **_P.kwargs) -> typing.Iterator[_T_co`-2]) -> def (*_P.args, **_P.kwargs) -> contextlib._GeneratorContextManager[_T_co`-2, None, None] of function contextlib.contextmanager is deprecated: Annotating the return type as `-> Iterator[Foo]` with `@contextmanager` is deprecated. Use `-> Generator[Foo]` instead. [deprecated]
django-test-migrations (https://github.com/wemake-services/django-test-migrations)
+ django_test_migrations/signals.py:10: error: overload def [_P, _T_co] (func: def (*_P.args, **_P.kwargs) -> typing.Iterator[_T_co`-2]) -> def (*_P.args, **_P.kwargs) -> contextlib._GeneratorContextManager[_T_co`-2, None, None] of function contextlib.contextmanager is deprecated: Annotating the return type as `-> Iterator[Foo]` with `@contextmanager` is deprecated. Use `-> Generator[Foo]` instead. [deprecated]
aiohttp (https://github.com/aio-libs/aiohttp)
+ aiohttp/web_routedef.py:151:6: error: Signature of "__getitem__" incompatible with supertype "typing.Sequence" [override]
+ aiohttp/web_routedef.py:151:6: note: Superclass:
+ aiohttp/web_routedef.py:151:6: note: @overload
+ aiohttp/web_routedef.py:151:6: note: def __getitem__(self, int, /) -> AbstractRouteDef
+ aiohttp/web_routedef.py:151:6: note: @overload
+ aiohttp/web_routedef.py:151:6: note: def __getitem__(self, slice[int | None, int | None, int | None], /) -> Sequence[AbstractRouteDef]
+ aiohttp/web_routedef.py:151:6: note: Subclass:
+ aiohttp/web_routedef.py:151:6: note: @overload
+ aiohttp/web_routedef.py:151:6: note: def __getitem__(self, int, /) -> AbstractRouteDef
+ aiohttp/web_routedef.py:151:6: note: @overload
+ aiohttp/web_routedef.py:151:6: note: def __getitem__(self, slice[int, int, int], /) -> list[AbstractRouteDef]
+ aiohttp/test_utils.py:561:2: error: overload def [_P, _T_co] (func: def (*_P.args, **_P.kwargs) -> typing.Iterator[_T_co`-2]) -> def (*_P.args, **_P.kwargs) -> contextlib._GeneratorContextManager[_T_co`-2, None, None] of function contextlib.contextmanager is deprecated: Annotating the return type as `-> Iterator[Foo]` with `@contextmanager` is deprecated. Use `-> Generator[Foo]` instead. [deprecated]
+ aiohttp/pytest_plugin.py:157:2: error: overload def [_P, _T_co] (func: def (*_P.args, **_P.kwargs) -> typing.Iterator[_T_co`-2]) -> def (*_P.args, **_P.kwargs) -> contextlib._GeneratorContextManager[_T_co`-2, None, None] of function contextlib.contextmanager is deprecated: Annotating the return type as `-> Iterator[Foo]` with `@contextmanager` is deprecated. Use `-> Generator[Foo]` instead. [deprecated]
+ aiohttp/pytest_plugin.py:187:2: error: overload def [_P, _T_co] (func: def (*_P.args, **_P.kwargs) -> typing.Iterator[_T_co`-2]) -> def (*_P.args, **_P.kwargs) -> contextlib._GeneratorContextManager[_T_co`-2, None, None] of function contextlib.contextmanager is deprecated: Annotating the return type as `-> Iterator[Foo]` with `@contextmanager` is deprecated. Use `-> Generator[Foo]` instead. [deprecated]
colour (https://github.com/colour-science/colour)
- colour/models/tests/test_hunter_rdab.py:159: note: def __getitem__(self, slice[Any, Any, Any], /) -> list[float]
+ colour/models/tests/test_hunter_rdab.py:159: note: def __getitem__(self, slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> list[float]
- colour/models/tests/test_hunter_rdab.py:294: note: def __getitem__(self, slice[Any, Any, Any], /) -> list[float]
+ colour/models/tests/test_hunter_rdab.py:294: note: def __getitem__(self, slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> list[float]
- colour/models/tests/test_hunter_lab.py:233: note: def __getitem__(self, slice[Any, Any, Any], /) -> list[float]
+ colour/models/tests/test_hunter_lab.py:233: note: def __getitem__(self, slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> list[float]
- colour/models/tests/test_hunter_lab.py:368: note: def __getitem__(self, slice[Any, Any, Any], /) -> list[float]
+ colour/models/tests/test_hunter_lab.py:368: note: def __getitem__(self, slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> list[float]
- colour/models/tests/test_hdr_ipt.py:230: note: def __getitem__(self, slice[Any, Any, Any], /) -> list[float]
+ colour/models/tests/test_hdr_ipt.py:230: note: def __getitem__(self, slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> list[float]
- colour/models/tests/test_hdr_ipt.py:337: note: def __getitem__(self, slice[Any, Any, Any], /) -> list[float]
+ colour/models/tests/test_hdr_ipt.py:337: note: def __getitem__(self, slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> list[float]
- colour/models/tests/test_hdr_cie_lab.py:251: note: def __getitem__(self, slice[Any, Any, Any], /) -> list[float]
+ colour/models/tests/test_hdr_cie_lab.py:251: note: def __getitem__(self, slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> list[float]
- colour/models/tests/test_hdr_cie_lab.py:376: note: def __getitem__(self, slice[Any, Any, Any], /) -> list[float]
+ colour/models/tests/test_hdr_cie_lab.py:376: note: def __getitem__(self, slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> list[float]
- colour/models/tests/test_cie_uvw.py:133: note: def __getitem__(self, slice[Any, Any, Any], /) -> list[float]
+ colour/models/tests/test_cie_uvw.py:133: note: def __getitem__(self, slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> list[float]
- colour/models/tests/test_cie_uvw.py:243: note: def __getitem__(self, slice[Any, Any, Any], /) -> list[float]
+ colour/models/tests/test_cie_uvw.py:243: note: def __getitem__(self, slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> list[float]
- colour/models/tests/test_cie_luv.py:148: note: def __getitem__(self, slice[Any, Any, Any], /) -> list[float]
+ colour/models/tests/test_cie_luv.py:148: note: def __getitem__(self, slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> list[float]
- colour/models/tests/test_cie_luv.py:258: note: def __getitem__(self, slice[Any, Any, Any], /) -> list[float]
+ colour/models/tests/test_cie_luv.py:258: note: def __getitem__(self, slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> list[float]
- colour/models/tests/test_cie_luv.py:368: note: def __getitem__(self, slice[Any, Any, Any], /) -> list[float]
+ colour/models/tests/test_cie_luv.py:368: note: def __getitem__(self, slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> list[float]
- colour/models/tests/test_cie_luv.py:485: note: def __getitem__(self, slice[Any, Any, Any], /) -> list[float]
+ colour/models/tests/test_cie_luv.py:485: note: def __getitem__(self, slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> list[float]
- colour/models/tests/test_cie_luv.py:710: note: def __getitem__(self, slice[Any, Any, Any], /) -> list[float]
+ colour/models/tests/test_cie_luv.py:710: note: def __getitem__(self, slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> list[float]
- colour/models/tests/test_cie_luv.py:823: note: def __getitem__(self, slice[Any, Any, Any], /) -> list[float]
+ colour/models/tests/test_cie_luv.py:823: note: def __getitem__(self, slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> list[float]
- colour/models/tests/test_cie_lab.py:133: note: def __getitem__(self, slice[Any, Any, Any], /) -> list[float]
+ colour/models/tests/test_cie_lab.py:133: note: def __getitem__(self, slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> list[float]
- colour/models/tests/test_cie_lab.py:243: note: def __getitem__(self, slice[Any, Any, Any], /) -> list[float]
+ colour/models/tests/test_cie_lab.py:243: note: def __getitem__(self, slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> list[float]
- colour/models/rgb/tests/test_rgb_colourspace.py:477: note: def __getitem__(self, slice[Any, Any, Any], /) -> list[float]
+ colour/models/rgb/tests/test_rgb_colourspace.py:477: note: def __getitem__(self, slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> list[float]
- colour/models/rgb/tests/test_rgb_colourspace.py:677: note: def __getitem__(self, slice[Any, Any, Any], /) -> list[float]
+ colour/models/rgb/tests/test_rgb_colourspace.py:677: note: def __getitem__(self, slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> list[float]
- colour/colorimetry/tests/test_whiteness.py:475: note: def __getitem__(self, slice[Any, Any, Any], /) -> list[float]
+ colour/colorimetry/tests/test_whiteness.py:475: note: def __getitem__(self, slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> list[float]
- colour/colorimetry/tests/test_whiteness.py:574: note: def __getitem__(self, slice[Any, Any, Any], /) -> list[float]
+ colour/colorimetry/tests/test_whiteness.py:574: note: def __getitem__(self, slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> list[float]
- colour/appearance/tests/test_scam.py:215: note: def __getitem__(self, slice[Any, Any, Any], /) -> list[float]
+ colour/appearance/tests/test_scam.py:215: note: def __getitem__(self, slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> list[float]
- colour/appearance/tests/test_scam.py:404: note: def __getitem__(self, slice[Any, Any, Any], /) -> list[float]
+ colour/appearance/tests/test_scam.py:404: note: def __getitem__(self, slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> list[float]
- colour/appearance/tests/test_scam.py:406: note: def __getitem__(self, slice[Any, Any, Any], /) -> list[float]
+ colour/appearance/tests/test_scam.py:406: note: def __getitem__(self, slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> list[float]
- colour/appearance/tests/test_scam.py:407: note: def __getitem__(self, slice[Any, Any, Any], /) -> list[float]
+ colour/appearance/tests/test_scam.py:407: note: def __getitem__(self, slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> list[float]
- colour/appearance/tests/test_rlab.py:155: note: def __getitem__(self, slice[Any, Any, Any], /) -> list[float]
+ colour/appearance/tests/test_rlab.py:155: note: def __getitem__(self, slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> list[float]
- colour/appearance/tests/test_nayatani95.py:155: note: def __getitem__(self, slice[Any, Any, Any], /) -> list[float]
+ colour/appearance/tests/test_nayatani95.py:155: note: def __getitem__(self, slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> list[float]
- colour/appearance/tests/test_llab.py:223: note: def __getitem__(self, slice[Any, Any, Any], /) -> list[float]
+ colour/appearance/tests/test_llab.py:223: note: def __getitem__(self, slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> list[float]
- colour/appearance/tests/test_llab.py:224: note: def __getitem__(self, slice[Any, Any, Any], /) -> list[float]
+ colour/appearance/tests/test_llab.py:224: note: def __getitem__(self, slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> list[float]
- colour/appearance/tests/test_llab.py:225: note: def __getitem__(self, slice[Any, Any, Any], /) -> list[float]
+ colour/appearance/tests/test_llab.py:225: note: def __getitem__(self, slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> list[float]
- colour/appearance/tests/test_llab.py:434: note: def __getitem__(self, slice[Any, Any, Any], /) -> list[float]
+ colour/appearance/tests/test_llab.py:434: note: def __getitem__(self, slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> list[float]
- colour/appearance/tests/test_llab.py:435: note: def __getitem__(self, slice[Any, Any, Any], /) -> list[float]
+ colour/appearance/tests/test_llab.py:435: note: def __getitem__(self, slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> list[float]
- colour/appearance/tests/test_llab.py:438: note: def __getitem__(self, slice[Any, Any, Any], /) -> list[float]
+ colour/appearance/tests/test_llab.py:438: note: def __getitem__(self, slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> list[float]
- colour/appearance/tests/test_llab.py:441: note: def __getitem__(self, slice[Any, Any, Any], /) -> list[float]
+ colour/appearance/tests/test_llab.py:441: note: def __getitem__(self, slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> list[float]
- colour/appearance/tests/test_kim2009.py:223: note: def __getitem__(self, slice[Any, Any, Any], /) -> list[float]
+ colour/appearance/tests/test_kim2009.py:223: note: def __getitem__(self, slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> list[float]
- colour/appearance/tests/test_kim2009.py:224: note: def __getitem__(self, slice[Any, Any, Any], /) -> list[float]
+ colour/appearance/tests/test_kim2009.py:224: note: def __getitem__(self, slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> list[float]
- colour/appearance/tests/test_kim2009.py:225: note: def __getitem__(self, slice[Any, Any, Any], /) -> list[float]
+ colour/appearance/tests/test_kim2009.py:225: note: def __getitem__(self, slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> list[float]
- colour/appearance/tests/test_kim2009.py:434: note: def __getitem__(self, slice[Any, Any, Any], /) -> list[float]
+ colour/appearance/tests/test_kim2009.py:434: note: def __getitem__(self, slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> list[float]
- colour/appearance/tests/test_kim2009.py:435: note: def __getitem__(self, slice[Any, Any, Any], /) -> list[float]
+ colour/appearance/tests/test_kim2009.py:435: note: def __getitem__(self, slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> list[float]
- colour/appearance/tests/test_kim2009.py:438: note: def __getitem__(self, slice[Any, Any, Any], /) -> list[float]
+ colour/appearance/tests/test_kim2009.py:438: note: def __getitem__(self, slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> list[float]
- colour/appearance/tests/test_kim2009.py:441: note: def __getitem__(self, slice[Any, Any, Any], /) -> list[float]
+ colour/appearance/tests/test_kim2009.py:441: note: def __getitem__(self, slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> list[float]
- colour/appearance/tests/test_hunt.py:231: note: def __getitem__(self, slice[Any, Any, Any], /) -> list[float]
+ colour/appearance/tests/test_hunt.py:231: note: def __getitem__(self, slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> list[float]
- colour/appearance/tests/test_hunt.py:236: note: def __getitem__(self, slice[Any, Any, Any], /) -> list[float]
+ colour/appearance/tests/test_hunt.py:236: note: def __getitem__(self, slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> list[float]
- colour/appearance/tests/test_hunt.py:238: note: def __getitem__(self, slice[Any, Any, Any], /) -> list[float]
+ colour/appearance/tests/test_hunt.py:238: note: def __getitem__(self, slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> list[float]
- colour/appearance/tests/test_hellwig2022.py:242: note: def __getitem__(self, slice[Any, Any, Any], /) -> list[float]
+ colour/appearance/tests/test_hellwig2022.py:242: note: def __getitem__(self, slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> list[float]
- colour/appearance/tests/test_hellwig2022.py:243: note: def __getitem__(self, slice[Any, Any, Any], /) -> list[float]
+ colour/appearance/tests/test_hellwig2022.py:243: note: def __getitem__(self, slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> list[float]
- colour/appearance/tests/test_hellwig2022.py:449: note: def __getitem__(self, slice[Any, Any, Any], /) -> list[float]
+ colour/appearance/tests/test_hellwig2022.py:449: note: def __getitem__(self, slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> list[float]
- colour/appearance/tests/test_hellwig2022.py:452: note: def __getitem__(self, slice[Any, Any, Any], /) -> list[float]
+ colour/appearance/tests/test_hellwig2022.py:452: note: def __getitem__(self, slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> list[float]
- colour/appearance/tests/test_hellwig2022.py:455: note: def __getitem__(self, slice[Any, Any, Any], /) -> list[float]
+ colour/appearance/tests/test_hellwig2022.py:455: note: def __getitem__(self, slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> list[float]
- colour/appearance/tests/test_hellwig2022.py:456: note: def __getitem__(self, slice[Any, Any, Any], /) -> list[float]
+ colour/appearance/tests/test_hellwig2022.py:456: note: def __getitem__(self, slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> list[float]
- colour/appearance/tests/test_ciecam16.py:264: note: def __getitem__(self, slice[Any, Any, Any], /) -> list[float]
+ colour/appearance/tests/test_ciecam16.py:264: note: def __getitem__(self, slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> list[float]
- colour/appearance/tests/test_ciecam16.py:265: note: def __getitem__(self, slice[Any, Any, Any], /) -> list[float]
+ colour/appearance/tests/test_ciecam16.py:265: note: def __getitem__(self, slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> list[float]
- colour/appearance/tests/test_ciecam16.py:465: note: def __getitem__(self, slice[Any, Any, Any], /) -> list[float]
+ colour/appearance/tests/test_ciecam16.py:465: note: def __getitem__(self, slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> list[float]
- colour/appearance/tests/test_ciecam16.py:468: note: def __getitem__(self, slice[Any, Any, Any], /) -> list[float]
+ colour/appearance/tests/test_ciecam16.py:468: note: def __getitem__(self, slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> list[float]
- colour/appearance/tests/test_ciecam16.py:471: note: def __getitem__(self, slice[Any, Any, Any], /) -> list[float]
+ colour/appearance/tests/test_ciecam16.py:471: note: def __getitem__(self, slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> list[float]
- colour/appearance/tests/test_ciecam16.py:472: note: def __getitem__(self, slice[Any, Any, Any], /) -> list[float]
+ colour/appearance/tests/test_ciecam16.py:472: note: def __getitem__(self, slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> list[float]
- colour/appearance/tests/test_ciecam02.py:205: note: def __getitem__(self, slice[Any, Any, Any], /) -> list[float]
... (truncated 43 lines) ...
mypy (https://github.com/python/mypy)
+ mypy/server/aststrip.py:140: error: Unused "type: ignore" comment [unused-ignore]
operator (https://github.com/canonical/operator)
- ops/model.py:885: error: Argument 1 of "__contains__" is incompatible with supertype "typing.Container"; supertype defines the argument type as "object" [override]
- ops/model.py:932: error: Argument 1 of "__contains__" is incompatible with supertype "typing.Container"; supertype defines the argument type as "object" [override]
- ops/model.py:1961: error: Argument 1 of "__contains__" is incompatible with supertype "typing.Container"; supertype defines the argument type as "object" [override]
- ops/model.py:2402: error: Argument 1 of "__contains__" is incompatible with supertype "typing.Container"; supertype defines the argument type as "object" [override]
- ops/framework.py:1385: note: def __getitem__(self, slice[Any, Any, Any], /) -> MutableSequence[Any]
+ ops/framework.py:1385: note: def __getitem__(self, slice[int | None, int | None, int | None], /) -> MutableSequence[Any]
- ops/framework.py:1385: note: def __getitem__(self, slice[Any, Any, Any], /) -> Sequence[Any]
+ ops/framework.py:1385: note: def __getitem__(self, slice[int | None, int | None, int | None], /) -> Sequence[Any]
- ops/framework.py:1388: note: def __setitem__(self, slice[Any, Any, Any], Iterable[Any], /) -> None
+ ops/framework.py:1388: note: def __setitem__(self, slice[int | None, int | None, int | None], Iterable[Any], /) -> None
- ops/framework.py:1392: note: def __delitem__(self, slice[Any, Any, Any], /) -> None
+ ops/framework.py:1392: note: def __delitem__(self, slice[int | None, int | None, int | None], /) -> None
core (https://github.com/home-assistant/core)
+ homeassistant/components/script/trace.py:25: error: overload def [_P, _T_co] (func: def (*_P.args, **_P.kwargs) -> typing.Iterator[_T_co`-2]) -> def (*_P.args, **_P.kwargs) -> contextlib._GeneratorContextManager[_T_co`-2, None, None] of function contextlib.contextmanager is deprecated: Annotating the return type as `-> Iterator[Foo]` with `@contextmanager` is deprecated. Use `-> Generator[Foo]` instead. [deprecated]
+ homeassistant/components/fjaraskupan/coordinator.py:134: error: overload def [_P, _T_co] (func: def (*_P.args, **_P.kwargs) -> typing.AsyncIterator[_T_co`-2]) -> def (*_P.args, **_P.kwargs) -> contextlib._AsyncGeneratorContextManager[_T_co`-2, None] of function contextlib.asynccontextmanager is deprecated: Annotating the return type as `-> AsyncIterator[Foo]` with `@asynccontextmanager` is deprecated. Use `-> AsyncGenerator[Foo]` instead. [deprecated]
+ homeassistant/components/file_upload/__init__.py:37: error: overload def [_P, _T_co] (func: def (*_P.args, **_P.kwargs) -> typing.Iterator[_T_co`-2]) -> def (*_P.args, **_P.kwargs) -> contextlib._GeneratorContextManager[_T_co`-2, None, None] of function contextlib.contextmanager is deprecated: Annotating the return type as `-> Iterator[Foo]` with `@contextmanager` is deprecated. Use `-> Generator[Foo]` instead. [deprecated]
+ homeassistant/components/amcrest/__init__.py:202: error: overload def [_P, _T_co] (func: def (*_P.args, **_P.kwargs) -> typing.AsyncIterator[_T_co`-2]) -> def (*_P.args, **_P.kwargs) -> contextlib._AsyncGeneratorContextManager[_T_co`-2, None] of function contextlib.asynccontextmanager is deprecated: Annotating the return type as `-> AsyncIterator[Foo]` with `@asynccontextmanager` is deprecated. Use `-> AsyncGenerator[Foo]` instead. [deprecated]
+ homeassistant/components/amcrest/__init__.py:213: error: overload def [_P, _T_co] (func: def (*_P.args, **_P.kwargs) -> typing.AsyncIterator[_T_co`-2]) -> def (*_P.args, **_P.kwargs) -> contextlib._AsyncGeneratorContextManager[_T_co`-2, None] of function contextlib.asynccontextmanager is deprecated: Annotating the return type as `-> AsyncIterator[Foo]` with `@asynccontextmanager` is deprecated. Use `-> AsyncGenerator[Foo]` instead. [deprecated]
+ homeassistant/components/improv_ble/config_flow.py:297: error: overload def [_P, _T_co] (func: def (*_P.args, **_P.kwargs) -> typing.AsyncIterator[_T_co`-2]) -> def (*_P.args, **_P.kwargs) -> contextlib._AsyncGeneratorContextManager[_T_co`-2, None] of function contextlib.asynccontextmanager is deprecated: Annotating the return type as `-> AsyncIterator[Foo]` with `@asynccontextmanager` is deprecated. Use `-> AsyncGenerator[Foo]` instead. [deprecated]
+ homeassistant/components/homekit/__init__.py:981: error: Unused "type: ignore" comment [unused-ignore]
+ homeassistant/components/shelly/config_flow.py:844: error: overload def [_P, _T_co] (func: def (*_P.args, **_P.kwargs) -> typing.AsyncIterator[_T_co`-2]) -> def (*_P.args, **_P.kwargs) -> contextlib._AsyncGeneratorContextManager[_T_co`-2, None] of function contextlib.asynccontextmanager is deprecated: Annotating the return type as `-> AsyncIterator[Foo]` with `@asynccontextmanager` is deprecated. Use `-> AsyncGenerator[Foo]` instead. [deprecated]
+ homeassistant/components/homeassistant_hardware/helpers.py:281: error: overload def [_P, _T_co] (func: def (*_P.args, **_P.kwargs) -> typing.AsyncIterator[_T_co`-2]) -> def (*_P.args, **_P.kwargs) -> contextlib._AsyncGeneratorContextManager[_T_co`-2, None] of function contextlib.asynccontextmanager is deprecated: Annotating the return type as `-> AsyncIterator[Foo]` with `@asynccontextmanager` is deprecated. Use `-> AsyncGenerator[Foo]` instead. [deprecated]
+ homeassistant/components/homeassistant_hardware/util.py:127: error: overload def [_P, _T_co] (func: def (*_P.args, **_P.kwargs) -> typing.AsyncIterator[_T_co`-2]) -> def (*_P.args, **_P.kwargs) -> contextlib._AsyncGeneratorContextManager[_T_co`-2, None] of function contextlib.asynccontextmanager is deprecated: Annotating the return type as `-> AsyncIterator[Foo]` with `@asynccontextmanager` is deprecated. Use `-> AsyncGenerator[Foo]` instead. [deprecated]
+ homeassistant/components/homeassistant_hardware/util.py:167: error: overload def [_P, _T_co] (func: def (*_P.args, **_P.kwargs) -> typing.AsyncIterator[_T_co`-2]) -> def (*_P.args, **_P.kwargs) -> contextlib._AsyncGeneratorContextManager[_T_co`-2, None] of function contextlib.asynccontextmanager is deprecated: Annotating the return type as `-> AsyncIterator[Foo]` with `@asynccontextmanager` is deprecated. Use `-> AsyncGenerator[Foo]` instead. [deprecated]
+ homeassistant/components/homeassistant_hardware/util.py:368: error: overload def [_P, _T_co] (func: def (*_P.args, **_P.kwargs) -> typing.AsyncIterator[_T_co`-2]) -> def (*_P.args, **_P.kwargs) -> contextlib._AsyncGeneratorContextManager[_T_co`-2, None] of function contextlib.asynccontextmanager is deprecated: Annotating the return type as `-> AsyncIterator[Foo]` with `@asynccontextmanager` is deprecated. Use `-> AsyncGenerator[Foo]` instead. [deprecated]
+ homeassistant/components/zha/radio_manager.py:172: error: overload def [_P, _T_co] (func: def (*_P.args, **_P.kwargs) -> typing.AsyncIterator[_T_co`-2]) -> def (*_P.args, **_P.kwargs) -> contextlib._AsyncGeneratorContextManager[_T_co`-2, None] of function contextlib.asynccontextmanager is deprecated: Annotating the return type as `-> AsyncIterator[Foo]` with `@asynccontextmanager` is deprecated. Use `-> AsyncGenerator[Foo]` instead. [deprecated]
pytest (https://github.com/pytest-dev/pytest)
+ src/_pytest/subtests.py:287: error: overload def [_P, _T_co] (func: def (*_P.args, **_P.kwargs) -> typing.Iterator[_T_co`-2]) -> def (*_P.args, **_P.kwargs) -> contextlib._GeneratorContextManager[_T_co`-2, None, None] of function contextlib.contextmanager is deprecated: Annotating the return type as `-> Iterator[Foo]` with `@contextmanager` is deprecated. Use `-> Generator[Foo]` instead. [deprecated]
+ src/_pytest/subtests.py:316: error: overload def [_P, _T_co] (func: def (*_P.args, **_P.kwargs) -> typing.Iterator[_T_co`-2]) -> def (*_P.args, **_P.kwargs) -> contextlib._GeneratorContextManager[_T_co`-2, None, None] of function contextlib.contextmanager is deprecated: Annotating the return type as `-> Iterator[Foo]` with `@contextmanager` is deprecated. Use `-> Generator[Foo]` instead. [deprecated]
urllib3 (https://github.com/urllib3/urllib3)
+ test/test_collections.py:336: error: Unused "type: ignore" comment [unused-ignore]
+ test/test_collections.py:337: error: Unused "type: ignore" comment [unused-ignore]
+ test/test_collections.py:398: error: Unused "type: ignore" comment [unused-ignore]
+ test/test_collections.py:399: error: Unused "type: ignore" comment [unused-ignore]
discord.py (https://github.com/Rapptz/discord.py)
- discord/http.py:242: note: def __setitem__(self, slice[Any, Any, Any], Iterable[Embed], /) -> None
+ discord/http.py:242: note: def __setitem__(self, slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], Iterable[Embed], /) -> None
- ...venv/lib/python3.14/site-packages/mypy/typeshed/stdlib/typing.pyi:1046: note: "update" of "TypedDict" defined here
+ ...venv/lib/python3.14/site-packages/mypy/typeshed/stdlib/typing.pyi:1049: note: "update" of "TypedDict" defined here
ibis (https://github.com/ibis-project/ibis)
- ibis/legacy/udf/vectorized.py:188: error: Incompatible types in assignment (expression has type "Attribute", variable has type "ExtensionArray | ndarray[tuple[Any, ...], dtype[Any]] | Index[Any] | Series[Any] | SequenceNotStr[Hashable]") [assignment]
+ ibis/legacy/udf/vectorized.py:188: error: Incompatible types in assignment (expression has type "Attribute", variable has type "ExtensionArray | ndarray[tuple[Any, ...], dtype[Any]] | Index[Any] | Series[Any] | SequenceNotStr[Hashable] | tuple[Hashable, ...]") [assignment]
trio (https://github.com/python-trio/trio)
+ src/trio/_core/_tests/test_instrumentation.py:40: error: Unsupported operand types for in ("Task | None" and "Container[Task]") [operator]
dulwich (https://github.com/dulwich/dulwich)
+ dulwich/refs.py:127: error: Unused "type: ignore" comment [unused-ignore]
+ dulwich/refs.py:129: error: Unused "type: ignore" comment [unused-ignore]
+ dulwich/refs.py:131: error: Unused "type: ignore" comment [unused-ignore]
+ dulwich/refs.py:140: error: Unused "type: ignore" comment [unused-ignore]
+ dulwich/refs.py:142: error: Unused "type: ignore" comment [unused-ignore]
scipy (https://github.com/scipy/scipy)
- scipy/spatial/transform/_rotation_xp.py:539: error: Invalid index type "tuple[EllipsisType, None, None]" for "str"; expected type "SupportsIndex | slice[Any, Any, Any]" [index]
+ scipy/spatial/transform/_rotation_xp.py:539: error: Invalid index type "tuple[EllipsisType, None, None]" for "str"; expected type "SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None]" [index]
- scipy/spatial/transform/_rigid_transform_xp.py:300: error: Invalid index type "tuple[EllipsisType, None]" for "str"; expected type "SupportsIndex | slice[Any, Any, Any]" [index]
+ scipy/spatial/transform/_rigid_transform_xp.py:300: error: Invalid index type "tuple[EllipsisType, None]" for "str"; expected type "SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None]" [index]
- scipy/spatial/transform/_rigid_transform_xp.py:301: error: Invalid index type "tuple[EllipsisType, None]" for "str"; expected type "SupportsIndex | slice[Any, Any, Any]" [index]
+ scipy/spatial/transform/_rigid_transform_xp.py:301: error: Invalid index type "tuple[EllipsisType, None]" for "str"; expected type "SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None]" [index]
manticore (https://github.com/trailofbits/manticore)
- tests/wasm/json2mc.py:103: note: def __getitem__(self, slice[Any, Any, Any], /) -> list[Any]
+ tests/wasm/json2mc.py:103: note: def __getitem__(self, slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> list[Any]
apprise (https://github.com/caronc/apprise)
- apprise/config/base.py:795: error: Invalid index type "str" for "str"; expected type "SupportsIndex | slice[Any, Any, Any]" [index]
+ apprise/config/base.py:795: error: Invalid index type "str" for "str"; expected type "SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None]" [index]
- apprise/config/base.py:804: error: Invalid index type "str" for "str"; expected type "SupportsIndex | slice[Any, Any, Any]" [index]
+ apprise/config/base.py:804: error: Invalid index type "str" for "str"; expected type "SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None]" [index]
- apprise/config/base.py:806: error: Invalid index type "str" for "str"; expected type "SupportsIndex | slice[Any, Any, Any]" [index]
+ apprise/config/base.py:806: error: Invalid index type "str" for "str"; expected type "SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None]" [index]
- apprise/config/base.py:811: error: Invalid index type "str" for "str"; expected type "SupportsIndex | slice[Any, Any, Any]" [index]
+ apprise/config/base.py:811: error: Invalid index type "str" for "str"; expected type "SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None]" [index]
- apprise/config/base.py:816: error: Invalid index type "str" for "str"; expected type "SupportsIndex | slice[Any, Any, Any]" [index]
+ apprise/config/base.py:816: error: Invalid index type "str" for "str"; expected type "SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None]" [index]
- apprise/config/base.py:823: error: Invalid index type "str" for "str"; expected type "SupportsIndex | slice[Any, Any, Any]" [index]
+ apprise/config/base.py:823: error: Invalid index type "str" for "str"; expected type "SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None]" [index]
freqtrade (https://github.com/freqtrade/freqtrade)
- freqtrade/rpc/telegram.py:408: note: def __getitem__(self, slice[Any, Any, Any], /) -> bytes
+ freqtrade/rpc/telegram.py:408: note: def __getitem__(self, slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> bytes
- freqtrade/rpc/telegram.py:408: error: Invalid index type "str" for "str"; expected type "SupportsIndex | slice[Any, Any, Any]" [index]
+ freqtrade/rpc/telegram.py:408: error: Invalid index type "str" for "str"; expected type "SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None]" [index]
- freqtrade/rpc/telegram.py:409: note: def __getitem__(self, slice[Any, Any, Any], /) -> bytes
+ freqtrade/rpc/telegram.py:409: note: def __getitem__(self, slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> bytes
- freqtrade/rpc/telegram.py:409: error: Invalid index type "str" for "str"; expected type "SupportsIndex | slice[Any, Any, Any]" [index]
+ freqtrade/rpc/telegram.py:409: error: Invalid index type "str" for "str"; expected type "SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None]" [index]
- freqtrade/templates/FreqaiExampleStrategy.py:287: note: def __getitem__(self, slice[Any, Any, Any], /) -> bytes
+ freqtrade/templates/FreqaiExampleStrategy.py:287: note: def __getitem__(self, slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> bytes
- freqtrade/templates/FreqaiExampleStrategy.py:287: error: Invalid index type "str" for "str"; expected type "SupportsIndex | slice[Any, Any, Any]" [index]
+ freqtrade/templates/FreqaiExampleStrategy.py:287: error: Invalid index type "str" for "str"; expected type "SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None]" [index]
- freqtrade/templates/FreqaiExampleStrategy.py:290: note: def __getitem__(self, slice[Any, Any, Any], /) -> bytes
+ freqtrade/templates/FreqaiExampleStrategy.py:290: note: def __getitem__(self, slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None], /) -> bytes
- freqtrade/templates/FreqaiExampleStrategy.py:290: error: Invalid index type "str" for "str"; expected type "SupportsIndex | slice[Any, Any, Any]" [index]
+ freqtrade/templates/FreqaiExampleStrategy.py:290: error: Invalid index type "str" for "str"; expected type "SupportsIndex | slice[SupportsIndex | None, SupportsIndex | None, SupportsIndex | None]" [index]
|
Collaborator
Author
Mypy primer hits
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Source commit:
python/typeshed@11ff7e1