Fix ignore venv in build_directory_md.py (#11156)

Co-authored-by: MICHAEL CASTLE <CASTLM@tdm.local>
This commit is contained in:
MC 2023-11-16 19:00:48 +08:00 committed by GitHub
parent 0e2e6abd6f
commit 5f61af4fbb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View File

@ -6,7 +6,11 @@ from collections.abc import Iterator
def good_file_paths(top_dir: str = ".") -> Iterator[str]:
for dir_path, dir_names, filenames in os.walk(top_dir):
dir_names[:] = [d for d in dir_names if d != "scripts" and d[0] not in "._"]
dir_names[:] = [
d
for d in dir_names
if d != "scripts" and d[0] not in "._" and "venv" not in d
]
for filename in filenames:
if filename == "__init__.py":
continue