executablebooks / sphinx-book-theme

A clean book theme for scientific explanations and documentation with Sphinx
https://sphinx-book-theme.readthedocs.io
BSD 3-Clause "New" or "Revised" License
413 stars 196 forks source link

Switch to `ruff` #769

Closed adam-grant-hendry closed 8 months ago

adam-grant-hendry commented 9 months ago

Context

flake8 takes a long time to run (i.e. pre-commit). It would be nicer to use ruff.

Proposal

  1. Remove flake8 as a dependency, including the .flake8 file.
  2. Add ruff rules to pyproject.toml file
  3. Modify .pre-commit-config.yaml to use ruff

Tasks and updates

choldgraf commented 8 months ago

Makes sense to me - I think that @agoose77 recently updated to ruff on some other projects in EB as well.

adam-grant-hendry commented 8 months ago

@choldgraf @agoose77 flake8 takes the longest linting time, not black. Can we reopen this until we switch from flake8 to ruff?

agoose77 commented 8 months ago

We should do both - let me check, I thought I'd removed flake8 but it's been a very long week...