Description
As of now ruff supports the following rules, as listed in the order at https://beta.ruff.rs/docs/rules/
Below are those we may be interested in, as well as those checked that we currently lint against (after #1299 and those labelled to PRs):
- F
- E
- W
- C90
- I
- N (naming Enable checking of naming rules using ruff #1308)
- D
- UP (pyupgrade Enable more ruff linting #1302)
- YTT (2020 ie. sys.version Enable more ruff linting #1302)
- ANN (annotations Enable more ruff linting #1302)
- S
- BLE
- FBT
- B (bugbear Enable more ruff linting #1302)
- A
- COM
- C4 (comprehensions Enable more ruff linting #1302)
- DTZ
- T10
- EM
- EXE
- ISC
- ICN
- G (logging Pin ruff and add checks for smaller additional rules #1306)
- INP
- PIE (misc Pin ruff and add checks for smaller additional rules #1306)
- T20 (print, Enable more ruff linting #1302)
- PYI
- PT
- Q
- RSE (raise Pin ruff and add checks for smaller additional rules #1306)
- RET
- SLF
- SIM (simplification Enable checking of Simplication rules using ruff #1312)
- TID
- TCH
- ARG
- PTH
- ERA
- PGH (pygrep-hooks Enable more ruff linting #1302)
- PL
- PLC (pylint conventions Enable more ruff linting #1302)
- PLE (pylint errors Enable more ruff linting #1302)
- PLR
- PLW (pylint warnings Enable more ruff linting #1302)
- TRY
- RUF [partially, as RUF100, Enable more ruff linting #1302]
The following we would certainly not be interested in, since they lint against libraries we don't use:
DJ(ango), PD(Pandas-vet), NPY(numpy)
For comparison purposes, the main Zulip repo currently runs with at least the following in addition to those already checked:
DTZ, I, ISC, PLR, Q, RUF, S, T10
We would likely be interested in PT, since that covers pytest, which the main Zulip repo does not use.
Note that various files and rules may also be excluded in the main repo, as well as here, and may differ.
Also note that I would replace the isort
tool that we currently use.