Skip to content

filter example subdir files by shown type #29

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions get_imports.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,11 +220,15 @@ def get_files_for_example(example_path):
for _sub_dir in cur_tuple[1]:
dir_tuple = (dir_tuple[0], dir_tuple[1] + (_sub_dir,))
for _sub_file in cur_tuple[2]:
dir_tuple = (dir_tuple[0], dir_tuple[1] + (_sub_file,))
if _sub_file.split(".")[-1] in SHOWN_FILETYPES_EXAMPLE:
dir_tuple = (dir_tuple[0], dir_tuple[1] + (_sub_file,))

# e.g. ("dir_name", ("file_1.txt", "file_2.txt"))

if ".circuitpython.skip-screenshot" not in dir_tuple[1]:
if (
".circuitpython.skip-screenshot" not in dir_tuple[1]
and len(dir_tuple[1]) > 0
):
found_files.add(dir_tuple)
return found_files

Expand Down