@@ -15,22 +15,28 @@ consistency, and maintainability of the code base.
15
15
16
16
.. _code-style :
17
17
18
- PEP8, as enforced by flake8
19
- ===========================
18
+ PEP8, as enforced by ruff
19
+ =========================
20
20
21
- Formatting should follow the recommendations of PEP8 _, as enforced by flake8 _ .
21
+ Formatting should follow the recommendations of PEP8 _, as enforced by ruff _ .
22
22
Matplotlib modifies PEP8 to extend the maximum line length to 88
23
- characters. You can check flake8 compliance from the command line with ::
23
+ characters. You can check PEP8 compliance from the command line with ::
24
+
25
+ python -m pip install ruff
26
+ ruff check /path/to/module.py
27
+
28
+ or your editor may provide integration with it. To check all files,
29
+ and fix any errors in-place (where possible) run ::
30
+
31
+ ruff check --fix
24
32
25
- python -m pip install flake8
26
- flake8 /path/to/module.py
27
33
28
- or your editor may provide integration with it. Note that Matplotlib intentionally
29
- does not use the black _ auto-formatter ( 1 __), in particular due to its inability
30
- to understand the semantics of mathematical expressions (2 __, 3 __).
34
+ Matplotlib intentionally does not use the black _ auto-formatter ( 1 __),
35
+ in particular due to its inability to understand the semantics of
36
+ mathematical expressions (2 __, 3 __).
31
37
32
38
.. _PEP8 : https://www.python.org/dev/peps/pep-0008/
33
- .. _ flake8 : https://flake8.pycqa.org /
39
+ .. _ ruff : https://docs.astral.sh/ruff /
34
40
.. _black : https://black.readthedocs.io/
35
41
.. __ : https://github.com/matplotlib/matplotlib/issues/18796
36
42
.. __ : https://github.com/psf/black/issues/148
0 commit comments