Skip to content
This repository was archived by the owner on Jan 31, 2023. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions sage_patchbot/plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -311,11 +311,9 @@ def find_lazy_imports(a_file):

def pycodestyle(ticket, **kwds):
"""
run ``pycodestyle --select=...`` on the modified .py files
run ``pycodestyle`` on the modified .py files

with --select=W605, E401, E701, E702

see http://pycodestyle.pycqa.org/en/latest/intro.html#error-codes
see http://pycodestyle.pycqa.org/en/latest/intro.html

we do not check the files names "all.py" and "__init__.py" that
usually just contain unused import lines
Expand All @@ -325,7 +323,7 @@ def pycodestyle(ticket, **kwds):
changed_files = list(subprocess.Popen(['git', 'diff', '--name-only', 'patchbot/base..patchbot/ticket_merged'], stdout=subprocess.PIPE).stdout)
changed_files = [f.decode('utf8').strip("\n") for f in changed_files]

style = StyleGuide(select=['W605', 'E401', 'E701', 'E702'])
style = StyleGuide()
errors = 0
for a_file in changed_files:
if os.path.exists(a_file) and os.path.splitext(a_file)[1] == '.py':
Expand Down