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:
Jakub Kicinski 2026-09-12 16:39:26 -07:00
parent 879e280b84
commit 7b37f11090
2 changed files with 8 additions and 0 deletions

View File

@ -0,0 +1,4 @@
# NOTE: keep in sync between .../net/ and .../drivers/net/
[lint]
ignore = ["C401", "I001", "RUF015"]

View File

@ -0,0 +1,4 @@
# NOTE: keep in sync between .../net/ and .../drivers/net/
[lint]
ignore = ["C401", "I001", "RUF015"]