Page MenuHomePhabricator

Fix issues found by flake8
Closed, ResolvedPublic

Description

Tracker contains some lint errors catched by flake8 (the list is on the bottom of the task) that are currently ignored [currently ~420 lint errors] (see ignore section in https://github.com/wikimedia/wikimedia-cz-tracker/blob/master/tox.ini, starting from line 39).

How to fix an error

(all paths here are from the root of the repository)

  1. Choose an error from the list below
  2. Delete the error and its comment from /tox.ini
  3. Run tox -e lint to run only lint and see where the error is
  4. Fix the error reported by the command until the command from step 3 reports no errors.

Errors

$ tox -e lint | grep '^\.' | sed 's/: /@/g' | cut -d @ -f 2 | sed 's/^ //g;s/too long.*$/too long/g;s/undefined name .*$/undefined name "*"/g;s/\(.\)from .* import \*\(.\)/\1from x import */g;s/ \(.\).*\(.\) may be undefined, or defined/ \1x\2 may be undefined, or defined/g' | sort | uniq -c | sort -k1,1nr -k2
    616 E501 line too long
     33 F405 'x' may be undefined, or defined from star imports
     10 E128 continuation line under-indented for visual indent
      2 F403 'from x import * used; unable to detect undefined names
      2 F821 undefined name "*"

Event Timeline

Change 459599 had a related patch set uploaded (by Urbanecm; owner: Urbanecm):
[wikimedia-cz/tracker@master] Fix "blank line contains whitespace" lint error

https://gerrit.wikimedia.org/r/459599

Change 459604 had a related patch set uploaded (by Urbanecm; owner: Urbanecm):
[wikimedia-cz/tracker@master] Fix "local variable 'x' is assigned to but never used" lint error

https://gerrit.wikimedia.org/r/459604

Change 459612 had a related patch set uploaded (by Urbanecm; owner: Urbanecm):
[wikimedia-cz/tracker@master] Fix "whitespace before ','"

https://gerrit.wikimedia.org/r/459612

Change 459613 had a related patch set uploaded (by Urbanecm; owner: Urbanecm):
[wikimedia-cz/tracker@master] Fix "whitespace after '{'"

https://gerrit.wikimedia.org/r/459613

Change 459614 had a related patch set uploaded (by Urbanecm; owner: Urbanecm):
[wikimedia-cz/tracker@master] Fix "expected 1 blank line, found 0"

https://gerrit.wikimedia.org/r/459614

Change 459615 had a related patch set uploaded (by Urbanecm; owner: Urbanecm):
[wikimedia-cz/tracker@master] Fix "too many blank lines" lint error

https://gerrit.wikimedia.org/r/459615

Change 459616 had a related patch set uploaded (by Urbanecm; owner: Urbanecm):
[wikimedia-cz/tracker@master] Fix "redefinition of unused 'X' from line y" lint error

https://gerrit.wikimedia.org/r/459616

Change 459599 merged by jenkins-bot:
[wikimedia-cz/tracker@master] Fix "blank line contains whitespace" lint error

https://gerrit.wikimedia.org/r/459599

Change 459616 merged by jenkins-bot:
[wikimedia-cz/tracker@master] Fix "redefinition of unused 'X' from line y" lint error

https://gerrit.wikimedia.org/r/459616

Change 459613 merged by jenkins-bot:
[wikimedia-cz/tracker@master] Fix "whitespace after '{'"

https://gerrit.wikimedia.org/r/459613

Change 459614 merged by jenkins-bot:
[wikimedia-cz/tracker@master] Fix "expected 1 blank line, found 0"

https://gerrit.wikimedia.org/r/459614

Change 459612 merged by jenkins-bot:
[wikimedia-cz/tracker@master] Fix "whitespace before ','"

https://gerrit.wikimedia.org/r/459612

Change 459615 merged by jenkins-bot:
[wikimedia-cz/tracker@master] Fix "too many blank lines" lint error

https://gerrit.wikimedia.org/r/459615

Urbanecm moved this task from Inbox to Working on on the WMCZ-Tracker board.

Change 459604 merged by jenkins-bot:
[wikimedia-cz/tracker@master] Fix "local variable 'x' is assigned to but never used" lint error

https://gerrit.wikimedia.org/r/459604

Change 462703 had a related patch set uploaded (by Urbanecm; owner: Urbanecm):
[wikimedia-cz/tracker@master] Fix lint error F401

https://gerrit.wikimedia.org/r/462703

Change 462703 merged by jenkins-bot:
[wikimedia-cz/tracker@master] Fix lint error F401

https://gerrit.wikimedia.org/r/462703

Urbanecm removed a project: Patch-For-Review.
Urbanecm updated the task description. (Show Details)
Urbanecm added a subscriber: good first task.

Change 469895 had a related patch set uploaded (by Nathan fraignt; owner: Nathan fraignt):
[wikimedia-cz/tracker@master] Fix Flake8 Violations

https://gerrit.wikimedia.org/r/469895

Change 469895 merged by jenkins-bot:
[wikimedia-cz/tracker@master] Fix Flake8 Violations

https://gerrit.wikimedia.org/r/469895

Change 470231 had a related patch set uploaded (by Pipix; owner: Pipix):
[wikimedia-cz/tracker@master] Fix Flake8 Violatons

https://gerrit.wikimedia.org/r/470231

Change 470231 merged by jenkins-bot:
[wikimedia-cz/tracker@master] Fix Flake8 Violatons

https://gerrit.wikimedia.org/r/470231

Change 470235 had a related patch set uploaded (by Arcayn; owner: Arcayn):
[wikimedia-cz/tracker@master] Fix three Flake8 issues for ~180 total occurences:

https://gerrit.wikimedia.org/r/470235

Change 470235 merged by jenkins-bot:
[wikimedia-cz/tracker@master] Fix three Flake8 issues for ~180 total occurences:

https://gerrit.wikimedia.org/r/470235

Change 470238 had a related patch set uploaded (by Pipix; owner: Pipix):
[wikimedia-cz/tracker@master] Fix Flake8 Violations

https://gerrit.wikimedia.org/r/470238

Change 470238 merged by jenkins-bot:
[wikimedia-cz/tracker@master] Fix Flake8 Violations

https://gerrit.wikimedia.org/r/470238

Change 470424 had a related patch set uploaded (by Rafidaslam; owner: Rafid Aslam):
[wikimedia-cz/tracker@master] Fix flake8 E221, E251, E701 violations

https://gerrit.wikimedia.org/r/470424

Change 470424 merged by jenkins-bot:
[wikimedia-cz/tracker@master] Fix flake8 E221, E251, E701 violations

https://gerrit.wikimedia.org/r/470424

Change 471506 had a related patch set uploaded (by Zoranzoki21; owner: Zoranzoki21):
[wikimedia-cz/tracker@master] Fix flake8 W292 violations

https://gerrit.wikimedia.org/r/471506

Change 471506 merged by jenkins-bot:
[wikimedia-cz/tracker@master] Fix flake8 W292 violations

https://gerrit.wikimedia.org/r/471506