-
Notifications
You must be signed in to change notification settings - Fork 79
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
google.protobuf.any_pb2.global__Any
is not marked as TypeAlias
#600
Comments
yep! Would accept a fix here! |
I am curious why this line
does not cause this lint to fire? It seems like it should also cause the lint to fire - and we would have caught that. |
It's existence in Flake8-pyi not new and has been enabled by default in early 2022: PyCQA/flake8-pyi#101 If you mean that it is raised in typeshed, also not new (same timeline as mentioned above), After bumping mypy-protobuf to v3.6.0 in typeshed I just noticed that in typeshed's usage, that was the last violation of that rule left.
This should hopefully answer that question: https://github.com/PyCQA/flake8-pyi/blob/f60d7e3cdc833dd358b493d2ca80fd187cc38cfb/pyi.py#L1202-L1216 Footnotes
|
this seems relevant
I would argue that its actually false-positive in https://github.com/python/typeshed/blob/7d56cd9a6cf6e0a4ea89c68d0397e197aff32cbe/stubs/protobuf/google/protobuf/any_pb2.pyi#L177 - since that But in any case, we can still aim to fix. Adding a |
You're right, I didn't look further to see it's not
|
#321 added the
TypeAlias
annotation forclass.V
, but using stubs generated by typeshed, there's still a singleY026
(https://github.com/PyCQA/flake8-pyi/blob/main/ERRORCODES.md / https://docs.astral.sh/ruff/rules/type-alias-without-annotation/) violation in https://github.com/python/typeshed/blob/7d56cd9a6cf6e0a4ea89c68d0397e197aff32cbe/stubs/protobuf/google/protobuf/any_pb2.pyi#L177The text was updated successfully, but these errors were encountered: