-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Description
I understand that Ruff aims to eventually cover reasonable set of Pylint rules. However, Pylint is still pretty sharp and provides valuable insights. I would like to use Pylint in my project only for the rules that Ruff doesn't support yet.
I intend to switch off all the rules supported by Ruff in pylintrc (the list appears to be too long to maintain it in pyproject.toml).
Using the description from issue #970 and the Edits pulldown, I did this:
- extracted a list,
- applied the last diffs to the text,
- filtered out items that were checked,
- filtered out items that are struck through (here I'm not certain),
and transformed them using this command:
grep -Ev '\[ \]|~|^#' ruff-pylint-coverage | tr -d '`' | awk '{
gsub(/[()]/, "", $6);
printf " %s, # %s%-*s- covered by ruff in %s\n", $5, $3, (50 - length($3) - 10), " ", ($6 != "" ? $6 : "?")
}' | sortGetting this format for the disable list (228 lines):
C0103, # invalid-name - covered by ruff in N815
C0105, # typevar-name-incorrect-variance - covered by ruff in PLC0105
C0112, # empty-docstring - covered by ruff in D419
C0113, # unneeded-not - covered by ruff in SIM208
....
It occurred to me that Ruff could potentially generate a similar list directly. It would be fantastic if updating the disable list in a pylintrc (or pyproject.toml) could be made this convenient via a built-in Ruff command.