Skip to content

Commit

Permalink
chore: add a few helper comments to doc script
Browse files Browse the repository at this point in the history
  • Loading branch information
danceratopz committed Jun 22, 2023
1 parent 4c402ab commit 4e09ca0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/gen_test_case_reference.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,10 +235,14 @@ def non_recursive_os_walk(top_dir):
all_directories = [directory for directory in fork_directories if os.path.exists(directory)]
all_directories.insert(0, source_directory)

# Loop over directories here instead of walking tests/ to ensure we
# get a reverse chronological listing of forks in the nav bar.
for directory in all_directories:
if directory is source_directory:
# Process files within tests/ but don't walk it recursively.
walk_directory_output = non_recursive_os_walk(directory)
else:
# Walk each tests/fork/ directory recursively.
# sorted() is a bit of a hack to order nav content for each fork
walk_directory_output = sorted(os.walk(directory))
for root, _, files in walk_directory_output:
Expand Down

0 comments on commit 4e09ca0

Please sign in to comment.