You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 3, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Sep 3, 2026. It is now read-only.
Pytype cannot handle <class name>.<nested class name> in pyi files #150
For example, third_party/2and3/google/protobuf/descriptor_pb2.pyi contains:
class UninterpretedOption(Message):
class NamePart(Message):
def FromString(cls, s: bytes) -> UninterpretedOption.NamePart: ...
Pytype thinks that UninterpretedOption is an import and goes looking for the corresponding pyi file, leading to: third_party/2and3/google/protobuf/descriptor_pb2.pyi: pytype.load_pytd.BadDependencyError: Can't find pyi for 'google.protobuf.descriptor_pb2.UninterpretedOption', referenced from 'google.protobuf.descriptor_pb2'
One thing that would be useful until we get this bug fixed is to give a clearer error message, so that when it is encountered in hand-crafted stubs, the writer can figure out what's going on.
Activity
Fix parser treating nested classes as constants.
Fix parser treating nested classes as constants.
rchen152 commentedon May 1, 2019
One thing that would be useful until we get this bug fixed is to give a clearer error message, so that when it is encountered in hand-crafted stubs, the writer can figure out what's going on.
Support nested class lookup from other .py and .pyi files.
Support referencing a nested class from within the same top-level class.
Finish supporting nested classes in pyi files.