* [PATCH net-next] selftests: net: add ruff linter exclusions
@ 2026-09-11 21:34 Jakub Kicinski
2026-09-11 22:17 ` Nicolai Buchwitz
2026-09-12 22:04 ` kernel test robot
0 siblings, 2 replies; 3+ messages in thread
From: Jakub Kicinski @ 2026-09-11 21:34 UTC (permalink / raw)
To: davem
Cc: netdev, edumazet, pabeni, andrew+netdev, horms, Jakub Kicinski,
shuah, linux-kselftest
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] selftests: net: add ruff linter exclusions
2026-09-11 21:34 [PATCH net-next] selftests: net: add ruff linter exclusions Jakub Kicinski
@ 2026-09-11 22:17 ` Nicolai Buchwitz
2026-09-12 22:04 ` kernel test robot
1 sibling, 0 replies; 3+ messages in thread
From: Nicolai Buchwitz @ 2026-09-11 22:17 UTC (permalink / raw)
To: Jakub Kicinski, davem
Cc: netdev, edumazet, pabeni, andrew+netdev, horms, shuah,
linux-kselftest
On September 11, 2026 11:34:12 PM GMT+02:00, Jakub Kicinski <kuba@kernel.org> wrote:
>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"]
Reviewed-by: Nicolai Buchwitz <nb@tipi-net.de>
Thanks,
Nicolai
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] selftests: net: add ruff linter exclusions
2026-09-11 21:34 [PATCH net-next] selftests: net: add ruff linter exclusions Jakub Kicinski
2026-09-11 22:17 ` Nicolai Buchwitz
@ 2026-09-12 22:04 ` kernel test robot
1 sibling, 0 replies; 3+ messages in thread
From: kernel test robot @ 2026-09-12 22:04 UTC (permalink / raw)
To: Jakub Kicinski, davem
Cc: oe-kbuild-all, netdev, edumazet, pabeni, andrew+netdev, horms,
Jakub Kicinski, shuah, linux-kselftest
Hi Jakub,
kernel test robot noticed the following build warnings:
[auto build test WARNING on net-next/main]
url: https://github.com/intel-lab-lkp/linux/commits/Jakub-Kicinski/selftests-net-add-ruff-linter-exclusions/20260911-143412
base: net-next/main
patch link: https://lore.kernel.org/r/20260911213412.3222759-1-kuba%40kernel.org
patch subject: [PATCH net-next] selftests: net: add ruff linter exclusions
config: microblaze-allnoconfig (https://download.01.org/0day-ci/archive/20260913/202609130558.xNQAh7l2-lkp@intel.com/config)
compiler: microblaze-linux-gcc (GCC) 16.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260913/202609130558.xNQAh7l2-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202609130558.xNQAh7l2-lkp@intel.com/
All warnings (new ones prefixed by >>):
Documentation/.renames.txt: warning: ignored by one of the .gitignore files
>> tools/testing/selftests/drivers/net/.ruff.toml: warning: ignored by one of the .gitignore files
>> tools/testing/selftests/net/.ruff.toml: warning: ignored by one of the .gitignore files
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-09-12 22:05 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-11 21:34 [PATCH net-next] selftests: net: add ruff linter exclusions Jakub Kicinski
2026-09-11 22:17 ` Nicolai Buchwitz
2026-09-12 22:04 ` kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox