-
-
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-highrefactoringChanging mypy's internalsChanging mypy's internalstopic-descriptorsProperties, class vs. instance attributesProperties, class vs. instance attributes
Description
For example:
class Foo:
def __init__(self) -> None:
self.x = 42
class Bar(Foo):
def __init__(self) -> None:
self.y = 9000
@property
def x(self) -> int:
print('got x!!!')
return self.y
@x.setter
def x(self, value: int) -> None:
print('set x!!!')
self.y = value
This should be allowed as it doesn't violate LSP as long as x
implements both a getter
and a setter
of the correct type.
natemcmaster, awendland, languitar, tadeu, Garrett-R and 19 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-highrefactoringChanging mypy's internalsChanging mypy's internalstopic-descriptorsProperties, class vs. instance attributesProperties, class vs. instance attributes