MCPcopy Create free account
hub / github.com/aws/aws-cli / _get_runner

Method _get_runner

awscli/customizations/wizard/commands.py:59–75  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

57 self._wizard_name = wizard_name
58
59 def _get_runner(self):
60 # If a runner was not provided during initialization, compute the
61 # default. This defers default computation to runtime, when the
62 # wizard command is actually invoked. The benefit of this is so that
63 # we defer importing `awscli.customizations.wizard.factory` until
64 # it's actually needed. The wizard factory module imports from
65 # `prompt_toolkit`, and importing `prompt_toolkit` while executing
66 # commands that don't actually use it has historically led to
67 # unnecessarily higher command execution time and wasted compute.
68 if self._runner is None:
69 from awscli.customizations.wizard import factory
70
71 self._runner = {
72 '0.1': factory.create_default_wizard_v1_runner(self._session),
73 '0.2': factory.create_default_wizard_v2_runner(self._session),
74 }
75 return self._runner
76
77 def _build_subcommand_table(self):
78 subcommand_table = super()._build_subcommand_table()

Callers 1

_run_wizardMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected