mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-04 18:58:04 +00:00
doc(FAQ): More precise PyLint comparision (#10756)
Section about comparing Ruff to PyLint now is more precise about the following two points: - Ruff do count branches different and there for earlier give too-many-branches warning. - Activating all Pylint rules in Ruff also activates pylint rules that are not active by default in Pylint itself because they are implemented via pylint plugins.
This commit is contained in:
parent
c2790f912b
commit
a4ee9c1978
1 changed files with 10 additions and 2 deletions
12
docs/faq.md
12
docs/faq.md
|
@ -126,8 +126,16 @@ Despite these differences, many users have successfully switched from Pylint to
|
|||
those using Ruff alongside a [type checker](faq.md#how-does-ruff-compare-to-mypy-or-pyright-or-pyre),
|
||||
which can cover some of the functionality that Pylint provides.
|
||||
|
||||
Like Flake8, Pylint supports plugins (called "checkers"), while Ruff implements all rules natively.
|
||||
Unlike Pylint, Ruff is capable of automatically fixing its own lint violations.
|
||||
Like Flake8, Pylint supports plugins (called "checkers"), while Ruff implements all rules natively
|
||||
and does not support custom or third-party rules. Unlike Pylint, Ruff is capable of automatically
|
||||
fixing its own lint violations.
|
||||
|
||||
In some cases, Ruff's rules may yield slightly different rules than their Pylint counterparts. For
|
||||
example, Ruff's [`too-many-branches`](rules/too-many-branches.md) does not count `try` blocks as
|
||||
their own branches, unlike Pylint's `R0912`. Ruff's `PY` rule group also includes a small number of
|
||||
rules from Pylint _extensions_ (like [`magic-value-comparison`](https://docs.astral.sh/ruff/rules/magic-value-comparison/)),
|
||||
which need to be explicitly activated when using Pylint. By enabling Ruff's `PY` group, you may
|
||||
see violations for rules that weren't previously enabled through your Pylint configuration.
|
||||
|
||||
Pylint parity is being tracked in [#970](https://github.com/astral-sh/ruff/issues/970).
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue