Skip to content

Commit b739f3d

Browse files
MarkDaoustcopybara-github
authored andcommitted
Fix failing tf nightly py api build.
PiperOrigin-RevId: 533481250
1 parent 0c2cf1d commit b739f3d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tools/tensorflow_docs/api_generator/parser.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,10 @@ def _get_raw_docstring(py_object):
109109
if result is None:
110110
result = ''
111111

112+
lines = result.splitlines()
113+
if lines and 'GENERATED' in lines[0]:
114+
result = ''
115+
112116
result = _StripTODOs()(result)
113117
result = _StripPylintAndPyformat()(result)
114118
result = _AddDoctestFences()(result + '\n')
@@ -730,7 +734,7 @@ def get_defined_in(
730734
end_line = None
731735
else:
732736
end_line = start_line + len(lines) - 1
733-
if 'MACHINE GENERATED' in lines[0]:
737+
if 'GENERATED' in lines[0]:
734738
# don't link to files generated by tf_export
735739
return None
736740

0 commit comments

Comments
 (0)