-
-
Save osya/b05d81d0c23c6a51e2b3749fb771f000 to your computer and use it in GitHub Desktop.
Execute `yapf` for all files in a directory #Python
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import glob | |
import subprocess | |
files = glob.iglob('E:/Work/web-frameworks/Python/**/*.py', recursive=True) | |
files_i_care_about = filter(lambda x: all(e not in x for e in ('venv', 'DjangoRESTPostgres')), files) | |
for filename in files_i_care_about: | |
subprocess.call(['yapf', '-vv', '-i', filename]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment