Change to default line width in ruff - #324
Conversation
6c0eff6 to
68187ef
Compare
Use the default width of 88 characters instead of 92.
By default, ruff selects rules that are compatible with the use of a formatter. It will ignore rules such as E501.
|
Thanks @DimitriPapadopoulos! |
|
|
||
| [tool.ruff.lint] | ||
| extend-select = ["C4", "D", "FURB", "I", "PERF", "W", "UP"] | ||
| extend-select = ["C4", "D", "PERF", "W"] |
There was a problem hiding this comment.
@cbrnr Not 100 % sure FURB, I or UP should be removed. From scientific-python/cookie#843:
Ruff 0.16 turns on 413 rules without configuration. Compared the default set against the full rule index:
BLE,DTZ,FA,FLY,INT,PIE, andYTTare fully covered (including preview rules), and I is covered except forI002, which needs thelint.isort.required-importssetting. No other group is fully covered.
[...]
- Removed the
RF102check ("isort must be selected").RF101(B) andRF103(UP) stay, because those groups are not fully default.
But then the defaults may be good enough for us.
There was a problem hiding this comment.
OK, I thought these were included by default? https://docs.astral.sh/ruff/default-rules/
There was a problem hiding this comment.
Not all rules, but I guess the ruff authors made a sensible choice.
Nevertheless, I'd like to understand which rules in B and UP they left out, and why they left out I002 — it should be a no-op anyway without required-imports.
There was a problem hiding this comment.
OK, I think the defaults should be fine, but feel free to add specific rules that you think are important.
Use the default width of 88 characters instead of 92.
Fixes #320.