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
error Signature incompatible with supertype
class A: foo: str = "foo" class B(A): @property def foo(self) -> str: return "bar" print(B().foo) # "bar"
When overriding a variable with a property I get the error:
mypy: error Signature of "foo" incompatible with supertype "A"
The code executes fine, though.
$ mypy --version mypy 0.750 $ python3 --version Python 3.7.5
The only idea I have is, that this overrides a variable which is both an instance variable and a class variable with one that is instance only.
The text was updated successfully, but these errors were encountered:
This code is actually unsafe and mypy is right, you can't override a writeable attribute with a read-only one.
Sorry, something went wrong.
BaseReporter.out
No branches or pull requests
When overriding a variable with a property I get the error:
The code executes fine, though.
The only idea I have is, that this overrides a variable which is both an instance variable and a class variable with one that is instance only.
The text was updated successfully, but these errors were encountered: