]> git.ipfire.org Git - thirdparty/linux.git/commit
tools: ynl: remove unused imports
authorMatthieu Baerts (NGI0) <matttbe@kernel.org>
Tue, 9 Sep 2025 21:07:51 +0000 (23:07 +0200)
committerJakub Kicinski <kuba@kernel.org>
Thu, 11 Sep 2025 01:08:59 +0000 (18:08 -0700)
commit389712b0da1f0af9ef28b3d8f9b18e41f92ade28
tree289fc76c13350fb9768b54175607a511821fbad9
parentd8e0e25406a1208a836b476418c7a85903d047ac
tools: ynl: remove unused imports

These imports are not used according to Ruff, and can be safely removed.

This is linked to Ruff error F401 [1]:

  Unused imports add a performance overhead at runtime, and risk
  creating import cycles. They also increase the cognitive load of
  reading the code.

There is one exception with 'YnlDocGenerator' which is added in __all__:
it is used by ynl_gen_rst.py.

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