Skip to content

Commit cf5f08d

Browse files
rchen152copybara-github
authored andcommitted
Silence some pytype errors.
PiperOrigin-RevId: 492017029
1 parent 89da005 commit cf5f08d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

tools/tensorflow_docs/api_generator/parser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def is_class_attr(full_name, index):
4444
True if the object is a class attribute.
4545
"""
4646
parent_name = full_name.rsplit('.', 1)[0]
47-
if inspect.isclass(index[parent_name]):
47+
if inspect.isclass(index[parent_name]): # pytype: disable=not-supported-yet
4848
return True
4949

5050
return False

tools/tensorflow_docs/api_generator/public_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def get_module_base_dirs(module) -> Tuple[pathlib.Path, ...]:
5959
# available in `__path__._path`.
6060
# https://www.python.org/dev/peps/pep-0451/
6161
# This is a **list of paths**.
62-
base_dirs = module.__path__._path # pylint: disable=protected-access
62+
base_dirs = module.__path__._path # pylint: disable=protected-access # pytype: disable=attribute-error
6363
elif mod_file.endswith('__init__.py'):
6464
# A package directory will have an `__init__.py`,
6565
# accept anything in that directory.

0 commit comments

Comments
 (0)