@@ -15,7 +15,7 @@ $ cd libvcs
1515```
1616
1717``` console
18- $ poetry install -E " docs test coverage lint format "
18+ $ poetry install -E " docs test coverage lint"
1919```
2020
2121Makefile commands prefixed with ` watch_ ` will watch files and rerun.
@@ -49,69 +49,100 @@ Rebuild docs on file change: `make watch_docs` (requires [entr(1)])
4949Rebuild docs and run server via one terminal: ` make dev_docs ` (requires above, and a ` make(1) ` with
5050` -J ` support, e.g. GNU Make)
5151
52- ## Formatting
52+ ## Formatting / linting
5353
54- The project uses [ black] and [ isort] (one after the other). Configurations are in ` pyproject.toml `
55- and ` setup.cfg ` :
54+ ### ruff
5655
57- - ` make black isort ` : Run ` black ` first, then ` isort ` to handle import nuances
58-
59- ## Linting
60-
61- [ flake8] and [ mypy] run via CI in our GitHub Actions. See the configuration in ` pyproject.toml ` and
62- ` setup.cfg ` .
63-
64- ### flake8
65-
66- [ flake8] provides fast, reliable, barebones styling and linting.
56+ The project uses [ ruff] to handles formatting, sorting imports and linting.
6757
6858```` {tab} Command
6959
7060poetry:
7161
7262```console
73- $ poetry run flake8
63+ $ poetry run ruff
7464```
7565
7666If you setup manually:
7767
7868```console
79- $ flake8
69+ $ ruff .
8070```
8171
8272````
8373
8474```` {tab} make
8575
8676```console
87- $ make flake8
77+ $ make ruff
8878```
8979
9080````
9181
9282```` {tab} Watch
9383
9484```console
95- $ make watch_flake8
85+ $ make watch_ruff
9686```
9787
9888requires [`entr(1)`].
9989
10090````
10191
102- ```` {tab} Configuration
92+ ```` {tab} Fix files
93+
94+ poetry:
95+
96+ ```console
97+ $ poetry run ruff . --fix
98+ ```
99+
100+ If you setup manually:
101+
102+ ```console
103+ $ ruff . --fix
104+ ```
105+
106+ ````
107+
108+ ### mypy
109+
110+ [ mypy] is used for static type checking.
111+
112+ ```` {tab} Command
113+
114+ poetry:
115+
116+ ```console
117+ $ poetry run mypy .
118+ ```
119+
120+ If you setup manually:
121+
122+ ```console
123+ $ mypy .
124+ ```
125+
126+ ````
127+
128+ ```` {tab} make
129+
130+ ```console
131+ $ make mypy
132+ ```
103133
104- See `[flake8]` in setup.cfg.
134+ ````
105135
106- ```{literalinclude} ../../setup.cfg
107- :language: ini
108- :start-at: "[flake8]"
109- :end-before: "[isort]"
136+ ```` {tab} Watch
110137
138+ ```console
139+ $ make watch_mypy
111140```
112141
142+ requires [`entr(1)`].
113143````
114144
145+
115146### mypy
116147
117148[ mypy] is used for static type checking.
@@ -202,7 +233,5 @@ Update `__version__` in `__about__.py` and `pyproject.toml`::
202233[ poetry ] : https://python-poetry.org/
203234[ entr(1) ] : http://eradman.com/entrproject/
204235[ `entr(1)` ] : http://eradman.com/entrproject/
205- [ black ] : https://github.com/psf/black
206- [ isort ] : https://pypi.org/project/isort/
207- [ flake8 ] : https://flake8.pycqa.org/
236+ [ ruff ] : https://ruff.rs
208237[ mypy ] : http://mypy-lang.org/
0 commit comments