Created
December 7, 2015 02:42
-
-
Save hhatto/e1a344f016e6a6804769 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 os | |
| from fnmatch import fnmatch | |
| import autopep8 | |
| root = '.' | |
| cmd_args = ['dummy', '-d'] | |
| args = autopep8.parse_args(cmd_args) | |
| for dirname, dirs, files in os.walk(root): | |
| print(dirname, dirs, files) | |
| for filename in files: | |
| if fnmatch(filename, '*.py'): | |
| f = os.path.join(dirname, filename) | |
| autopep8.fix_file(f, options=args) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment