chore: remove references to black from the project #2674
Merged
+23
−7
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
There are a few mentions of
black
in the project, but they seem inconsistent;.github/workflows/docs.yml
, we use black to validate the formatting of Python code in the docs. However, there is no set-up or instructions to format code locally. Of course this is not a big issue; fixing the formatting is trivial when this gives an error by installingblack
..github/workflows/python_build.yml
black
seems to be installed but unused.black
inpython/pyproject.toml
, even though the formatter for the project isruff
.This PR aims to solve these inconsistencies:
black
listed above.ruff
as a formatter for thedocs
to be consistent with thepython
directory.Makefile
to thedocs
directory, with aformat
and acheck
command.Considered alternative
I also considered adding the
make
commands topython/Makefile
, similar to thebuild-docs
command:However, this solution has the disadvantage that we need to either install the complete virtual environment in the
docs.yml
workflow, or hardcode the version ofruff
there, e.g.