-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Completes flake8 linting of Python files #66
Conversation
For real this time! Added a `find` command to run `file` on every file and execute flake8 on any that `file` identifies as a Python script. Still running the `flake8 .` command separately. The disadvantage to this approach is that there are two flake8 runs, so errors in the first will cause the Makefile target to exit, without checking the other files. That's acceptable: we'll still catch errors in CI and locally, although it may take two runs of `make flake8` in order to catch them.
All changes were cosmetic, specifically whitespace-related.
Changes are cosmetic, specifically whitespace-related. Modified some command calls by creating a "cmd" variable to aid in readbility (and prevent overly long lines).
Includes changes to multiple scripts under `sd-journalist/`, for Flake8 compliance. Changes were cosmetic.
Substantial diff here, but changes are almost entirely cosmetic. Moved the sys.path.insert call to below the module imports, to resolve several E402s violations.
Only newer versions of Flake8 throw an E305 when two newlines are missing from *after* a function or class declaration. Should be in line with what we're using in CI (which is not pinned to a specific version of flake8 at present).
@@ -111,7 +128,7 @@ if __name__ == '__main__': | |||
d.show() | |||
|
|||
if sigfile != "": | |||
# tyvm https://stackoverflow.com/questions/6215690/how-to-execute-a-method-automatically-after-entering-qt-event-loop | |||
# tyvm https://stackoverflow.com/questions/6215690/how-to-execute-a-method-automatically-after-entering-qt-event-loop # noqa: E501 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm? noqa?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, noqa on E501 permits the extra-long line. I'd much rather skip linting on a URL than break the URL up over multiple lines in order to satisfy the linter!
This looks great to me. I'll run tests once my #67 review is done and if they pass, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests pass, looks good, ship it!
…ke8-linting Completes flake8 linting of Python files
Follow-up to #62, which falsely alleged it linted "all" Python files. It didn't: it only ran
flake8 .
, and trustedflake8
to discover all Python files. Here, we add afind
command to discover Python files, which catches scripts and other helpers that do not end in*.py
.Changes are quite cosmetic, but it's still worth running the test suites locally to ensure no breakage. In particular, don't forget to run the integration tests in the
sd-journalist
VM, as described in the README.