Skip to content

Add @type_check_only for ignored third-party stubs#15535

Merged
brianschubert merged 2 commits intopython:mainfrom
donbarbos:missing-type_check_only
Mar 21, 2026
Merged

Add @type_check_only for ignored third-party stubs#15535
brianschubert merged 2 commits intopython:mainfrom
donbarbos:missing-type_check_only

Conversation

@donbarbos
Copy link
Contributor

No description provided.

@github-actions
Copy link
Contributor

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

Copy link
Collaborator

@brianschubert brianschubert left a comment

Choose a reason for hiding this comment

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

Nice, thank you!

A few of these are actually from non-ignored stubs but which I hadn't got around to fixing:

error: docker.types.services._ResourceDict is not present at runtime. Maybe mark it as "@type_check_only"?
error: docutils._VersionInfo is not present at runtime. Maybe mark it as "@type_check_only"?
error: fpdf.drawing._DeviceCMYKBase is not present at runtime. Maybe mark it as "@type_check_only"?
error: fpdf.drawing._DeviceGrayBase is not present at runtime. Maybe mark it as "@type_check_only"?
error: fpdf.drawing._DeviceRGBBase is not present at runtime. Maybe mark it as "@type_check_only"?

The rest I verified are in stub-only or otherwise stubtest-ignored modules.

@brianschubert brianschubert merged commit 282b1a8 into python:main Mar 21, 2026
39 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