-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Open
Labels
bugmypy got something wrongmypy got something wrongtopic-disallow-anyThe disallow-any-* family of flagsThe disallow-any-* family of flags
Description
Bug Report
A function returning NotImplementedType cannot return NotImplemented if strict=True.
(A clear and concise description of what the bug is.)
To Reproduce
from types import NotImplementedType
def foo() -> NotImplementedType:
return NotImplementedExpected Behavior
Type checks even with --strict
Actual Behavior
main.py:4: error: Returning Any from function declared to return "_NotImplementedType" [no-any-return]
Found 1 error in 1 file (checked 1 source file)
Your Environment
- Mypy version used: 1.15.0
- Mypy command-line flags:
--strict - Mypy configuration options from
mypy.ini(and other config files): None - Python version used: 3.12
wyattscarpenter
Metadata
Metadata
Assignees
Labels
bugmypy got something wrongmypy got something wrongtopic-disallow-anyThe disallow-any-* family of flagsThe disallow-any-* family of flags