]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
tools: ynl: check for membership with 'not in'
authorMatthieu Baerts (NGI0) <matttbe@kernel.org>
Tue, 9 Sep 2025 21:07:54 +0000 (23:07 +0200)
committerJakub Kicinski <kuba@kernel.org>
Thu, 11 Sep 2025 01:09:00 +0000 (18:09 -0700)
commitf6259ba70e7e056ae626b393c908500a5d6e8755
tree7acb62c7c973c217ecf8943ad43d27f7f8c29af8
parent10d32b0ddcc142749f6759c0b052a3780903b4df
tools: ynl: check for membership with 'not in'

It is better to use 'not in' instead of 'not {element} in {collection}'
according to Ruff.

This is linked to Ruff error E713 [1]:

  Testing membership with {element} not in {collection} is more readable.

Link: https://docs.astral.sh/ruff/rules/not-in-test/
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Reviewed-by: Donald Hunter <donald.hunter@gmail.com>
Reviewed-by: Asbjørn Sloth Tønnesen <ast@fiberby.net>
Link: https://patch.msgid.link/20250909-net-next-ynl-ruff-v1-8-238c2bccdd99@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tools/net/ynl/pyynl/ynl_gen_c.py