Skip to content

Start applying ruff rules#698

Open
DimitriPapadopoulos wants to merge 21 commits intoMagicStack:masterfrom
DimitriPapadopoulos:ruff
Open

Start applying ruff rules#698
DimitriPapadopoulos wants to merge 21 commits intoMagicStack:masterfrom
DimitriPapadopoulos:ruff

Conversation

@DimitriPapadopoulos
Copy link

I have selected ruff rules that seem to make most sense. My idea is to suggest switching from flake8 to ruff.

@DimitriPapadopoulos DimitriPapadopoulos force-pushed the ruff branch 7 times, most recently from f5ed349 to 8fc45da Compare October 26, 2025 21:59
B009 Do not call `getattr` with a constant attribute value.
     It is not any safer than normal property access.
EXE001 Shebang is present but file is not executable
PIE810 Call `startswith` once with a `tuple`
SLOT000 Subclasses of `str` should define `__slots__`
PERF401 Use a list comprehension to create a transformed list
F401 imported but unused
PLC0208 Use a sequence type instead of a `set` when iterating over values
PLR1722 Use `sys.exit()` instead of `exit`
PLR5501 Use `elif` instead of `else` then `if`, to reduce indentation
PLR6201 Use a set literal when testing for membership
UP006 Use `dict` instead of `Dict` for type annotation
UP006 Use `list` instead of `List` for type annotation
UP007 Use `X | Y` for type annotations
UP020 Use builtin `open`
UP022 Prefer `capture_output` over sending `stdout` and `stderr` to `PIPE`
UP024 Replace aliased errors with `OSError`
UP031 Use format specifiers instead of percent format
UP032 Use f-string instead of `format` call
UP045 Use `X | None` for type annotations
RUF036 `None` not at the end of the type annotation.
RUF046 Value being cast to `int` is already an integer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant