File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed
doc/user_guide/features/formatting_code Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -27,8 +27,10 @@ For autoformatting, the following tools are used:
2727 packages, third party packages, and local application imports).
2828* `pyupgrade <https://pypi.org/project/pyupgrade/ >`__ - upgrades syntax for newer
2929 versions of the Python language.
30- * `ruff <https://docs.astral.sh/ruff/ >`__ - checks and fixes code per its configuration.
31- Currently, the PTB only supports removing unused imports.
30+ * `ruff <https://docs.astral.sh/ruff/ >`__ - includes a plethora of tools to check and
31+ automatically format code. In the PTB, only the following checks are active:
32+
33+ * `unused-import (F401) <https://docs.astral.sh/ruff/rules/unused-import/ >`__ - removes unused imports
3234
3335In the PTB, these tools are bundled into nox sessions to ensure that they are run in a
3436deterministic manner.
@@ -91,7 +93,7 @@ Ensure ``ruff`` is configured like so:
9193
9294.. literalinclude :: ../../../../project-template/{{cookiecutter.repo_name}}/pyproject.toml
9395 :language: toml
94- :start-at: [tool.ruff]
96+ :start-at: [tool.ruff.lint ]
9597 :end-before: [tool.mypy.overrides]
9698
9799For further configuration options, see
Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ might want to ignore automatically applied formatting.
3939| | <line-to-ignore> # isort:skip| # isort:skip_file |
4040+-----------------------+--------------------------------+-----------------------+
4141| formatting from ruff | .. code-block:: python | .. code-block:: python|
42- | | | |
42+ | (example with F401) | | |
4343| | <line-to-ignore> # noqa: F401| # ruff: noqa F401 |
4444+-----------------------+--------------------------------+-----------------------+
4545
You can’t perform that action at this time.
0 commit comments