Skip to content

Commit db64727

Browse files
committed
Update instructions to check style of notebooks
1 parent eed4dc8 commit db64727

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

notebooks/contributing/formatting.md

+11-9
Original file line numberDiff line numberDiff line change
@@ -262,28 +262,30 @@ When generating a figure, please ensure:
262262

263263
## Check Style of Notebooks
264264

265-
We can check and autoformat the code style within the notebooks using [`ruff`][ruff] and
266-
[`nbqa`][nbqa].
265+
We can check the code style of our notebooks using [`ruff`][ruff].
266+
Simply run the following command to check the style of the notebooks:
267267

268-
To check the style of the notebooks:
268+
```bash
269+
ruff check notebooks
270+
```
271+
272+
You can run the following that the notebooks are correctly formatted:
269273

270274
```bash
271-
nbqa ruff notebooks
275+
ruff format --check notebooks
272276
```
273277

274-
To perform auto reformatting on the notebooks:
278+
And run this to autoformat them:
275279

276280
```bash
277-
nbqa ruff --fix notebooks
281+
ruff format --fix notebooks
278282
```
279283

280284
Alternatively, you can use the targets we have in the `Makefile`, like `make
281285
check` and `make format`. Read more information about the available targets
282286
by running `make help`.
283287

284-
285-
286-
288+
[ruff]: https://astral.sh/ruff
287289
[install-mystmd]: https://mystmd.org/guide/quickstart
288290
[jupyter]: https://jupyter.org
289291
[mystmd.org]: https://mystmd.org

0 commit comments

Comments
 (0)