Skip to content

Commit

Permalink
backport tfdoc and check doc fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ludoo committed Dec 22, 2021
1 parent a094852 commit bf1e2e3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tools/check_documentation.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def main(dirs, files=False, show_extra=False):
state_labels = {State.FAIL: '✗', State.OK: '✓', State.SKIP: '?'}
for dir_name in dirs:
print(f'----- {dir_name} -----')
for mod_name, state in _check_dir(dir_name):
for mod_name, state in _check_dir(dir_name, files, show_extra):
errors += 1 if state == State.FAIL else 0
print(f'[{state_labels[state]}] {mod_name}')
if errors:
Expand Down
4 changes: 2 additions & 2 deletions tools/tfdoc.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ def _escape(s):
return ''.join(c if c in UNESCAPED else ('&#%s;' % ord(c)) for c in s)


def format_doc(outputs, variables, files, show_extra=True):
def format_doc(outputs, variables, files, show_extra=False):
'Return formatted document.'
buffer = []
if files:
Expand Down Expand Up @@ -323,7 +323,7 @@ def get_doc(readme):

def create_doc(module_path, files=False, show_extra=False):
try:
mod_files = list(parse_files(module_path)) if files else None
mod_files = list(parse_files(module_path)) if files else []
mod_variables = list(parse_variables(module_path))
mod_outputs = list(parse_outputs(module_path))
except (IOError, OSError) as e:
Expand Down

0 comments on commit bf1e2e3

Please sign in to comment.