Skip to content

Commit

Permalink
docs(developing): Use ruff format
Browse files Browse the repository at this point in the history
  • Loading branch information
tony committed Nov 18, 2023
1 parent e74268f commit 6d1e0a0
Showing 1 changed file with 27 additions and 29 deletions.
56 changes: 27 additions & 29 deletions docs/developing.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,86 +54,84 @@ Rebuild docs and run server via one terminal: `make dev_docs` (requires above, a

## Linting

### black
### ruff

[black] is used for formatting.
The project uses [ruff] to handles formatting, sorting imports and linting.

````{tab} Command
poetry:
```console
$ poetry run black .
$ poetry run ruff
```
If you setup manually:
```console
$ black .
$ ruff .
```
````

````{tab} make
```console
$ make black
$ make ruff
```
````

In the future, `ruff` (below) may replace black as formatter.
````{tab} Watch
### ruff
```console
$ make watch_ruff
```
The project uses [ruff] to handles formatting, sorting imports and linting.
requires [`entr(1)`].
````{tab} Command
````

````{tab} Fix files
poetry:
```console
$ poetry run ruff
$ poetry run ruff . --fix
```
If you setup manually:
```console
$ ruff .
$ ruff . --fix
```
````

````{tab} make
#### ruff format

```console
$ make ruff
```
[ruff format] is used for formatting.

````
````{tab} Command
````{tab} Watch
poetry:
```console
$ make watch_ruff
$ poetry run ruff format .
```
requires [`entr(1)`].
````

````{tab} Fix files
poetry:
If you setup manually:
```console
$ poetry run ruff . --fix
$ ruff format .
```
If you setup manually:
````

````{tab} make
```console
$ ruff . --fix
$ make format
```
````
Expand Down Expand Up @@ -236,6 +234,6 @@ Update `__version__` in `__about__.py` and `pyproject.toml`::
[poetry]: https://python-poetry.org/
[entr(1)]: http://eradman.com/entrproject/
[`entr(1)`]: http://eradman.com/entrproject/
[black]: https://github.com/psf/black
[ruff format]: https://docs.astral.sh/ruff/formatter/
[ruff]: https://ruff.rs
[mypy]: http://mypy-lang.org/

0 comments on commit 6d1e0a0

Please sign in to comment.