From c0539f26f8909de55bc734aaecf1423c2d1a7076 Mon Sep 17 00:00:00 2001 From: Pierre Sassoulas Date: Sun, 1 Oct 2023 10:52:36 +0200 Subject: [PATCH] [doc] Upgrade doc following the full implementation of pyupgrade in ruff See https://github.com/astral-sh/ruff/issues/827 --- README.rst | 10 ++++------ .../c/consider-using-dict-comprehension/details.rst | 3 ++- .../c/consider-using-set-comprehension/details.rst | 3 ++- doc/whatsnew/2/2.11/summary.rst | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/README.rst b/README.rst index bbb4c4f60e2..1c7976f4a72 100644 --- a/README.rst +++ b/README.rst @@ -129,11 +129,10 @@ 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), and pydocstringformatter_ (automated pep257). .. _ruff: https://github.com/charliermarsh/ruff .. _flake8: https://github.com/PyCQA/flake8 @@ -143,7 +142,6 @@ pyupgrade_ (automated upgrade to newer python syntax) and pydocstringformatter_ .. _pyre: https://github.com/facebook/pyre-check .. _black: https://github.com/psf/black .. _autoflake: https://github.com/myint/autoflake -.. _pyupgrade: https://github.com/asottile/pyupgrade .. _pydocstringformatter: https://github.com/DanielNoord/pydocstringformatter .. _isort: https://pycqa.github.io/isort/ diff --git a/doc/data/messages/c/consider-using-dict-comprehension/details.rst b/doc/data/messages/c/consider-using-dict-comprehension/details.rst index c287fc4847c..f23dba1e8e3 100644 --- a/doc/data/messages/c/consider-using-dict-comprehension/details.rst +++ b/doc/data/messages/c/consider-using-dict-comprehension/details.rst @@ -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/ diff --git a/doc/data/messages/c/consider-using-set-comprehension/details.rst b/doc/data/messages/c/consider-using-set-comprehension/details.rst index c287fc4847c..f23dba1e8e3 100644 --- a/doc/data/messages/c/consider-using-set-comprehension/details.rst +++ b/doc/data/messages/c/consider-using-set-comprehension/details.rst @@ -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/ diff --git a/doc/whatsnew/2/2.11/summary.rst b/doc/whatsnew/2/2.11/summary.rst index 1d16bc52144..efbeea52203 100644 --- a/doc/whatsnew/2/2.11/summary.rst +++ b/doc/whatsnew/2/2.11/summary.rst @@ -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. @@ -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 ============