@@ -267,35 +267,34 @@ Python
267267Godot's SCons buildsystem is written in Python, and various scripts included
268268in the source tree are also using Python.
269269
270- For those, we follow the `Black style guide <https://github.com/psf/black#the-black-code-style >`__.
271- Blacken your Python changes using `Black <https://pypi.org/project/black/ >`__.
270+ For those, we use the `Ruff linter and code formatter <https://docs.astral.sh/ruff/ >`__.
272271
273- Using black locally
272+ Using ruff locally
274273~~~~~~~~~~~~~~~~~~~
275274
276- First of all, you will need to install Black. Black requires Python 3.7+ to run.
275+ First of all, you will need to install Ruff. Ruff requires Python 3.7+ to run.
277276
278277Installation
279278^^^^^^^^^^^^
280279
281- Here's how to install black :
280+ Here's how to install ruff :
282281
283282::
284283
285- pip3 install black --user
284+ pip3 install ruff --user
286285
287286
288- You then have different possibilities to apply black to your changes:
287+ You then have different possibilities to apply ruff to your changes:
289288
290289Manual usage
291290^^^^^^^^^^^^
292291
293- You can apply ``black `` manually to one or more files with the following
292+ You can apply ``ruff `` manually to one or more files with the following
294293command:
295294
296295::
297296
298- black -l 120 <path/to/file(s)>
297+ ruff -l 120 <path/to/file(s)>
299298
300299- ``-l 120 `` means that the allowed number of characters per line is 120.
301300 This number was agreed upon by the developers.
@@ -307,8 +306,8 @@ Pre-commit hook
307306~~~~~~~~~~~~~~~
308307
309308For ease of use, we provide hooks for Git with the `pre-commit <https://pre-commit.com/ >`__
310- Python framework that will run ``black `` automatically on all your commits with the
311- correct version of ``black ``.
309+ Python framework that will run ``ruff `` automatically on all your commits with the
310+ correct version of ``ruff ``.
312311To set up:
313312
314313::
@@ -319,7 +318,7 @@ To set up:
319318
320319You can also run the hook manually with ``pre-commit run ``.
321320
322- .. note ::
321+ .. note ::
323322
324323 Previously, we supplied a hook in the folder ``misc/hooks ``. If you copied the
325324 script manually, these hooks should still work, but symlinks will be broken.
@@ -331,8 +330,8 @@ Editor integration
331330^^^^^^^^^^^^^^^^^^
332331
333332Many IDEs or code editors have beautifier plugins that can be configured to run
334- black automatically, for example, each time you save a file. For details, you can
335- check `Black editor integration <https://github.com/psf/black#editor-integration >`__.
333+ ruff automatically, for example, each time you save a file. For details, you can
334+ check `Ruff Integrations <https://docs.astral.sh/ruff/integrations/ >`__.
336335
337336Comment style guide
338337-------------------
0 commit comments