Skip to content

Commit 6b36a12

Browse files
MarkDaoustcopybara-github
authored andcommitted
Don't duplicate the keras path (or any path).
PiperOrigin-RevId: 442754247
1 parent 0c4f1bb commit 6b36a12

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tools/tensorflow_docs/api_generator/doc_generator_visitor.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,8 @@ def __setitem__(self, path: ApiPath, obj: Any):
131131
path: A tuple of strings.
132132
obj: The python object.
133133
"""
134+
assert path not in self
135+
134136
parent_path = path[:-1]
135137
parent = self[parent_path]
136138

0 commit comments

Comments
 (0)