From: Jakub Kicinski <kuba@kernel.org>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, edumazet@google.com, pabeni@redhat.com,
andrew+netdev@lunn.ch, horms@kernel.org,
Jakub Kicinski <kuba@kernel.org>,
shuah@kernel.org, linux-kselftest@vger.kernel.org
Subject: [PATCH net-next] selftests: net: add ruff linter exclusions
Date: Fri, 11 Sep 2026 14:34:12 -0700 [thread overview]
Message-ID: <20260911213412.3222759-1-kuba@kernel.org> (raw)
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.
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
CC: shuah@kernel.org
CC: linux-kselftest@vger.kernel.org
---
tools/testing/selftests/drivers/net/.ruff.toml | 4 ++++
tools/testing/selftests/net/.ruff.toml | 4 ++++
2 files changed, 8 insertions(+)
create mode 100644 tools/testing/selftests/drivers/net/.ruff.toml
create mode 100644 tools/testing/selftests/net/.ruff.toml
diff --git a/tools/testing/selftests/drivers/net/.ruff.toml b/tools/testing/selftests/drivers/net/.ruff.toml
new file mode 100644
index 000000000000..f58d51f35317
--- /dev/null
+++ b/tools/testing/selftests/drivers/net/.ruff.toml
@@ -0,0 +1,4 @@
+# NOTE: keep in sync between .../net/ and .../drivers/net/
+
+[lint]
+ignore = ["C401", "I001", "RUF015"]
diff --git a/tools/testing/selftests/net/.ruff.toml b/tools/testing/selftests/net/.ruff.toml
new file mode 100644
index 000000000000..f58d51f35317
--- /dev/null
+++ b/tools/testing/selftests/net/.ruff.toml
@@ -0,0 +1,4 @@
+# NOTE: keep in sync between .../net/ and .../drivers/net/
+
+[lint]
+ignore = ["C401", "I001", "RUF015"]
--
2.55.0
next reply other threads:[~2026-09-11 21:34 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-11 21:34 Jakub Kicinski [this message]
2026-09-11 22:17 ` [PATCH net-next] selftests: net: add ruff linter exclusions Nicolai Buchwitz
2026-09-12 22:04 ` kernel test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260911213412.3222759-1-kuba@kernel.org \
--to=kuba@kernel.org \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=shuah@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.