MCPcopy Create free account
hub / github.com/TheAlgorithms/Python / good_file_paths

Function good_file_paths

scripts/build_directory_md.py:7–18  ·  view source on GitHub ↗
(top_dir: str = ".")

Source from the content-addressed store, hash-verified

5
6
7def good_file_paths(top_dir: str = ".") -> Iterator[str]:
8 for dir_path, dir_names, filenames in os.walk(top_dir):
9 dir_names[:] = [
10 d
11 for d in dir_names
12 if d != "scripts" and d[0] not in "._" and "venv" not in d
13 ]
14 for filename in filenames:
15 if filename == "__init__.py":
16 continue
17 if os.path.splitext(filename)[1] in (".py", ".ipynb"):
18 yield os.path.join(dir_path, filename).lstrip("./")
19
20
21def md_prefix(indent: int) -> str:

Callers 2

print_directory_mdFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected