Open dhalenok opened 4 years ago
Feature request
class Base(): __slots__: List[str] = ['foo', 'bar'] if TYPE_CHECKING: foo: int bar: int class Derived(Base): __slots__: List[str] = ['bar']
Success: no issues found in 1 source file
I believe it would be nice if mypy generated an error on __slots__ declaration in Derived class because 'bar' slot was already declared in Base class.
__slots__
Python 3.8.0, mypy 0.761
The redundant slot definition seems to work at runtime, so this seems pretty low priority.
@JukkaL Agree. On a side note, having the redundant slot wastes some memory.
Feature request
Success: no issues found in 1 source file
I believe it would be nice if mypy generated an error on
__slots__
declaration in Derived class because 'bar' slot was already declared in Base class.Python 3.8.0, mypy 0.761