You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Mypy's parser combines all contiguous decorated function definitions with the same name into an OverloadedFuncDef. Mypy relies on this behavior later e.g. when understanding @Property checks.
So if you write:
classC:
@propertydefx(self) ->str: passz=0# or any other irrelevant definition@x.setterdefx(self, str) ->None: pass
mypy complains:
test.py: note: In class "C":
test.py:7: error: Callable[[C], str] has no attribute "setter"
The text was updated successfully, but these errors were encountered:
Mypy's parser combines all contiguous decorated function definitions with the same name into an
OverloadedFuncDef
. Mypy relies on this behavior later e.g. when understanding @Property checks.So if you write:
mypy complains:
The text was updated successfully, but these errors were encountered: