mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-01-23 02:14:37 +00:00
pycriu: use explicit imports for __init__
_init__.py defines the public API for pycriu. It is important to use explicit imports to avoid leaking every symbol from criu.py into the pycriu namespace. This avoids import-time side effects, prevents name collisions, and circular-import traps. Fixes the following lint error: F403 `from .criu import *` used; unable to detect undefined names Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
This commit is contained in:
parent
f7ccb63bdd
commit
3c841af2cf
2 changed files with 15 additions and 2 deletions
|
|
@ -1,4 +1,15 @@
|
|||
from . import rpc_pb2 as rpc
|
||||
from . import images
|
||||
from .criu import *
|
||||
from .version import __version__
|
||||
from .criu import criu, CRIUExceptionExternal, CRIUException
|
||||
from .criu import CR_DEFAULT_SERVICE_ADDRESS
|
||||
from .version import __version__
|
||||
|
||||
__all__ = (
|
||||
"rpc",
|
||||
"images",
|
||||
"criu",
|
||||
"CRIUExceptionExternal",
|
||||
"CRIUException",
|
||||
"CR_DEFAULT_SERVICE_ADDRESS",
|
||||
"__version__",
|
||||
)
|
||||
Loading…
Add table
Add a link
Reference in a new issue