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
Bug report. Mypy version: mypy 0.730+dev.445020f0ed9939b43371edbddcf5b083a706d6d8
Code:
class A(Protocol): __slots__ = ()
Expected:
Passes, and __slots__ is not part of the Protocol interface. It's just being provided to prevent subclasses from being forced to have a __dict__.
__slots__
__dict__
Actual:
error: All protocol members must have explicitly declared types
The text was updated successfully, but these errors were encountered:
This is a definitely a bug, though should be easy to work around with a type: ignore. It should be pretty easy to fix if you want to take a look
type: ignore
Sorry, something went wrong.
Allow protocols with untyped "__slots__" (#9314)
55cffc1
Closes #7290. Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
--pyi_out
Successfully merging a pull request may close this issue.
Bug report. Mypy version: mypy 0.730+dev.445020f0ed9939b43371edbddcf5b083a706d6d8
Code:
Expected:
Passes, and
__slots__
is not part of the Protocol interface. It's just being provided to prevent subclasses from being forced to have a__dict__
.Actual:
The text was updated successfully, but these errors were encountered: