Skip to content

Conversation

@hauntsaninja
Copy link
Collaborator

See also discussion on python/typeshed#14966

@github-actions

This comment has been minimized.

if isinstance(typ, Instance) and typ.type.fullname == "builtins._NotImplementedType":
if (
isinstance(typ, Instance)
and typ.type.fullname in {"builtins._NotImplementedType", "types.NotImplementedType"}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Let's move this set to types.py where other similar "dual" sources live?

from types import NotImplementedType
NotImplemented: NotImplementedType
else:
class _NotImplementedType(Any): ...
Copy link
Collaborator

Choose a reason for hiding this comment

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

Cross-link to #20114 - if we get there, this Any should also be removed

@github-actions
Copy link
Contributor

github-actions bot commented Nov 4, 2025

According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅

@hauntsaninja hauntsaninja merged commit 3c30736 into python:master Nov 4, 2025
21 checks passed
@hauntsaninja hauntsaninja deleted the notimp branch November 4, 2025 02:56
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.

3 participants