If I declare a property getter on a base class, I can't declare a setter on a child class without having to add a getter there as well.
For example,
class A(object):
__metaclass__ = ABCMeta
@property
def prop(self):
# type: () -> int
return 1
class B(A):
@A.prop.setter
def prop(self, val):
# type: (int) -> None
pass
is a valid python code, but mypy fails with "Callable[[A], int]" has no attribute "setter"
If I declare a property getter on a base class, I can't declare a setter on a child class without having to add a getter there as well.
For example,
is a valid python code, but mypy fails with
"Callable[[A], int]" has no attribute "setter"