Skip to content

Add @type_check_only to stub-only private classes in stdlib #14512

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 3 commits into from
Aug 3, 2025

Conversation

brianschubert
Copy link
Member

This adds @type_check_only to (all?) remaining private classes in the stdlib that are not available at runtime.

Found via running stubtest with python/mypy#19574, and manually reviewed for sanity.

This comment has been minimized.

Copy link
Contributor

github-actions bot commented Aug 2, 2025

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

discord.py (https://github.com/Rapptz/discord.py)
- ...typeshed_to_test/stdlib/typing.pyi:1015: note: "update" of "TypedDict" defined here
+ ...typeshed_to_test/stdlib/typing.pyi:1016: note: "update" of "TypedDict" defined here
- ...typeshed_to_test/stdlib/typing.pyi:1015: note: "update" of "TypedDict" defined here
+ ...typeshed_to_test/stdlib/typing.pyi:1016: note: "update" of "TypedDict" defined here

@srittau srittau merged commit 622df68 into python:main Aug 3, 2025
63 checks passed
@cdce8p cdce8p mentioned this pull request Aug 4, 2025
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