Skip to content

Commit 5ae1433

Browse files
markmcdcopybara-github
authored andcommitted
Teeny cleanup
* `py_object` was unused, so removed * `logger.debug(..., filter)` logs the reserved function, not the local variable * formatter fix PiperOrigin-RevId: 446332127
1 parent 8070490 commit 5ae1433

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

tools/tensorflow_docs/api_generator/generate_lib.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,6 @@ def write_docs(
122122
num_docs_output = 0
123123
for api_node in parser_config.api_tree.iter_nodes():
124124
full_name = api_node.full_name
125-
py_object = api_node.py_object
126125

127126
if api_node.output_type() is api_node.OutputType.FRAGMENT:
128127
continue
@@ -294,9 +293,8 @@ def __init__(
294293
search_hints: bool = True,
295294
site_path: str = 'api_docs/python',
296295
private_map: Optional[Dict[str, str]] = None,
297-
visitor_cls: Type[
298-
doc_generator_visitor.DocGeneratorVisitor] = doc_generator_visitor
299-
.DocGeneratorVisitor,
296+
visitor_cls: Type[doc_generator_visitor.DocGeneratorVisitor] = (
297+
doc_generator_visitor.DocGeneratorVisitor),
300298
api_cache: bool = True,
301299
callbacks: Optional[List[public_api.ApiFilter]] = None,
302300
yaml_toc: Union[bool, Type[toc_lib.TocBuilder]] = True,

tools/tensorflow_docs/api_generator/traverse.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ def get_children(self, root, new_stack, path) -> public_api.Children:
8585
new_names = [n for n, c in children]
8686

8787
if old_names != new_names:
88-
_LOGGER.debug(' filter: %s', filter)
88+
_LOGGER.debug(' filter: %s', fil)
8989
_LOGGER.debug(' children: %s', new_names)
9090

9191
return children

0 commit comments

Comments
 (0)