Skip to content

Commit a51e18d

Browse files
committed
Fixing issue with pycodestyle on restricted lint.
Was an unintended side-effect of #2486.
1 parent f7f79b6 commit a51e18d

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

scripts/pycodestyle_on_repo.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,12 @@ def main():
3535
python_files = [
3636
candidate for candidate in candidates if candidate.endswith('.py')]
3737

38-
pycodestyle_command = ['pycodestyle'] + python_files
39-
status_code = subprocess.call(pycodestyle_command)
40-
sys.exit(status_code)
38+
if not python_files:
39+
print('No Python files to lint, exiting.')
40+
else:
41+
pycodestyle_command = ['pycodestyle'] + python_files
42+
status_code = subprocess.call(pycodestyle_command)
43+
sys.exit(status_code)
4144

4245

4346
if __name__ == '__main__':

0 commit comments

Comments
 (0)