mirror of
https://github.com/torvalds/linux.git
synced 2026-09-22 20:54:03 +02:00
tools: ynl: pyynl: re-export the library API from the package root
The public classes live in pyynl.lib, so users had to spell out from pyynl.lib import YnlFamily which I forget at least once a month. Re-export lib's API from the package __init__ so that from pyynl import YnlFamily works as well. I don't think there was a real reason not to do this? Acked-by: Jan Stancek <jstancek@redhat.com> Reviewed-by: Donald Hunter <donald.hunter@gmail.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org> Link: https://patch.msgid.link/20260701021751.3234681-2-kuba@kernel.org Signed-off-by: Paolo Abeni <pabeni@redhat.com>
This commit is contained in:
parent
8d96107b58
commit
df87e5c4e9
|
|
@ -0,0 +1,9 @@
|
|||
# SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
|
||||
|
||||
""" Python YNL (YAML Netlink) library. """
|
||||
|
||||
# Re-export the public library API so it can be imported straight from the
|
||||
# package, e.g. `from pyynl import YnlFamily`.
|
||||
# pylint: disable=wildcard-import,unused-wildcard-import
|
||||
from .lib import *
|
||||
from .lib import __all__
|
||||
Loading…
Reference in New Issue
Block a user