We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 72291ea commit f40f951Copy full SHA for f40f951
scripts/pycodestyle_on_repo.py
@@ -23,14 +23,17 @@
23
import subprocess
24
import sys
25
26
+from run_pylint import get_files_for_linting
27
+
28
29
def main():
30
"""Run pycodestyle on all Python files in the repository."""
31
git_root = subprocess.check_output(
32
['git', 'rev-parse', '--show-toplevel']).strip()
33
os.chdir(git_root)
- python_files = subprocess.check_output(['git', 'ls-files', '*py'])
- python_files = python_files.strip().split()
34
+ candidates, _ = get_files_for_linting()
35
+ python_files = [
36
+ candidate for candidate in candidates if candidate.endswith('.py')]
37
38
pycodestyle_command = ['pycodestyle'] + python_files
39
status_code = subprocess.call(pycodestyle_command)
0 commit comments