Skip to content

Expand ruff lint rule selection - #470

Open
sgrava wants to merge 2 commits into
mainfrom
sg/set-ruff-lint-rules
Open

sgrava wants to merge 2 commits into
mainfrom
sg/set-ruff-lint-rules

Conversation

@sgrava

@sgrava sgrava commented Sep 11, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Widen [tool.ruff.lint] select from E, F, I, Q to also include UP, B, SIM, with a documented ignore list for the rules left for separate discussion (including B905, zip() without strict=).
  • Fix the resulting findings that were addressed: unused loop variables, a redundant isinstance check, dict.keys() iteration, and several pyupgrade/typing modernizations (Optional[X] -> X | None, typing.Callable -> collections.abc.Callable, etc).
  • Drop mccabe.max-complexity and flake8-quotes.docstring-quotes — both configure rule sets (C90, and docstring quoting under D) that aren't in select, so they were dead config.

Rationale

#464 treats pyproject.toml's ruff config as the single source of truth for linting and is about to add the D (docstring) rule set on top of it. Before piling more rules onto that config, this PR turns on the other rule categories ruff already ships that we weren't using yet, fixes the findings that are genuine cleanups, and ignores the rest (including B905) for now — so the next docstring-focused PR lands on an intentionally-configured baseline instead of an implicit one.

@github-actions

Copy link
Copy Markdown
PR Preview Action v1.8.1

🚀 View preview at
https://pasqal-io.github.io/qoolqit/pr-preview/pr-470/

Built to branch gh-pages at 2026-09-11 10:37 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

@sgrava sgrava added this to the v1.4.1 milestone Sep 11, 2026
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.

1 participant