Skip to content

Commit

Permalink
[doc] Upgrade doc following the full implementation of pyupgrade in ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
Pierre-Sassoulas committed Oct 2, 2023
1 parent 73985c1 commit 1357028
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
10 changes: 5 additions & 5 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -129,11 +129,11 @@ Advised linters alongside pylint
--------------------------------

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

.. _ruff: https://github.com/charliermarsh/ruff
.. _flake8: https://github.com/PyCQA/flake8
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
pyupgrade_ can fix this issue automatically.
pyupgrade_ or ruff_ can fix this issue automatically.

.. _pyupgrade: https://github.com/asottile/pyupgrade
.. _ruff: https://docs.astral.sh/ruff/
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
pyupgrade_ can fix this issue automatically.
pyupgrade_ or ruff_ can fix this issue automatically.

.. _pyupgrade: https://github.com/asottile/pyupgrade
.. _ruff: https://docs.astral.sh/ruff/
4 changes: 2 additions & 2 deletions doc/whatsnew/2/2.11/summary.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Summary -- Release highlights

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

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

.. _ruff: https://docs.astral.sh/ruff/

New checkers
============
Expand Down
4 changes: 1 addition & 3 deletions pylint/checkers/base_checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,7 @@ def get_full_documentation(
if reports:
result += get_rst_title(f"{checker_title} Reports", "^")
for report in reports:
result += ":{}: {}\n".format( # pylint: disable=consider-using-f-string
*report[:2]
)
result += f":{report[0]}: {report[1]}\n"
result += "\n"
result += "\n"
return result
Expand Down

0 comments on commit 1357028

Please sign in to comment.