Skip to content

Commit

Permalink
Improve backwards configshell-fb compatibility
Browse files Browse the repository at this point in the history
Basically copying what has been done in rtslib_fb.py.
This allows correct importing of submodules.
  • Loading branch information
martinhoyer committed Oct 25, 2024
1 parent 4fb5534 commit 64d7e45
Showing 1 changed file with 21 additions and 12 deletions.
33 changes: 21 additions & 12 deletions configshell_fb.py
Original file line number Diff line number Diff line change
@@ -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__

0 comments on commit 64d7e45

Please sign in to comment.