Add Python lint check for calls to unittest.main.#4785
Conversation
|
R: @chamikaramj |
| @@ -64,6 +64,7 @@ echo "Running pycodestyle for module $MODULE:" | |||
| pycodestyle "$MODULE" --exclude="$FILES_TO_IGNORE" | |||
| echo "Running flake8 for module $MODULE:" | |||
| flake8 $MODULE --count --select=E999 --show-source --statistics | |||
There was a problem hiding this comment.
My sense is that E901,E999,F821,F822,F823 are the "showstopper" flake8 issues that can halt the runtime with a SyntaxError, NameError, etc. The other flake8 issues are merely "style violations" -- useful for readability but they do not effect runtime safety.
I would therefore suggest replacing --select=E999 with --select=E901,E999,F822,F823 because the codebase currently passes all of these tests and we would like to avoid any backsliding. We would also want to add F821 (undefined names!) to that list but work must be completed on basestring, buffer(), cmp(), file(), unicode, xrange(), and #4561 before that can be done.
There was a problem hiding this comment.
Hi, did you mean to make a comment on this PR?
There was a problem hiding this comment.
Yes. As long as changes are being made, this is a good one to make as well. Just want to avoid backsliding.
Also add missing unittest.main() calls.