Skip to content

docs: document that stubtest ignores private stub names#21735

Open
pctablet505 wants to merge 1 commit into
python:masterfrom
pctablet505:fix-15414-document-stubtest-private-names
Open

docs: document that stubtest ignores private stub names#21735
pctablet505 wants to merge 1 commit into
python:masterfrom
pctablet505:fix-15414-document-stubtest-private-names

Conversation

@pctablet505

Copy link
Copy Markdown

Fixes #15414

Adds a section to the stubtest documentation explaining that names beginning with a leading underscore are treated as private to the stub. This documents the existing behaviour used by typeshed, so users know they can use names like "_T" for TypeVars that don't exist at runtime.

Add a section to the stubtest documentation explaining that names
beginning with a leading underscore are treated as private to the
stub and will not be flagged if missing at runtime.

Fixes python#15414
@pctablet505
pctablet505 marked this pull request as ready for review July 17, 2026 12:47
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.

Document that stubtest will not flag private names

1 participant