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.
🚀 Pull Request
Description
This pull-request adds the configuration for a no-op
ruff
linter i.e., theruff
linter runs but all rules are ignored, hence there are no compliance exceptions raised.Note that, it adds the
pre-commit
hook to ensure thatruff
(and it's configured rules) are applied for developers usingpre-commit
and on pull-requests via thepre-commit.ci
service.Also note that
ALL
linter rules have been selected in thepyproject.toml
, and each of the currently existing 58ruff
linter rules (see here) have been ignored in the.ruff.toml
configuration file, which extends theruff
configuration defined in thepyproject.toml
.As a strategy going forwards, I'd recommend that we:
pyproject.toml
.ruff.toml
to collate all temporary rule and file exceptions, but aim to address these all over time.Ultimately, the goal would be to have no temporary exceptions in the
.ruff.toml
configuration file. Also, we should always aim to minimize our permanent (documented) exceptions.We can also slowly drop use of all the third-party packages that
ruff
replaces, namely:black
flake8
isort
Taking the above approach will allow us to adopt and become more compliant with
ruff
over time, at our own pace.This strategy is open-ended, in that we have enabled
ALL
linter rules forruff
(with explicitignores
) so that we automatically adopt new non-preview
linter rules by default. If new rules are implemented withinruff
that break us, then either we address them straight away or add temporary/permanent exceptions as we deem fit.Consult Iris pull request check list