mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
selftests: net: add ruff linter exclusions
Fedora is now shipping ruff 0.16 which added a ton of more
opinionated rules. Let's add some exclusions for checks
which are both noisy and IMO of questionable value.
We can still follow them for new code but it's a matter
of preference.
C401: set(x for x in Y) -> {x for x in Y}
I find the set() a little more readable.
I001: hard requirements to sort includes
A little too much
RUF015: list(set_a - set_b)[0] -> next(iter(set_a - set_b))
list + index are more readable to a "C person" for sure.
Reviewed-by: Nicolai Buchwitz <nb@tipi-net.de>
Link: https://patch.msgid.link/20260912233926.304768-1-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
879e280b84
commit
7b37f11090
4
tools/testing/selftests/drivers/net/ruff.toml
Normal file
4
tools/testing/selftests/drivers/net/ruff.toml
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
# NOTE: keep in sync between .../net/ and .../drivers/net/
|
||||
|
||||
[lint]
|
||||
ignore = ["C401", "I001", "RUF015"]
|
||||
4
tools/testing/selftests/net/ruff.toml
Normal file
4
tools/testing/selftests/net/ruff.toml
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
# NOTE: keep in sync between .../net/ and .../drivers/net/
|
||||
|
||||
[lint]
|
||||
ignore = ["C401", "I001", "RUF015"]
|
||||
Loading…
Reference in New Issue
Block a user