Skip to content

Fix ruff lints - #551

Merged
ethteck merged 10 commits into
ethteck:mainfrom
AngheloAlf:fix_ruff_lints
Jul 27, 2026
Merged

ethteck merged 10 commits into
ethteck:mainfrom
AngheloAlf:fix_ruff_lints

Conversation

@AngheloAlf

Copy link
Copy Markdown
Collaborator

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.

@ethteck
ethteck merged commit 1ff5bdd into ethteck:main Jul 27, 2026
29 checks passed
@AngheloAlf
AngheloAlf deleted the fix_ruff_lints branch July 27, 2026 17:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants