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
439 stars 201 forks source link

Switch to `ruff` #769

Closed adam-grant-hendry closed 1 year ago

adam-grant-hendry commented 1 year 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 1 year 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 1 year ago

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

agoose77 commented 1 year ago

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