mirror of
https://github.com/PyCQA/flake8.git
synced 2026-04-12 07:44:16 +00:00
I'm not exactly a fan of skip_file taking pep8style.
This commit is contained in:
commit
70a75d8f08
1 changed files with 5 additions and 3 deletions
|
|
@ -42,15 +42,17 @@ def _get_python_files(paths):
|
||||||
for path in paths:
|
for path in paths:
|
||||||
if os.path.isdir(path):
|
if os.path.isdir(path):
|
||||||
for dirpath, dirnames, filenames in os.walk(path):
|
for dirpath, dirnames, filenames in os.walk(path):
|
||||||
|
if pep8style.excluded(dirpath):
|
||||||
|
continue
|
||||||
for filename in filenames:
|
for filename in filenames:
|
||||||
if not filename.endswith('.py'):
|
if not filename.endswith('.py'):
|
||||||
continue
|
continue
|
||||||
fullpath = os.path.join(dirpath, filename)
|
fullpath = os.path.join(dirpath, filename)
|
||||||
if not skip_file(fullpath):
|
if not skip_file(fullpath) or pep8style.excluded(fullpath):
|
||||||
yield fullpath
|
yield fullpath
|
||||||
|
|
||||||
else:
|
else:
|
||||||
if not skip_file(path):
|
if not skip_file(path) or pep8style.excluded(fullpath):
|
||||||
yield path
|
yield path
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -94,7 +96,7 @@ def _get_files(repo, **kwargs):
|
||||||
seen.add(file_)
|
seen.add(file_)
|
||||||
if not file_.endswith('.py'):
|
if not file_.endswith('.py'):
|
||||||
continue
|
continue
|
||||||
if skip_file(file_):
|
if skip_file(file_, pep8style):
|
||||||
continue
|
continue
|
||||||
yield file_
|
yield file_
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue