We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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 text was updated successfully, but these errors were encountered:
The redundant slot definition seems to work at runtime, so this seems pretty low priority.
Sorry, something went wrong.
@JukkaL Agree. On a side note, having the redundant slot wastes some memory.
No branches or pull requests
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
The text was updated successfully, but these errors were encountered: