Skip to content

Commit

Permalink
hide <some digit>
Browse files Browse the repository at this point in the history
  • Loading branch information
astonzhang committed Mar 12, 2020
1 parent 8eea2f0 commit 7af3c6e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion d2lbook/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,13 @@ def hide_individual_data_files(fns):
seen_data = True
i += 1
if i < len(fn_components) - 1:
concise_fn.append(fn_components[i + 1])
next_component = fn_components[i + 1]
if next_component.isdigit():
concise_fn.append('<some digit>')
else:
concise_fn.append(next_component)
if i < len(fn_components) - 2:
concise_fn.append('') # For indicating dir instead of file
concise_fns.add('/'.join(concise_fn))
return concise_fns

Expand Down

0 comments on commit 7af3c6e

Please sign in to comment.