Skip to content

Use ruff instead of black and isort - #78

Merged
max-models merged 2 commits into
develfrom
unify-formatting
Oct 27, 2026
Merged

max-models merged 2 commits into
develfrom
unify-formatting

Conversation

@max-models

Copy link
Copy Markdown
Owner

Part of making the formatting setup the same in all max-models repos.

  • .pre-commit-config.yaml is now the shared one: pre-commit-hooks v6.0.0 (with check-toml), nbstripout 0.9.1, ssort 0.17.0, ruff-check --fix and ruff-format at v0.17.3.
  • ruff is the only formatter and sorts imports (its I rules); CI and make lint also check statement order with ssort.
  • The rest of the diff is pre-commit run --all-files with the new hooks.
  • black and isort are dropped from the dev extra, [tool.black]/[tool.isort] and CI; the ruff job checks the whole repo and is no longer continue-on-error.
  • ruff lints with an explicit rule set (E4, E7, E9, F, I), since its default set grows between releases.
  • Fix: the module-level plot_matplotlib passed fontsize=self._fontsize without a self, a NameError for any node with content; the text now uses the font size the canvas sets in matplotlib's rcParams.
  • Removed an exact duplicate Canvas.legend definition.
  • README.qmd carries the same code formatting as the rendered README.md.

@max-models
max-models merged commit f31e1c6 into devel Oct 27, 2026
13 checks passed
@max-models
max-models deleted the unify-formatting branch October 27, 2026 14:05
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