Enable Ruff linting rules (Bugbear, Pyupgrade, Ruff...) #214
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.
Enable the following Ruff linting rules and fix associated errors. See docs for more info on the available rules:
See
pyproject.toml
for full config changes.The linting rules do static analysis to bring things in line with modern Python best practices (according to the version of Python being used in the
pyproject.toml
). Some of these items are autofixed, while other times just flagged by the linter.Note that "best practices" ranges from objective to subjective.
# -*- coding: utf-8 -*-
from the top of files is objectively good, as Python 3 files are all utf8 encoded, so there's no need to flag the encoding.__all__
Rules can be ignored/unselected at the discretion of maintainers.
See a list of the items that were flagged below, their the locations in the codebase, and associated rules.
pre-commit log