Massmailer contains some lint errors found by flake8 that are currently ignored (see https://github.com/wikimedia/labs-tools-massmailer/blob/master/tox.ini, starting line 24).
How to fix an error
(all paths here are from the root of the repository)
- Choose an error from the list below
- Delete the error and its comment from /tox.ini
- Run tox -e lint to run only lint and see where the error is
- 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;s/..*. imported but unused/x imported but unused/g' | sort | uniq -c | sort -k1,1nr -k2 22 E117 over-indented 7 x imported but unused 6 E101 indentation contains mixed spaces and tabs 6 E122 continuation line missing indentation or outdented 6 E302 expected 2 blank lines, found 1 1 E305 expected 2 blank lines after class or function definition, found 1 1 E711 comparison to None should be 'if cond is not None:' 1 F811 redefinition of unused 'redirect' from line 21