Skip to content

Commit 83bd48f

Browse files
[doc] Upgrade doc following the full implementation of pyupgrade in ruff
See astral-sh/ruff#827
1 parent 31f40a9 commit 83bd48f

File tree

5 files changed

+12
-12
lines changed

5 files changed

+12
-12
lines changed

README.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -129,11 +129,11 @@ Advised linters alongside pylint
129129
--------------------------------
130130

131131
Projects that you might want to use alongside pylint include ruff_ (**really** fast,
132-
with builtin auto-fix and a growing number of checks taken from popular
133-
linters but implemented in ``rust``) or flake8_ (faster and simpler checks with very few false positives),
134-
mypy_, pyright_ or pyre_ (typing checks), bandit_ (security oriented checks), black_ and
135-
isort_ (auto-formatting), autoflake_ (automated removal of unused imports or variables),
136-
pyupgrade_ (automated upgrade to newer python syntax) and pydocstringformatter_ (automated pep257).
132+
with builtin auto-fix and a large number of checks taken from popular linters, but
133+
implemented in ``rust``) or flake8_ (a framework to implement your own checks in python using ``ast`` directly),
134+
mypy_, pyright_ / pylance or pyre_ (typing checks), bandit_ (security oriented checks), black_ and
135+
isort_ (auto-formatting), autoflake_ (automated removal of unused imports or variables), pyupgrade_
136+
(automated upgrade to newer python syntax) and pydocstringformatter_ (automated pep257).
137137

138138
.. _ruff: https://github.com/charliermarsh/ruff
139139
.. _flake8: https://github.com/PyCQA/flake8
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1-
pyupgrade_ can fix this issue automatically.
1+
pyupgrade_ or ruff_ can fix this issue automatically.
22

33
.. _pyupgrade: https://github.com/asottile/pyupgrade
4+
.. _ruff: https://docs.astral.sh/ruff/
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1-
pyupgrade_ can fix this issue automatically.
1+
pyupgrade_ or ruff_ can fix this issue automatically.
22

33
.. _pyupgrade: https://github.com/asottile/pyupgrade
4+
.. _ruff: https://docs.astral.sh/ruff/

doc/whatsnew/2/2.11/summary.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Summary -- Release highlights
66

77
In 2.11, we added a new default checker to advise using f-string as it's
88
the most efficient way of formatting strings right now. You can use
9-
`pyupgrade`_ or `flynt`_ to migrate your old ``%`` and ``format()`` automatically.
9+
`pyupgrade`_, `ruff`_ or `flynt`_ to migrate your old ``%`` and ``format()`` automatically.
1010

1111
We added a new extension ``SetMembershipChecker`` that will advise the
1212
use of set for membership test, as it's more performant than lists or tuples.
@@ -29,7 +29,7 @@ to provide knowledge or use case :)
2929
.. _possible-forgotten-f-prefix: https://github.com/pylint-dev/pylint/pull/4787
3030
.. _pyupgrade: https://github.com/asottile/pyupgrade
3131
.. _flynt: https://github.com/ikamensh/flynt
32-
32+
.. _ruff: https://docs.astral.sh/ruff/
3333

3434
New checkers
3535
============

pylint/checkers/base_checker.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -134,9 +134,7 @@ def get_full_documentation(
134134
if reports:
135135
result += get_rst_title(f"{checker_title} Reports", "^")
136136
for report in reports:
137-
result += ":{}: {}\n".format( # pylint: disable=consider-using-f-string
138-
*report[:2]
139-
)
137+
result += f":{report[0]}: {report[1]}\n"
140138
result += "\n"
141139
result += "\n"
142140
return result

0 commit comments

Comments
 (0)