Skip to content
This repository was archived by the owner on Mar 10, 2024. It is now read-only.

Conversation

@CJ-Wright
Copy link
Member

No description provided.

# walk all the files looking for python files
for root, dirs, files in tqdm(os.walk(top_dir)):
_files = [f for f in files if f.endswith(".py")]
for file in _files:
Copy link
Contributor

@mariusvniekerk mariusvniekerk Nov 30, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you might only want to walk _files if there is a __init__.py (unless its one of those non directory packages)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, those non-directory pkgs has burned me in the past.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants