]> git.ipfire.org Git - thirdparty/linux.git/commit
tools: ynl: use 'cond is None'
authorMatthieu Baerts (NGI0) <matttbe@kernel.org>
Tue, 9 Sep 2025 21:07:53 +0000 (23:07 +0200)
committerJakub Kicinski <kuba@kernel.org>
Thu, 11 Sep 2025 01:09:00 +0000 (18:09 -0700)
commit10d32b0ddcc142749f6759c0b052a3780903b4df
treed9147f48790f4cd9f8ccba75cae52d76c292ca4e
parent616129d6b421e3603a1c66bf494b6a95f0128602
tools: ynl: use 'cond is None'

It is better to use the 'is' keyword instead of comparing to None
according to Ruff.

This is linked to Ruff error E711 [1]:

  According to PEP 8, "Comparisons to singletons like None should always
  be done with is or is not, never the equality operators."

Link: https://docs.astral.sh/ruff/rules/none-comparison/
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-7-238c2bccdd99@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tools/net/ynl/pyynl/lib/ynl.py
tools/net/ynl/pyynl/ynl_gen_c.py