From 64d7e45c4d04b28fe527699bff38dcef7f2a7783 Mon Sep 17 00:00:00 2001 From: Martin Hoyer Date: Fri, 25 Oct 2024 15:21:42 +0200 Subject: [PATCH] Improve backwards configshell-fb compatibility Basically copying what has been done in rtslib_fb.py. This allows correct importing of submodules. --- configshell_fb.py | 33 +++++++++++++++++++++------------ 1 file changed, 21 insertions(+), 12 deletions(-) diff --git a/configshell_fb.py b/configshell_fb.py index a6fd918..c2ab96c 100644 --- a/configshell_fb.py +++ b/configshell_fb.py @@ -1,12 +1,21 @@ -# Providing backwards compatibility for modules importing 'configshell_fb' - -from configshell import ConfigNode, ConfigShell, Console, ExecutionError, Log, Prefs - -__all__ = [ - 'Console', - 'Log', - 'ConfigNode', - 'ExecutionError', - 'Prefs', - 'ConfigShell', -] +""" +configshell_fb.py - Backwards compatibility module for configshell + +This module provides backwards compatibility for code that imports 'configshell_fb'. +It re-exports all public names from the 'configshell' module. + +Usage: + from configshell_fb import ConfigNode, Log, Console # etc. + +Note: This compatibility layer may be deprecated in future versions. +Please consider updating your imports to use 'configshell' directly. +""" + +import configshell +from configshell import * # noqa: F403 + +# Explicitly import and re-export submodules +from configshell import console, log, node, prefs, shell # noqa: F401 + +# Re-export all public names from configshell +__all__ = configshell.__all__