I was wondering what is the best way to handle a Pylint error complaining about a situation like in this example:
class Base:
def some_funct(self) -> List:
"""
Intended to be overwritten in child classes, but
if not, it's ok to return an empty list
"""
return []
class Child1(Base):
def some_funct(self) -> List:
# Now, this does actual stuff!!
return [a for a in self.some_iterable]
class Child2(Base):
# An empty list is fine for this one
pass
Pylint is going to say that the Base.safe_implementation could be a function (which... is true, but I'd like self to stay there)
Is there a better solution that just marking it as pylint: disable? Which... I mean... if it's what it is, it is what it is and it's not a "deal breaker" , but if there's a better way, it'd be nice to know.
This is for Python 3.6, in case it's relevant.