-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Closed
Labels
bugmypy got something wrongmypy got something wrongfalse-positivemypy gave an error on correct codemypy gave an error on correct codepriority-0-hightopic-descriptorsProperties, class vs. instance attributesProperties, class vs. instance attributes
Description
MyPy does not support property aliases. Example:
$ cat a.py
class A:
@property
def f(self) -> int:
return 1
g = f
x: int = A().f
y: int = A().g
$ mypy a.py
a.py:8: error: Incompatible types in assignment (expression has type "Callable[[], int]", variable has type "int")
ZDL-Git, ljudoed, enkelli, k4nar, bandophahita and 8 more
Metadata
Metadata
Assignees
Labels
bugmypy got something wrongmypy got something wrongfalse-positivemypy gave an error on correct codemypy gave an error on correct codepriority-0-hightopic-descriptorsProperties, class vs. instance attributesProperties, class vs. instance attributes