Repository navigation
Fix ruff lints - #551
Merged
Merged
Fix ruff lints#551
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Newest ruff version enabled a bunch of new lints by default.
Fixing them all would be a huge PR, so instead I fixed the ones that required minimal changes and left the remaining ones for discussion.
Here is the list of all the lints that were enabled by ruff and I fixed.
https://docs.astral.sh/ruff/rules/unnecessary-generator-set/
https://docs.astral.sh/ruff/rules/unnecessary-collection-call/
https://docs.astral.sh/ruff/rules/shebang-not-executable/
https://docs.astral.sh/ruff/rules/print-empty-string/
https://docs.astral.sh/ruff/rules/for-loop-writes/
https://docs.astral.sh/ruff/rules/slice-to-remove-prefix-or-suffix/
https://docs.astral.sh/ruff/rules/implicit-string-concatenation-in-collection-literal/
https://docs.astral.sh/ruff/rules/manual-list-copy/
https://docs.astral.sh/ruff/rules/unnecessary-placeholder/
https://docs.astral.sh/ruff/rules/dict-index-missing-items/
https://docs.astral.sh/ruff/rules/if-stmt-min-max/
https://docs.astral.sh/ruff/rules/subprocess-run-without-check/
https://docs.astral.sh/ruff/rules/explicit-f-string-type-conversion/
https://docs.astral.sh/ruff/rules/unnecessary-iterable-allocation-for-first-element/
https://docs.astral.sh/ruff/rules/unused-unpacked-variable/
https://docs.astral.sh/ruff/rules/negate-equal-op/
https://docs.astral.sh/ruff/rules/raise-vanilla-class/
https://docs.astral.sh/ruff/rules/type-check-without-type-error/
https://docs.astral.sh/ruff/rules/open-alias/
https://docs.astral.sh/ruff/rules/lru-cache-with-maxsize-none/
I think it would be nice to enable some of the remaining ones, but I didn't want to make a massive PR.