Skip to content

Commit bd9ffc8

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 1cab9db commit bd9ffc8

4 files changed

Lines changed: 16 additions & 11 deletions

File tree

src/ansible_navigator/action_base.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,8 +173,7 @@ def rerun(self) -> None:
173173

174174
# TODO: Create PreRun Stdout class
175175
def pre_run_stdout(self) -> RunStdoutReturn:
176-
"""Performs pre-run tasks, such as fail-fast checks.
177-
"""
176+
"""Performs pre-run tasks, such as fail-fast checks."""
178177
messages = []
179178
message = f"Subcommand '{self._name}' does not support mode 'stdout'."
180179
messages.append(ExitMessage(message=message))

src/ansible_navigator/actions/_actions.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,9 @@ def pre_run_interactive_factory(package: str) -> Callable[..., Any]:
303303
return functools.partial(pre_run_interactive, package)
304304

305305

306-
def pre_run_stdout(package: str, action: str, *args: Any, **_kwargs: dict[str, Any]) -> RunStdoutReturn:
306+
def pre_run_stdout(
307+
package: str, action: str, *args: Any, **_kwargs: dict[str, Any]
308+
) -> RunStdoutReturn:
307309
"""Call the given action's ``pre_run_stdout`` method.
308310
309311
Args:

src/ansible_navigator/actions/run.py

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
from . import run_action
4949
from .stdout import Action as stdout_action
5050

51+
5152
if TYPE_CHECKING:
5253
from collections.abc import Callable
5354

@@ -112,7 +113,7 @@ def color_menu(_colno: int, colname: str, entry: dict[str, Any]) -> tuple[int, i
112113

113114
elif "task" in entry:
114115
if entry["__result"].lower() == "in progress" or (
115-
colname in ["__result", "__host", "__number", "__task", "__task_action"]
116+
colname in ["__result", "__host", "__number", "__task", "__task_action"]
116117
):
117118
color = get_color(entry["__result"])
118119
elif colname == "__changed":
@@ -256,11 +257,11 @@ def mode(self) -> str:
256257
such, else return mode
257258
"""
258259
if all(
259-
(
260-
self._args.mode == "stdout",
261-
self._args.playbook_artifact_enable,
262-
self._args.app != "replay",
263-
),
260+
(
261+
self._args.mode == "stdout",
262+
self._args.playbook_artifact_enable,
263+
self._args.app != "replay",
264+
),
264265
):
265266
return "stdout_w_artifact"
266267
return self._args.mode
@@ -309,7 +310,9 @@ def pre_run_stdout(self) -> RunStdoutReturn:
309310
playbook_valid = False
310311

311312
if not playbook_valid:
312-
return RunStdoutReturn(message=f"Playbook \"{self._args.playbook}\" does not exist", return_code=1)
313+
return RunStdoutReturn(
314+
message=f'Playbook "{self._args.playbook}" does not exist', return_code=1
315+
)
313316

314317
return RunStdoutReturn(message="", return_code=0)
315318

src/ansible_navigator/cli.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@
2323
from .action_defs import RunReturn
2424
from .action_defs import RunStdoutReturn
2525
from .action_runner import ActionRunner
26-
from .actions import run_action_stdout, pre_run_action_stdout
26+
from .actions import pre_run_action_stdout
27+
from .actions import run_action_stdout
2728
from .configuration_subsystem import Constants
2829
from .configuration_subsystem import NavigatorConfiguration
2930
from .image_manager import ImagePuller

0 commit comments

Comments
 (0)