Skip to content

Remove some pytype workarounds from stdlib #14470

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

Merged
merged 5 commits into from
Jul 27, 2025

Conversation

srittau
Copy link
Collaborator

@srittau srittau commented Jul 27, 2025

Cf. #11958

This comment has been minimized.

@srittau
Copy link
Collaborator Author

srittau commented Jul 27, 2025

The mypy primer hits seem all to make type ignores for conditionally importing from typing_extensions unnecessary. Unexpected, but quite welcome side effect.

Copy link
Contributor

Diff from mypy_primer, showing the effect of this PR on open source code:

pandera (https://github.com/pandera-dev/pandera)
+ pandera/typing/formats.py:10: error: Unused "type: ignore" comment  [unused-ignore]
+ pandera/dtypes.py:26: error: Unused "type: ignore" comment  [unused-ignore]
+ pandera/engines/pandas_engine.py:89: error: Unused "type: ignore" comment  [unused-ignore]
+ pandera/api/base/types.py:13: error: Unused "type: ignore" comment  [unused-ignore]
+ tests/pandas/test_typing.py:17: error: Unused "type: ignore" comment  [unused-ignore]
+ tests/pandas/test_decorators.py:34: error: Unused "type: ignore" comment  [unused-ignore]
+ tests/geopandas/test_geopandas.py:16: error: Unused "type: ignore" comment  [unused-ignore]
+ tests/fastapi/app.py:18: error: Unused "type: ignore" comment  [unused-ignore]
+ tests/polars/test_polars_model.py:10: error: Unused "type: ignore" comment  [unused-ignore]
+ tests/polars/test_polars_container.py:23: error: Unused "type: ignore" comment  [unused-ignore]

meson (https://github.com/mesonbuild/meson)
+ mesonbuild/minstall.py:42: error: Unused "type: ignore" comment  [unused-ignore]

dacite (https://github.com/konradhalas/dacite)
+ dacite/data.py:4: error: Unused "type: ignore" comment  [unused-ignore]

dd-trace-py (https://github.com/DataDog/dd-trace-py)
+ ddtrace/internal/wrapping/__init__.py:14: error: Unused "type: ignore" comment  [unused-ignore]
+ ddtrace/internal/wrapping/context.py:15: error: Unused "type: ignore" comment  [unused-ignore]
+ ddtrace/internal/products.py:28: error: Unused "type: ignore" comment  [unused-ignore]
+ ddtrace/debugging/_function/discovery.py:14: error: Unused "type: ignore" comment  [unused-ignore]

DateType (https://github.com/glyph/DateType)
+ src/datetype/__init__.py:29: error: Unused "type: ignore" comment  [unused-ignore]

trio (https://github.com/python-trio/trio)
+ src/trio/_tests/test_exports.py:36: error: Unused "type: ignore" comment  [unused-ignore]

optuna (https://github.com/optuna/optuna)
+ optuna/artifacts/_protocol.py:9: error: Unused "type: ignore" comment  [unused-ignore]

graphql-core (https://github.com/graphql-python/graphql-core)
+ src/graphql/utilities/get_introspection_query.py:14: error: Unused "type: ignore" comment  [unused-ignore]

@AlexWaygood AlexWaygood merged commit 7e16c80 into python:main Jul 27, 2025
63 checks passed
@srittau srittau deleted the rm-pytype-workarounds1 branch July 27, 2025 11:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy