Skip to content

Commit

Permalink
enable exclude option when specify directly file args
Browse files Browse the repository at this point in the history
  • Loading branch information
hhatto committed Apr 10, 2020
1 parent ee30211 commit 80ee47c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion autopep8.py
Expand Up @@ -4209,7 +4209,13 @@ def find_files(filenames, recursive, exclude):
if match_file(os.path.join(root, d),
exclude)]
else:
yield name
is_exclude_match = False
for pattern in exclude:
if fnmatch.fnmatch(name, pattern):
is_exclude_match = True
break
if not is_exclude_match:
yield name


def _fix_file(parameters):
Expand Down

0 comments on commit 80ee47c

Please sign in to comment.