builtins: NotImplemented is not callable (#4222)

Fixes #3315

Co-authored-by: hauntsaninja <>
This commit is contained in:
Shantanu
2020-06-10 22:05:16 -07:00
committed by GitHub
parent 44a852dff5
commit ecb43149f7
2 changed files with 12 additions and 2 deletions

View File

@@ -1163,7 +1163,12 @@ class property(object):
if sys.version_info < (3,):
long = int
NotImplemented: Any
class _NotImplementedType(Any): # type: ignore
# A little weird, but typing the __call__ as NotImplemented makes the error message
# for NotImplemented() much better
__call__: NotImplemented # type: ignore
NotImplemented: _NotImplementedType
def abs(__x: SupportsAbs[_T]) -> _T: ...
def all(__iterable: Iterable[object]) -> bool: ...

View File

@@ -1163,7 +1163,12 @@ class property(object):
if sys.version_info < (3,):
long = int
NotImplemented: Any
class _NotImplementedType(Any): # type: ignore
# A little weird, but typing the __call__ as NotImplemented makes the error message
# for NotImplemented() much better
__call__: NotImplemented # type: ignore
NotImplemented: _NotImplementedType
def abs(__x: SupportsAbs[_T]) -> _T: ...
def all(__iterable: Iterable[object]) -> bool: ...