Skip to content

Fix stubtest false positive for sentinel default values - #22017

Merged
hauntsaninja merged 2 commits into
python:masterfrom
edgarrmondragon:22013-sentinel-stub-markers
Sep 21, 2026
Merged

hauntsaninja merged 2 commits into
python:masterfrom
edgarrmondragon:22013-sentinel-stub-markers

Conversation

@edgarrmondragon

Copy link
Copy Markdown
Contributor

mypy was flagging a stub non-sentinel parameter type and a runtime sentinel type as incompatible, even though a similar pattern using object() is allowed

Fixes #22013

Signed-off-by: Edgar Ramírez Mondragón <edgarrm358@gmail.com>
@hauntsaninja
hauntsaninja merged commit f4f1a05 into python:master Sep 21, 2026
18 checks passed
@edgarrmondragon
edgarrmondragon deleted the 22013-sentinel-stub-markers branch September 21, 2026 20:44
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.

stubtest flags PEP 661 sentinel defaults, but not object() markers

3 participants