Skip to content

Add @type_check_only to stub-only private classes in stdlib, round 2#15515

Merged
brianschubert merged 1 commit intopython:mainfrom
brianschubert:stdlib-more-typescheckonly
Mar 15, 2026
Merged

Add @type_check_only to stub-only private classes in stdlib, round 2#15515
brianschubert merged 1 commit intopython:mainfrom
brianschubert:stdlib-more-typescheckonly

Conversation

@brianschubert
Copy link
Collaborator

New hits from python/mypy#19574:

error: importlib.metadata._EntryPointBase is not present at runtime. Maybe mark it as "@type_check_only"?
error: statistics._SizedIterable is not present at runtime. Maybe mark it as "@type_check_only"?
error: tkinter.ttk._ElementCreateImageKwargs is not present at runtime. Maybe mark it as "@type_check_only"?
error: tkinter.ttk._ElementCreateVsapiKwargsMargin is not present at runtime. Maybe mark it as "@type_check_only"?
error: tkinter.ttk._ElementCreateVsapiKwargsPadding is not present at runtime. Maybe mark it as "@type_check_only"?
error: tkinter.ttk._ElementCreateVsapiKwargsSize is not present at runtime. Maybe mark it as "@type_check_only"?
error: tkinter.ttk._Layout is not present at runtime. Maybe mark it as "@type_check_only"?

Introduced in #14348, #15249, and one missed due to python/mypy@565e42f

@github-actions
Copy link
Contributor

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

@brianschubert brianschubert merged commit 2839fd5 into python:main Mar 15, 2026
51 checks passed
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