chore: initial nox and pylint support #1262
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This adds an initial noxfile. No "fly by" contributor docs for it yet, that
will probably come a bit later, after we get editable installs working.
This adds configuration and a nox job for PyLint. I've avoided touching the
code, and instead added suppression with a "TODO" on anything I think we should
work on fixing. I think we could make PRs once in a while removing some of
these suppressions. (Otherwise this becomes too many changes at once). Some are
minor stylistic improvements, sometimes related to Python 3, some are
simplifications, and some are highly bug-prone that probably should be checked
sooner rather than later (marked with
investigate!
).The syntax for disabling inline is
# pylint: disable=<name>
, ordisable-next
to put it on the line before, or it can be at the top of a file.This serves as nice documentation for a user to explain you know you are doing
something a bit naughty.
PyLint also has a bunch of over-the-top checks like
too-many-*
that I'dexpect we would always leave off. This is intentional - it's easier to see and
turn off a check vs. find it and turn it on. I think many of them are in the
"design" group, but I can't see how to tell what is in a group, I only know how
to list all groups (
pylint --list-groups
).