backport tfdoc and check doc fixes

This commit is contained in:
Ludovico Magnocavallo
2021-12-22 15:44:43 +01:00
parent a09485201a
commit bf1e2e3bed
2 changed files with 3 additions and 3 deletions

View File

@@ -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:

View File

@@ -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:
@@ -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: