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.
ruff
is the hot new linter for Python. It is written in Rust and is extremely fast. It also has tremendous support and constant updates. It replaces some of the existing (pyupgrade
) and planned (e.g.,bandit
,flake8
,isort
, andpylint
) QA tools that are outlined in #14. More new rules are added all the time. The initial configuration enablesALL
rules by default and then selectively ignores specific rules based on conflicts, preference, and existing issues in the backlog.Using
ALL
has the risk that new rules may be enabled whenruff
is updated but updates are automated, with a PR that includes enforced QA checks, to weekly dependency and pre-commit hook bumps. Therefore, the real risk is that a developer on this project may have a local version ofruff
installed that is newer than the one used for thepre-commit
hook. That should limit the exposure to no more than a week of "early" rules and may still result in improved code quality.The list of actions taken in this PR include:
ruff
configuration inpyproject.toml
pyupgrade
pre-commit hookruff
ruff
pre-commit hooknoqa
comments, with reasons, where appropriateisort
configurationCONTRIBUTING
guide to discuss QA expectationsblack
badge to theREADME
to show the formatting style usedRelated to #14