-
Notifications
You must be signed in to change notification settings - Fork 15.7k
--pyi_out
does not annotate __slots__
#11402
New issue
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
Comments
I think this is a bug in Mypy (although the bug suggests the issue has been fixed). |
@deannagarcia Changing to using a tuple for |
I was going to ask to reopen because this is still broken, with protoc outputting lists instead of tuples as mentioned by @aiven-anton. But actually, Python's docs on
So protoc is not doing anything wrong, lists should be fine and this is just another Mypy bug: python/mypy#10870 Maybe those affected can upvote there? |
What version of protobuf and what language are you using?
Language: Python
protobuf 4.21.12
grpcio 1.51.1, grpcio-tools 1.51.1,
Mypy 0.991
What operating system (Linux, Windows, ...) and version?
macOS Ventura
What runtime / compiler are you using (e.g., python version or gcc version)
Python 3.9.16
What did you do?
Run
python3 -m grpc_tools.protoc -pyi_out=...
What did you expect to see
A .pyi that validates Mypy type checks.
What did you see instead?
A .pyi that has the following error:
It seems
__slots__
is the only untyped field in the .pyi.The text was updated successfully, but these errors were encountered: