Skip to content
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

pyi error for struct_pb2 #977

Closed
dpcollins-google opened this issue Aug 15, 2021 · 2 comments
Closed

pyi error for struct_pb2 #977

dpcollins-google opened this issue Aug 15, 2021 · 2 comments
Labels
bug cat: stubs and 3p type stubs and third-party types

Comments

@dpcollins-google
Copy link

FAILED: /Users/dpcollins/Documents/python-pubsublite/.pytype/pyi/google/cloud/pubsublite/internal/wire/pubsub_context.pyi
/usr/local/Caskroom/miniconda/base/bin/python -m pytype.single --imports_info /Users/dpcollins/Documents/python-pubsublite/.pytype/imports/google.cloud.pubsublite.internal.wire.pubsub_context.imports --module-name google.cloud.pubsublite.internal.wire.pubsub_context -V 3.8 -o /Users/dpcollins/Documents/python-pubsublite/.pytype/pyi/google/cloud/pubsublite/internal/wire/pubsub_context.pyi --analyze-annotated --nofail --quick /Users/dpcollins/Documents/python-pubsublite/google/cloud/pubsublite/internal/wire/pubsub_context.py
File "/Users/dpcollins/Documents/python-pubsublite/google/cloud/pubsublite/internal/wire/pubsub_context.py", line 20, in : Couldn't import pyi for 'google.protobuf.struct_pb2' [pyi-error]
Couldn't find _Type in google.protobuf.descriptor_pb2

when running pytype google.cloud.pubsublite from the root of https://github.com/googleapis/python-pubsublite

@rchen152
Copy link
Contributor

That's one of the type stubs on https://github.com/python/typeshed/blob/master/tests/pytype_exclude_list.txt that pytype can't handle =/ Maybe we should ignore pyi errors in stubs on pytype_exclude_list.

One thing you can do as a workaround is add --disable=pyi-error either to your pytype command-line invocation or in your config file.

@rchen152
Copy link
Contributor

rchen152 commented Feb 1, 2022

Just realized that this issue is the same as #764, so I'm going to close this in favor of the latter.

@rchen152 rchen152 closed this as completed Feb 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug cat: stubs and 3p type stubs and third-party types
Projects
None yet
Development

No branches or pull requests

2 participants