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 Callable
class Thing:
def __init__(self, thing_type: Callable):
self._type = thing_type
self._value = None
@property
def type(self) -> Callable:
return self._type
@property
def value(self):
return self._value
@value.setter
def value(self, value):
self._value = self.type(value)