Skip to content
This repository has been archived by the owner on Jan 31, 2023. It is now read-only.

Commit

Permalink
tweak for pyflakes plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
Frédéric Chapoton committed Jun 1, 2018
1 parent 1c758d4 commit 7afad82
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions sage_patchbot/plugins.py
Expand Up @@ -241,7 +241,7 @@ def pyflakes(ticket, **kwds):
usually just contain unused import lines, always triggering non-pertinent
pyflakes warnings
same thing for files named "catalog*.py"
same thing for files named "*catalog*.py"
!! one should do something to replace lazy imports by usual imports !!
"""
Expand All @@ -253,7 +253,8 @@ def pyflakes(ticket, **kwds):
for a_file in changed_files:
if os.path.exists(a_file) and isPythonFile(a_file):
filename = os.path.split(a_file)[1]
if filename != "all.py" and filename != "__init__.py" and filename[:7] != "catalog":
if not (filename == "all.py" or filename == "__init__.py" or
"catalog" in filename):
# maybe do pre-processing here using pyflakes_filter ?
errors_here = checkPath(a_file) # run pyflakes
if errors_here:
Expand Down

0 comments on commit 7afad82

Please sign in to comment.