Not sure if I am doing something wrong or if this is a problem with pylint
. In the code below I get a linting error that self.type
is not callable E1102
.
Although I could just ignore it and keep working, seems like this kind of thing should be easy to fix... just can't figure out how to fix it.
from typing import Callableclass Thing:def __init__(self, thing_type: Callable):self._type = thing_typeself._value = None@propertydef type(self) -> Callable:return self._type@propertydef value(self):return self._value@value.setterdef value(self, value):self._value = self.type(value)