Skip to content

Apply new ruff rules #10428

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

DimitriPapadopoulos
Copy link
Contributor

Apply rules that seem new to ruff 0.12, and assorted preview rules.

  • Closes #xxxx
  • Tests added
  • User visible changes (including notable bug fixes) are documented in whats-new.rst
  • New functions/methods are listed in api.rst

FURB122 Use of `write` in a for loop
UP045 Use `X | None` for type annotations
PYI061 Use `Literal[...] | None` rather than `Literal[None, ...]`
FURB113 Use `.extend()` instead of repeatedly calling `.append()`
FURB140 Use `itertools.starmap` instead of the generator
RUF027 Possible f-string without an `f` prefix
RUF038 `Literal[True, False, ...]` can be replaced with `Literal[...] | bool`
RUF056 Avoid providing a falsy fallback to `dict.get()` in boolean test positions.
       The default fallback `None` is already falsy.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant