-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Closed as not planned
Closed as not planned
Copy link
Labels
bugmypy got something wrongmypy got something wrongpriority-2-lowtopic-descriptorsProperties, class vs. instance attributesProperties, class vs. instance attributestopic-runtime-semanticsmypy doesn't model runtime semantics correctlymypy doesn't model runtime semantics correctly
Description
The following is an error in Python but passes mypy's checks:
class X:
@staticmethod
def f(): pass
f()Error:
Traceback (most recent call last):
File "cls.py", line 1, in <module>
class X:
File "cls.py", line 4, in X
f()
TypeError: 'staticmethod' object is not callable
Same thing goes for classmethod.
Metadata
Metadata
Assignees
Labels
bugmypy got something wrongmypy got something wrongpriority-2-lowtopic-descriptorsProperties, class vs. instance attributesProperties, class vs. instance attributestopic-runtime-semanticsmypy doesn't model runtime semantics correctlymypy doesn't model runtime semantics correctly