diff --git a/osc_lib/command/command.py b/osc_lib/command/command.py index 53b5ec72..47e584dc 100644 --- a/osc_lib/command/command.py +++ b/osc_lib/command/command.py @@ -24,6 +24,9 @@ from cliff import show from osc_lib import exceptions from osc_lib.i18n import _ +if ty.TYPE_CHECKING: + from osc_lib import shell + class CommandMeta(abc.ABCMeta): def __new__( @@ -41,6 +44,7 @@ class CommandMeta(abc.ABCMeta): class Command(command.Command, metaclass=CommandMeta): log: logging.Logger + app: 'shell.OpenStackShell' def run(self, parsed_args: argparse.Namespace) -> int: self.log.debug('run(%s)', parsed_args) diff --git a/osc_lib/command/timing.py b/osc_lib/command/timing.py index 3cf99fb9..afe97767 100644 --- a/osc_lib/command/timing.py +++ b/osc_lib/command/timing.py @@ -18,15 +18,10 @@ import typing as ty from osc_lib.command import command -if ty.TYPE_CHECKING: - from osc_lib import shell - class Timing(command.Lister): """Show timing data""" - app: 'shell.OpenStackShell' - def take_action( self, parsed_args: argparse.Namespace ) -> tuple[tuple[str, ...], list[ty.Any]]: diff --git a/osc_lib/shell.py b/osc_lib/shell.py index a7b7d440..5936d9f5 100644 --- a/osc_lib/shell.py +++ b/osc_lib/shell.py @@ -470,9 +470,6 @@ class OpenStackShell(app.App): "cloud cfg: %s", strutils.mask_password(self.cloud.config) ) - # Callout for stuff between o-c-c and ClientManager - # self._initialize_app_2(self.options) - self._load_plugins() self._load_commands()