diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 4d48b0d76..8beb86e18 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -34,7 +34,7 @@ repos: - prettier-plugin-toml - repo: https://github.com/psf/black.git - rev: 23.12.1 + rev: 24.1.1 hooks: - id: black language_version: python3 @@ -45,14 +45,14 @@ repos: - id: toml-sort-fix - repo: https://github.com/astral-sh/ruff-pre-commit - rev: "v0.1.9" + rev: "v0.2.0" hooks: - id: ruff args: - "--exit-non-zero-on-fix" - repo: https://github.com/streetsidesoftware/cspell-cli - rev: v8.2.1 + rev: v8.3.0 hooks: - id: cspell name: Spell check with cspell @@ -94,7 +94,7 @@ repos: - id: check-json5 - repo: https://github.com/igorshubovych/markdownlint-cli - rev: v0.38.0 + rev: v0.39.0 hooks: - id: markdownlint exclude: > @@ -135,7 +135,7 @@ repos: types: [file, yaml] - repo: https://github.com/PyCQA/flake8.git - rev: 6.1.0 + rev: 7.0.0 hooks: - id: flake8 language_version: python3 diff --git a/docs/_ext/regenerate_docs.py b/docs/_ext/regenerate_docs.py index a32994e4b..7ca238d1f 100644 --- a/docs/_ext/regenerate_docs.py +++ b/docs/_ext/regenerate_docs.py @@ -1,4 +1,5 @@ """Scripts that generates documentation from the settings definitions.""" + from __future__ import annotations import logging diff --git a/src/ansible_navigator/__main__.py b/src/ansible_navigator/__main__.py index 590c4d206..5e83ba1ac 100644 --- a/src/ansible_navigator/__main__.py +++ b/src/ansible_navigator/__main__.py @@ -3,6 +3,7 @@ This makes it possible to invoke CLI via :command:`python -m ansible_navigator`. """ + from .cli import main diff --git a/src/ansible_navigator/_version_doc_cache.py b/src/ansible_navigator/_version_doc_cache.py index b59c89b09..a38c9483a 100644 --- a/src/ansible_navigator/_version_doc_cache.py +++ b/src/ansible_navigator/_version_doc_cache.py @@ -11,4 +11,5 @@ application version, although keeping the major in sync is probably not a bad idea to minimize the amount of stale docs in the user's cache """ + __version_collection_doc_cache__ = "1.0" diff --git a/src/ansible_navigator/action_base.py b/src/ansible_navigator/action_base.py index 13d46f985..1b50ee516 100644 --- a/src/ansible_navigator/action_base.py +++ b/src/ansible_navigator/action_base.py @@ -1,4 +1,5 @@ """Base class for apps (actions).""" + from __future__ import annotations import logging diff --git a/src/ansible_navigator/actions/__init__.py b/src/ansible_navigator/actions/__init__.py index 46c3b1d77..d4e07aa25 100644 --- a/src/ansible_navigator/actions/__init__.py +++ b/src/ansible_navigator/actions/__init__.py @@ -12,6 +12,7 @@ is identified in the :class:`~ansible_navigator.configuration_subsystem.navigator_configuration.Internals`. """ + from __future__ import annotations from typing import Any diff --git a/src/ansible_navigator/actions/_actions.py b/src/ansible_navigator/actions/_actions.py index c8fc17162..f0e0daae6 100644 --- a/src/ansible_navigator/actions/_actions.py +++ b/src/ansible_navigator/actions/_actions.py @@ -1,4 +1,5 @@ """Helper functions for the ``actions`` package.""" + from __future__ import annotations import functools diff --git a/src/ansible_navigator/actions/back.py b/src/ansible_navigator/actions/back.py index a0eed0f26..1507cb182 100644 --- a/src/ansible_navigator/actions/back.py +++ b/src/ansible_navigator/actions/back.py @@ -2,6 +2,7 @@ Additionally triggered by the escape key. """ + import logging from ansible_navigator.app_public import AppPublic diff --git a/src/ansible_navigator/actions/builder.py b/src/ansible_navigator/actions/builder.py index f919e4565..3692894e1 100644 --- a/src/ansible_navigator/actions/builder.py +++ b/src/ansible_navigator/actions/builder.py @@ -3,6 +3,7 @@ Importing this module registers this subcommand in the external global subcommand registry. """ + from __future__ import annotations import os diff --git a/src/ansible_navigator/actions/collections.py b/src/ansible_navigator/actions/collections.py index deda9196c..51c8ad7ac 100644 --- a/src/ansible_navigator/actions/collections.py +++ b/src/ansible_navigator/actions/collections.py @@ -1,4 +1,5 @@ """Collections subcommand implementation.""" + from __future__ import annotations import curses @@ -390,9 +391,9 @@ def _run_runner(self) -> None: f":{ee_navigator_utils_mount}", ) else: - set_environment_variable[ - "PYTHONPATH" - ] = f"${{PYTHONPATH}}:{ee_navigator_utils_mount}" + set_environment_variable["PYTHONPATH"] = ( + f"${{PYTHONPATH}}:{ee_navigator_utils_mount}" + ) self._logger.debug( "Execution Environment's PYTHONPATH is set to: %s", set_environment_variable["PYTHONPATH"], diff --git a/src/ansible_navigator/actions/config.py b/src/ansible_navigator/actions/config.py index d08bd1bbf..8f918334b 100644 --- a/src/ansible_navigator/actions/config.py +++ b/src/ansible_navigator/actions/config.py @@ -1,4 +1,5 @@ """Config subcommand implementation.""" + from __future__ import annotations import curses diff --git a/src/ansible_navigator/actions/exec.py b/src/ansible_navigator/actions/exec.py index 3e79bf750..8df85ab73 100644 --- a/src/ansible_navigator/actions/exec.py +++ b/src/ansible_navigator/actions/exec.py @@ -1,4 +1,5 @@ """Run the :exec subcommand.""" + from __future__ import annotations import logging diff --git a/src/ansible_navigator/actions/filter.py b/src/ansible_navigator/actions/filter.py index 6a29f202f..11d29f30b 100644 --- a/src/ansible_navigator/actions/filter.py +++ b/src/ansible_navigator/actions/filter.py @@ -1,4 +1,5 @@ """``:filter`` command implementation.""" + import logging from ansible_navigator.app_public import AppPublic diff --git a/src/ansible_navigator/actions/images.py b/src/ansible_navigator/actions/images.py index 0bdc656e7..075be725a 100644 --- a/src/ansible_navigator/actions/images.py +++ b/src/ansible_navigator/actions/images.py @@ -1,4 +1,5 @@ """Images subcommand implementation.""" + from __future__ import annotations import curses diff --git a/src/ansible_navigator/actions/inventory.py b/src/ansible_navigator/actions/inventory.py index 2670c0eac..68507652b 100644 --- a/src/ansible_navigator/actions/inventory.py +++ b/src/ansible_navigator/actions/inventory.py @@ -1,4 +1,5 @@ """Inventory subcommand implementation.""" + from __future__ import annotations import glob diff --git a/src/ansible_navigator/actions/log.py b/src/ansible_navigator/actions/log.py index bf6671c43..a38a4748b 100644 --- a/src/ansible_navigator/actions/log.py +++ b/src/ansible_navigator/actions/log.py @@ -1,4 +1,5 @@ """``:log`` command implementation.""" + from ansible_navigator.action_base import ActionBase from ansible_navigator.app_public import AppPublic from ansible_navigator.configuration_subsystem.definitions import ApplicationConfiguration diff --git a/src/ansible_navigator/actions/open_file.py b/src/ansible_navigator/actions/open_file.py index dbcf1ec7f..1ee587e62 100644 --- a/src/ansible_navigator/actions/open_file.py +++ b/src/ansible_navigator/actions/open_file.py @@ -1,4 +1,5 @@ """``:open`` command implementation.""" + from __future__ import annotations import curses diff --git a/src/ansible_navigator/actions/quit.py b/src/ansible_navigator/actions/quit.py index e45cd0062..d5032885a 100644 --- a/src/ansible_navigator/actions/quit.py +++ b/src/ansible_navigator/actions/quit.py @@ -1,4 +1,5 @@ """``:quit`` command implementation.""" + import logging from ansible_navigator.app_public import AppPublic diff --git a/src/ansible_navigator/actions/refresh.py b/src/ansible_navigator/actions/refresh.py index 043bb0edd..4d1e5a3a6 100644 --- a/src/ansible_navigator/actions/refresh.py +++ b/src/ansible_navigator/actions/refresh.py @@ -1,4 +1,5 @@ """Screen refresh implementation.""" + import logging from ansible_navigator.app_public import AppPublic diff --git a/src/ansible_navigator/actions/replay.py b/src/ansible_navigator/actions/replay.py index a8cbcdf73..c9f2bed65 100644 --- a/src/ansible_navigator/actions/replay.py +++ b/src/ansible_navigator/actions/replay.py @@ -4,7 +4,6 @@ to put the kegex. """ - from . import _actions as actions from .run import Action as BaseAction diff --git a/src/ansible_navigator/actions/rerun.py b/src/ansible_navigator/actions/rerun.py index 82548e281..27fab1526 100644 --- a/src/ansible_navigator/actions/rerun.py +++ b/src/ansible_navigator/actions/rerun.py @@ -1,4 +1,5 @@ """``:rerun`` command implementation.""" + import copy import logging diff --git a/src/ansible_navigator/actions/run.py b/src/ansible_navigator/actions/run.py index 8bc977fec..e4e465676 100644 --- a/src/ansible_navigator/actions/run.py +++ b/src/ansible_navigator/actions/run.py @@ -1,4 +1,5 @@ """Run subcommand implementation.""" + from __future__ import annotations import curses @@ -644,7 +645,7 @@ def _handle_message(self, message: dict) -> None: :type message: dict """ # Collect any stdout - if "stdout" in message and message["stdout"]: + if message.get("stdout"): self.stdout.extend(message["stdout"].splitlines()) if self.mode == "stdout_w_artifact": print(message["stdout"]) diff --git a/src/ansible_navigator/actions/sample_form.py b/src/ansible_navigator/actions/sample_form.py index 9a46a990a..3535b26c6 100644 --- a/src/ansible_navigator/actions/sample_form.py +++ b/src/ansible_navigator/actions/sample_form.py @@ -1,4 +1,5 @@ """``:sample_form`` command implementation.""" + from ansible_navigator.action_base import ActionBase from ansible_navigator.app_public import AppPublic from ansible_navigator.configuration_subsystem.definitions import ApplicationConfiguration diff --git a/src/ansible_navigator/actions/save.py b/src/ansible_navigator/actions/save.py index 1b3959509..e646d9931 100644 --- a/src/ansible_navigator/actions/save.py +++ b/src/ansible_navigator/actions/save.py @@ -1,4 +1,5 @@ """``:save`` command implementation.""" + import logging from ansible_navigator.app_public import AppPublic diff --git a/src/ansible_navigator/actions/serialize_json.py b/src/ansible_navigator/actions/serialize_json.py index 92a4a6aef..954bd0415 100644 --- a/src/ansible_navigator/actions/serialize_json.py +++ b/src/ansible_navigator/actions/serialize_json.py @@ -1,4 +1,5 @@ """``:json`` command implementation.""" + import logging from ansible_navigator.app_public import AppPublic diff --git a/src/ansible_navigator/actions/serialize_yaml.py b/src/ansible_navigator/actions/serialize_yaml.py index e07bbb43c..f21e6e921 100644 --- a/src/ansible_navigator/actions/serialize_yaml.py +++ b/src/ansible_navigator/actions/serialize_yaml.py @@ -1,4 +1,5 @@ """``:yaml`` command implementation.""" + import logging from ansible_navigator.app_public import AppPublic diff --git a/src/ansible_navigator/actions/settings.py b/src/ansible_navigator/actions/settings.py index a7279baa0..adba9b983 100644 --- a/src/ansible_navigator/actions/settings.py +++ b/src/ansible_navigator/actions/settings.py @@ -1,4 +1,5 @@ """The ``settings`` subcommand action.""" + from __future__ import annotations from dataclasses import asdict diff --git a/src/ansible_navigator/actions/template.py b/src/ansible_navigator/actions/template.py index fbe73dcaa..b317926f2 100644 --- a/src/ansible_navigator/actions/template.py +++ b/src/ansible_navigator/actions/template.py @@ -2,6 +2,7 @@ Processor of a template request at the single line prompt. e.g. {{ }} """ + from __future__ import annotations import html diff --git a/src/ansible_navigator/actions/write_file.py b/src/ansible_navigator/actions/write_file.py index f37d12c32..9da080a94 100644 --- a/src/ansible_navigator/actions/write_file.py +++ b/src/ansible_navigator/actions/write_file.py @@ -1,4 +1,5 @@ """``:write`` command implementation.""" + import logging import os import re diff --git a/src/ansible_navigator/app_public.py b/src/ansible_navigator/app_public.py index e28770631..88342fcaf 100644 --- a/src/ansible_navigator/app_public.py +++ b/src/ansible_navigator/app_public.py @@ -2,6 +2,7 @@ This will be shared with other actions and is immutable. """ + from __future__ import annotations from typing import TYPE_CHECKING diff --git a/src/ansible_navigator/command_runner/command_runner.py b/src/ansible_navigator/command_runner/command_runner.py index b546677b9..beb5f6410 100644 --- a/src/ansible_navigator/command_runner/command_runner.py +++ b/src/ansible_navigator/command_runner/command_runner.py @@ -1,4 +1,5 @@ """Definitions for the command runner.""" + from __future__ import annotations import multiprocessing diff --git a/src/ansible_navigator/configuration_subsystem/definitions.py b/src/ansible_navigator/configuration_subsystem/definitions.py index 82ecebbe1..57c00f7d1 100644 --- a/src/ansible_navigator/configuration_subsystem/definitions.py +++ b/src/ansible_navigator/configuration_subsystem/definitions.py @@ -1,4 +1,5 @@ """Configuration definitions.""" + from __future__ import annotations import copy diff --git a/src/ansible_navigator/configuration_subsystem/navigator_configuration.py b/src/ansible_navigator/configuration_subsystem/navigator_configuration.py index 93df7a70d..d66262e82 100644 --- a/src/ansible_navigator/configuration_subsystem/navigator_configuration.py +++ b/src/ansible_navigator/configuration_subsystem/navigator_configuration.py @@ -1,4 +1,5 @@ """The ansible-navigator configuration.""" + from __future__ import annotations import logging diff --git a/src/ansible_navigator/configuration_subsystem/parser.py b/src/ansible_navigator/configuration_subsystem/parser.py index caa370d3d..ab5ec8d67 100644 --- a/src/ansible_navigator/configuration_subsystem/parser.py +++ b/src/ansible_navigator/configuration_subsystem/parser.py @@ -1,4 +1,5 @@ """Build the argument parser.""" + from __future__ import annotations from argparse import SUPPRESS diff --git a/src/ansible_navigator/configuration_subsystem/transform.py b/src/ansible_navigator/configuration_subsystem/transform.py index ee676c802..821d1df9e 100644 --- a/src/ansible_navigator/configuration_subsystem/transform.py +++ b/src/ansible_navigator/configuration_subsystem/transform.py @@ -1,4 +1,5 @@ """Methods of transforming the settings.""" + from __future__ import annotations import json diff --git a/src/ansible_navigator/configuration_subsystem/utils.py b/src/ansible_navigator/configuration_subsystem/utils.py index 491d5e701..5c595d5d5 100644 --- a/src/ansible_navigator/configuration_subsystem/utils.py +++ b/src/ansible_navigator/configuration_subsystem/utils.py @@ -1,4 +1,5 @@ """Utilities related to the configuration subsystem.""" + from __future__ import annotations import logging @@ -70,7 +71,7 @@ def ansible_verison_parser(command: Command): class AnsibleConfiguration: """Data structure for an ansible.cfg file.""" - contents: (Constants | dict[str, dict[str, bool | int | float | str]]) = Constants.NOT_SET + contents: Constants | dict[str, dict[str, bool | int | float | str]] = Constants.NOT_SET """The parsed contents of the file""" text: Constants | list[str] = Constants.NOT_SET """The text from the file""" diff --git a/src/ansible_navigator/constants.py b/src/ansible_navigator/constants.py index 9b31bde98..ab8ea7ae0 100644 --- a/src/ansible_navigator/constants.py +++ b/src/ansible_navigator/constants.py @@ -1,4 +1,5 @@ """Constants for ansible-navigator.""" + import importlib.resources as importlib_resources from ansible_navigator.utils.compatibility import Traversable diff --git a/src/ansible_navigator/content_defs.py b/src/ansible_navigator/content_defs.py index aa34b2258..c7d82a7f7 100644 --- a/src/ansible_navigator/content_defs.py +++ b/src/ansible_navigator/content_defs.py @@ -1,4 +1,5 @@ """Definitions of UI content objects.""" + from __future__ import annotations from collections.abc import Sequence diff --git a/src/ansible_navigator/data/image_introspect.py b/src/ansible_navigator/data/image_introspect.py index 36108ccfe..ed87b1345 100644 --- a/src/ansible_navigator/data/image_introspect.py +++ b/src/ansible_navigator/data/image_introspect.py @@ -1,4 +1,5 @@ """Introspect an execution environment image.""" + from __future__ import annotations import json diff --git a/src/ansible_navigator/diagnostics.py b/src/ansible_navigator/diagnostics.py index 0dbffacd3..0ca051cb6 100644 --- a/src/ansible_navigator/diagnostics.py +++ b/src/ansible_navigator/diagnostics.py @@ -1,4 +1,5 @@ """Produce a diagnostics report in json format.""" + from __future__ import annotations import sys diff --git a/src/ansible_navigator/image_manager/inspector.py b/src/ansible_navigator/image_manager/inspector.py index aaafd5076..3d80a6870 100644 --- a/src/ansible_navigator/image_manager/inspector.py +++ b/src/ansible_navigator/image_manager/inspector.py @@ -1,4 +1,5 @@ """Definitions for image inspection.""" + from __future__ import annotations import json diff --git a/src/ansible_navigator/image_manager/introspector.py b/src/ansible_navigator/image_manager/introspector.py index 8e9187e70..663a9c261 100644 --- a/src/ansible_navigator/image_manager/introspector.py +++ b/src/ansible_navigator/image_manager/introspector.py @@ -1,4 +1,5 @@ """An image introspector.""" + from __future__ import annotations import inspect diff --git a/src/ansible_navigator/image_manager/puller.py b/src/ansible_navigator/image_manager/puller.py index 8e6865bdd..9671b3936 100644 --- a/src/ansible_navigator/image_manager/puller.py +++ b/src/ansible_navigator/image_manager/puller.py @@ -1,4 +1,5 @@ """Image puller.""" + from __future__ import annotations import logging diff --git a/src/ansible_navigator/initialization.py b/src/ansible_navigator/initialization.py index 025484415..edb5b59e3 100644 --- a/src/ansible_navigator/initialization.py +++ b/src/ansible_navigator/initialization.py @@ -2,6 +2,7 @@ These helpers are specific to ansible_navigator. """ + from __future__ import annotations import logging @@ -123,7 +124,7 @@ def get_and_check_collection_doc_cache( return messages, exit_messages, None collection_cache: KeyValueStore = KeyValueStore(collection_doc_cache_path) - cache_version = collection_cache["version"] if "version" in collection_cache else None + cache_version = collection_cache.get("version", None) message = f"Collection doc cache: 'current version' is '{cache_version}'" messages.append(LogMessage(level=logging.DEBUG, message=message)) if cache_version is None or cache_version != VERSION_CDC: diff --git a/src/ansible_navigator/logger.py b/src/ansible_navigator/logger.py index c1b2139d6..f7e8a0d21 100644 --- a/src/ansible_navigator/logger.py +++ b/src/ansible_navigator/logger.py @@ -1,4 +1,5 @@ """Logging initialization.""" + from __future__ import annotations import datetime diff --git a/src/ansible_navigator/runner/ansible_config.py b/src/ansible_navigator/runner/ansible_config.py index 488d17131..e0a4eb636 100644 --- a/src/ansible_navigator/runner/ansible_config.py +++ b/src/ansible_navigator/runner/ansible_config.py @@ -1,4 +1,5 @@ """Herein lies the ability for ansible-runner to run the ansible-config command.""" + from __future__ import annotations import warnings diff --git a/src/ansible_navigator/runner/command.py b/src/ansible_navigator/runner/command.py index 63de1e3c9..7b072d40c 100644 --- a/src/ansible_navigator/runner/command.py +++ b/src/ansible_navigator/runner/command.py @@ -1,4 +1,5 @@ """Herein lies the ability to have ansible-runner run a command in a synchronous manner.""" + from __future__ import annotations from ansible_runner import run_command diff --git a/src/ansible_navigator/steps.py b/src/ansible_navigator/steps.py index 7a1bf747d..5aed5432c 100644 --- a/src/ansible_navigator/steps.py +++ b/src/ansible_navigator/steps.py @@ -1,4 +1,5 @@ """Step abstractions for actions.""" + from __future__ import annotations from collections import deque diff --git a/src/ansible_navigator/tm_tokenize/fchainmap.py b/src/ansible_navigator/tm_tokenize/fchainmap.py index ace845ea5..52ad788df 100644 --- a/src/ansible_navigator/tm_tokenize/fchainmap.py +++ b/src/ansible_navigator/tm_tokenize/fchainmap.py @@ -9,8 +9,7 @@ class Indexable(Generic[TKey_contra, TValue_co], Protocol): - def __getitem__(self, key: TKey_contra) -> TValue_co: - ... + def __getitem__(self, key: TKey_contra) -> TValue_co: ... class FChainMap(Generic[TKey_contra, TValue_co]): diff --git a/src/ansible_navigator/tm_tokenize/rules.py b/src/ansible_navigator/tm_tokenize/rules.py index b784d2b56..c74610b67 100644 --- a/src/ansible_navigator/tm_tokenize/rules.py +++ b/src/ansible_navigator/tm_tokenize/rules.py @@ -37,16 +37,14 @@ def _split_name(s: str | None) -> tuple[str, ...]: class CompiledRule(Protocol): @property - def name(self) -> tuple[str, ...]: - ... + def name(self) -> tuple[str, ...]: ... def start( self, compiler: Compiler, match: Match[str], state: State, - ) -> tuple[State, bool, Regions]: - ... + ) -> tuple[State, bool, Regions]: ... def search( self, @@ -56,8 +54,7 @@ def search( pos: int, first_line: bool, boundary: bool, - ) -> tuple[State, int, bool, Regions] | None: - ... + ) -> tuple[State, int, bool, Regions] | None: ... class Entry(NamedTuple): @@ -72,66 +69,51 @@ class _Rule(Protocol): """hack for recursive types python/mypy#731""" @property - def name(self) -> tuple[str, ...]: - ... + def name(self) -> tuple[str, ...]: ... @property - def match(self) -> str | None: - ... + def match(self) -> str | None: ... @property - def begin(self) -> str | None: - ... + def begin(self) -> str | None: ... @property - def end(self) -> str | None: - ... + def end(self) -> str | None: ... @property - def while_(self) -> str | None: - ... + def while_(self) -> str | None: ... @property - def content_name(self) -> tuple[str, ...]: - ... + def content_name(self) -> tuple[str, ...]: ... @property - def captures(self) -> Captures: - ... + def captures(self) -> Captures: ... @property - def begin_captures(self) -> Captures: - ... + def begin_captures(self) -> Captures: ... @property - def end_captures(self) -> Captures: - ... + def end_captures(self) -> Captures: ... @property - def while_captures(self) -> Captures: - ... + def while_captures(self) -> Captures: ... @property - def include(self) -> str | None: - ... + def include(self) -> str | None: ... @property - def patterns(self) -> tuple[_Rule, ...]: - ... + def patterns(self) -> tuple[_Rule, ...]: ... @property - def repository(self) -> FChainMap[str, _Rule]: - ... + def repository(self) -> FChainMap[str, _Rule]: ... class CompiledRegsetRule(CompiledRule, Protocol): @property - def regset(self) -> _RegSet: - ... + def regset(self) -> _RegSet: ... @property - def u_rules(self) -> tuple[_Rule, ...]: - ... + def u_rules(self) -> tuple[_Rule, ...]: ... @uniquely_constructed diff --git a/src/ansible_navigator/ui_framework/curses_window.py b/src/ansible_navigator/ui_framework/curses_window.py index b3113c596..2e47627e7 100644 --- a/src/ansible_navigator/ui_framework/curses_window.py +++ b/src/ansible_navigator/ui_framework/curses_window.py @@ -1,4 +1,5 @@ """Type for curses window.""" + from __future__ import annotations import curses diff --git a/src/ansible_navigator/ui_framework/field_button.py b/src/ansible_navigator/ui_framework/field_button.py index c695d6581..cd33e1543 100644 --- a/src/ansible_navigator/ui_framework/field_button.py +++ b/src/ansible_navigator/ui_framework/field_button.py @@ -1,4 +1,5 @@ """A text input field.""" + from __future__ import annotations from dataclasses import dataclass diff --git a/src/ansible_navigator/ui_framework/field_checks.py b/src/ansible_navigator/ui_framework/field_checks.py index 0b1da349b..dc7183688 100644 --- a/src/ansible_navigator/ui_framework/field_checks.py +++ b/src/ansible_navigator/ui_framework/field_checks.py @@ -1,4 +1,5 @@ """Individual field check, the form field checks and radio check.""" + from __future__ import annotations import sys diff --git a/src/ansible_navigator/ui_framework/field_curses_information.py b/src/ansible_navigator/ui_framework/field_curses_information.py index 1f2ccbeb7..560e3f9ad 100644 --- a/src/ansible_navigator/ui_framework/field_curses_information.py +++ b/src/ansible_navigator/ui_framework/field_curses_information.py @@ -1,4 +1,5 @@ """An information field formatted as curses lines.""" + from __future__ import annotations from dataclasses import dataclass diff --git a/src/ansible_navigator/ui_framework/field_information.py b/src/ansible_navigator/ui_framework/field_information.py index acbeb4819..a51657d99 100644 --- a/src/ansible_navigator/ui_framework/field_information.py +++ b/src/ansible_navigator/ui_framework/field_information.py @@ -1,4 +1,5 @@ """An information field.""" + from __future__ import annotations from dataclasses import dataclass diff --git a/src/ansible_navigator/ui_framework/field_option.py b/src/ansible_navigator/ui_framework/field_option.py index 3ad84419d..7a1928e68 100644 --- a/src/ansible_navigator/ui_framework/field_option.py +++ b/src/ansible_navigator/ui_framework/field_option.py @@ -1,4 +1,5 @@ """One option in either a check or radio field.""" + from __future__ import annotations from dataclasses import dataclass diff --git a/src/ansible_navigator/ui_framework/field_radio.py b/src/ansible_navigator/ui_framework/field_radio.py index 331a73279..452cc8dd8 100644 --- a/src/ansible_navigator/ui_framework/field_radio.py +++ b/src/ansible_navigator/ui_framework/field_radio.py @@ -1,4 +1,5 @@ """Individual check and the form field checks for radios.""" + from __future__ import annotations from dataclasses import dataclass diff --git a/src/ansible_navigator/ui_framework/field_text.py b/src/ansible_navigator/ui_framework/field_text.py index d53049145..8b98d7d6e 100644 --- a/src/ansible_navigator/ui_framework/field_text.py +++ b/src/ansible_navigator/ui_framework/field_text.py @@ -1,4 +1,5 @@ """A text input field.""" + from __future__ import annotations from dataclasses import dataclass diff --git a/src/ansible_navigator/ui_framework/field_working.py b/src/ansible_navigator/ui_framework/field_working.py index 2677e0bae..73434543a 100644 --- a/src/ansible_navigator/ui_framework/field_working.py +++ b/src/ansible_navigator/ui_framework/field_working.py @@ -1,4 +1,5 @@ """A field with a 'working on it message'.""" + from __future__ import annotations from dataclasses import dataclass diff --git a/src/ansible_navigator/ui_framework/form.py b/src/ansible_navigator/ui_framework/form.py index 0cf9e3509..e879d3804 100644 --- a/src/ansible_navigator/ui_framework/form.py +++ b/src/ansible_navigator/ui_framework/form.py @@ -1,4 +1,5 @@ """Form definition and form rendering.""" + from __future__ import annotations import curses diff --git a/src/ansible_navigator/ui_framework/form_handler_button.py b/src/ansible_navigator/ui_framework/form_handler_button.py index 2ee3a9144..12d4f7dec 100644 --- a/src/ansible_navigator/ui_framework/form_handler_button.py +++ b/src/ansible_navigator/ui_framework/form_handler_button.py @@ -1,4 +1,5 @@ """Get one line of text input.""" + from __future__ import annotations import curses diff --git a/src/ansible_navigator/ui_framework/form_handler_information.py b/src/ansible_navigator/ui_framework/form_handler_information.py index 2ab99b25a..6401f78e6 100644 --- a/src/ansible_navigator/ui_framework/form_handler_information.py +++ b/src/ansible_navigator/ui_framework/form_handler_information.py @@ -1,4 +1,5 @@ """Information handler, instant enter.""" + from __future__ import annotations from curses import ascii as curses_ascii diff --git a/src/ansible_navigator/ui_framework/form_handler_options.py b/src/ansible_navigator/ui_framework/form_handler_options.py index 20f09963d..ffdcb7d0b 100644 --- a/src/ansible_navigator/ui_framework/form_handler_options.py +++ b/src/ansible_navigator/ui_framework/form_handler_options.py @@ -1,4 +1,5 @@ """Get one line of text input.""" + from __future__ import annotations import curses diff --git a/src/ansible_navigator/ui_framework/form_utils.py b/src/ansible_navigator/ui_framework/form_utils.py index f3540cc62..bf3a6dd06 100644 --- a/src/ansible_navigator/ui_framework/form_utils.py +++ b/src/ansible_navigator/ui_framework/form_utils.py @@ -1,4 +1,5 @@ """Simple utils for working with forms.""" + from __future__ import annotations import copy diff --git a/src/ansible_navigator/ui_framework/menu_builder.py b/src/ansible_navigator/ui_framework/menu_builder.py index c881324b6..c59d7fa1a 100644 --- a/src/ansible_navigator/ui_framework/menu_builder.py +++ b/src/ansible_navigator/ui_framework/menu_builder.py @@ -1,4 +1,5 @@ """Build a menu.""" + from __future__ import annotations import curses diff --git a/src/ansible_navigator/ui_framework/sentinels.py b/src/ansible_navigator/ui_framework/sentinels.py index f186bdcd1..539e85b23 100644 --- a/src/ansible_navigator/ui_framework/sentinels.py +++ b/src/ansible_navigator/ui_framework/sentinels.py @@ -1,4 +1,5 @@ """A couple singleton sentinels for convenience to avoid the use of None.""" + from __future__ import annotations from typing import Any diff --git a/src/ansible_navigator/ui_framework/ui_constants.py b/src/ansible_navigator/ui_framework/ui_constants.py index ffda659f3..7a5dcbc7c 100644 --- a/src/ansible_navigator/ui_framework/ui_constants.py +++ b/src/ansible_navigator/ui_framework/ui_constants.py @@ -1,4 +1,5 @@ """Constants for use with the user interface.""" + from __future__ import annotations import curses diff --git a/src/ansible_navigator/ui_framework/utils.py b/src/ansible_navigator/ui_framework/utils.py index 9ad73b0e6..51189cf1c 100644 --- a/src/ansible_navigator/ui_framework/utils.py +++ b/src/ansible_navigator/ui_framework/utils.py @@ -1,4 +1,5 @@ """Some UI specific utils.""" + from __future__ import annotations import functools diff --git a/src/ansible_navigator/utils/ansi.py b/src/ansible_navigator/utils/ansi.py index 2d3a1444c..815f7ece9 100644 --- a/src/ansible_navigator/utils/ansi.py +++ b/src/ansible_navigator/utils/ansi.py @@ -1,4 +1,5 @@ """ANSI color codes and functions for terminal output.""" + import os import sys diff --git a/src/ansible_navigator/utils/dict_merge.py b/src/ansible_navigator/utils/dict_merge.py index a8220e49d..6e4aac6be 100644 --- a/src/ansible_navigator/utils/dict_merge.py +++ b/src/ansible_navigator/utils/dict_merge.py @@ -1,4 +1,5 @@ """Utilities related to the merging of dictionaries.""" + from __future__ import annotations from typing import Optional diff --git a/src/ansible_navigator/utils/dot_paths.py b/src/ansible_navigator/utils/dot_paths.py index ce9e4e1ca..f8d035bfc 100644 --- a/src/ansible_navigator/utils/dot_paths.py +++ b/src/ansible_navigator/utils/dot_paths.py @@ -1,4 +1,5 @@ """Utilities for working with dictionaries using paths.""" + from __future__ import annotations import copy diff --git a/src/ansible_navigator/utils/functions.py b/src/ansible_navigator/utils/functions.py index fc670b646..f065101a9 100644 --- a/src/ansible_navigator/utils/functions.py +++ b/src/ansible_navigator/utils/functions.py @@ -1,4 +1,5 @@ """Some utilities that are specific to ansible_navigator.""" + from __future__ import annotations import ast diff --git a/src/ansible_navigator/utils/json_schema.py b/src/ansible_navigator/utils/json_schema.py index 360710d08..558acdcaf 100644 --- a/src/ansible_navigator/utils/json_schema.py +++ b/src/ansible_navigator/utils/json_schema.py @@ -1,4 +1,5 @@ """Functionality to perform json schema validation.""" + from __future__ import annotations import json diff --git a/src/ansible_navigator/utils/key_value_store.py b/src/ansible_navigator/utils/key_value_store.py index 8395d71ed..896d67f93 100644 --- a/src/ansible_navigator/utils/key_value_store.py +++ b/src/ansible_navigator/utils/key_value_store.py @@ -1,4 +1,5 @@ """An interface to use a sqlite database as a key-value store.""" + from __future__ import annotations import sqlite3 diff --git a/src/ansible_navigator/utils/print.py b/src/ansible_navigator/utils/print.py index 134e68105..81daf2807 100644 --- a/src/ansible_navigator/utils/print.py +++ b/src/ansible_navigator/utils/print.py @@ -1,4 +1,5 @@ """Print pretty colors.""" + from __future__ import annotations import logging diff --git a/src/ansible_navigator/utils/version_migration/definitions.py b/src/ansible_navigator/utils/version_migration/definitions.py index 16ed347bf..09d63a84e 100644 --- a/src/ansible_navigator/utils/version_migration/definitions.py +++ b/src/ansible_navigator/utils/version_migration/definitions.py @@ -1,4 +1,5 @@ """Common definitions for a version migration.""" + from __future__ import annotations import contextlib diff --git a/src/ansible_navigator/utils/version_migration/settings_file.py b/src/ansible_navigator/utils/version_migration/settings_file.py index 41c3b009c..8c0864170 100644 --- a/src/ansible_navigator/utils/version_migration/settings_file.py +++ b/src/ansible_navigator/utils/version_migration/settings_file.py @@ -1,4 +1,5 @@ """The settings file migration base class.""" + from __future__ import annotations from ansible_navigator.content_defs import ContentView diff --git a/tests/defaults.py b/tests/defaults.py index 225fe865e..3f56eca3b 100644 --- a/tests/defaults.py +++ b/tests/defaults.py @@ -1,4 +1,5 @@ """Constants with default values used throughout the tests.""" + import os from enum import Enum diff --git a/tests/fixtures/common/collections/ansible_collections/company_name/coll_1/plugins/lookup/lookup_1.py b/tests/fixtures/common/collections/ansible_collections/company_name/coll_1/plugins/lookup/lookup_1.py index 836da96fa..ead60f88a 100644 --- a/tests/fixtures/common/collections/ansible_collections/company_name/coll_1/plugins/lookup/lookup_1.py +++ b/tests/fixtures/common/collections/ansible_collections/company_name/coll_1/plugins/lookup/lookup_1.py @@ -1,6 +1,5 @@ """An ansible test lookup plugin.""" - DOCUMENTATION = """ name: lookup_1 author: test diff --git a/tests/fixtures/common/collections/ansible_collections/company_name/coll_1/plugins/modules/mod_1.py b/tests/fixtures/common/collections/ansible_collections/company_name/coll_1/plugins/modules/mod_1.py index 957e91aca..c8d23b1a7 100644 --- a/tests/fixtures/common/collections/ansible_collections/company_name/coll_1/plugins/modules/mod_1.py +++ b/tests/fixtures/common/collections/ansible_collections/company_name/coll_1/plugins/modules/mod_1.py @@ -1,6 +1,5 @@ """An ansible test module.""" - DOCUMENTATION = """ module: mod_1 author: diff --git a/tests/fixtures/common/collections/ansible_collections/company_name/coll_2/plugins/lookup/lookup_2.py b/tests/fixtures/common/collections/ansible_collections/company_name/coll_2/plugins/lookup/lookup_2.py index 6e57920f4..ae02f0d94 100644 --- a/tests/fixtures/common/collections/ansible_collections/company_name/coll_2/plugins/lookup/lookup_2.py +++ b/tests/fixtures/common/collections/ansible_collections/company_name/coll_2/plugins/lookup/lookup_2.py @@ -1,6 +1,5 @@ """An ansible test lookup plugin.""" - DOCUMENTATION = """ name: lookup_2 author: test diff --git a/tests/fixtures/common/collections/ansible_collections/company_name/coll_2/plugins/modules/mod_2.py b/tests/fixtures/common/collections/ansible_collections/company_name/coll_2/plugins/modules/mod_2.py index ce62d91e4..302dd7d47 100644 --- a/tests/fixtures/common/collections/ansible_collections/company_name/coll_2/plugins/modules/mod_2.py +++ b/tests/fixtures/common/collections/ansible_collections/company_name/coll_2/plugins/modules/mod_2.py @@ -1,6 +1,5 @@ """An ansible test module.""" - DOCUMENTATION = """ module: mod_2 author: diff --git a/tests/fixtures/integration/actions/inventory/using_plugin/collections/ansible_collections/test/test/plugins/inventory/test.py b/tests/fixtures/integration/actions/inventory/using_plugin/collections/ansible_collections/test/test/plugins/inventory/test.py index 1285d25a5..7232606e7 100644 --- a/tests/fixtures/integration/actions/inventory/using_plugin/collections/ansible_collections/test/test/plugins/inventory/test.py +++ b/tests/fixtures/integration/actions/inventory/using_plugin/collections/ansible_collections/test/test/plugins/inventory/test.py @@ -1,4 +1,5 @@ """A test inventory plugin.""" + from ansible.plugins.inventory import BaseInventoryPlugin diff --git a/tests/integration/_action_run_test.py b/tests/integration/_action_run_test.py index 791af085c..bc310e5ab 100644 --- a/tests/integration/_action_run_test.py +++ b/tests/integration/_action_run_test.py @@ -1,4 +1,5 @@ """Directly run an action for testing.""" + from __future__ import annotations import os diff --git a/tests/integration/_cli2runner.py b/tests/integration/_cli2runner.py index aa6574b11..7ac3c9b2d 100644 --- a/tests/integration/_cli2runner.py +++ b/tests/integration/_cli2runner.py @@ -1,4 +1,5 @@ """Test from the CLI up to to the invocation of runner.""" + from __future__ import annotations from pathlib import Path diff --git a/tests/integration/_interactions.py b/tests/integration/_interactions.py index c8ff4722c..fa39aa6f4 100644 --- a/tests/integration/_interactions.py +++ b/tests/integration/_interactions.py @@ -1,4 +1,5 @@ """Common classes to handle user interactions.""" + from __future__ import annotations import shlex diff --git a/tests/integration/_tmux_session.py b/tests/integration/_tmux_session.py index 07b7204ec..45a8de100 100644 --- a/tests/integration/_tmux_session.py +++ b/tests/integration/_tmux_session.py @@ -1,4 +1,5 @@ """The tmux session.""" + from __future__ import annotations import datetime diff --git a/tests/integration/actions/builder/base.py b/tests/integration/actions/builder/base.py index 5e873cd1c..aace5281f 100644 --- a/tests/integration/actions/builder/base.py +++ b/tests/integration/actions/builder/base.py @@ -1,4 +1,5 @@ """Base class for ``builder`` stdout tests.""" + import difflib import os diff --git a/tests/integration/actions/builder/test_stdout_tmux.py b/tests/integration/actions/builder/test_stdout_tmux.py index 1cac7e127..39840e9cb 100644 --- a/tests/integration/actions/builder/test_stdout_tmux.py +++ b/tests/integration/actions/builder/test_stdout_tmux.py @@ -1,4 +1,5 @@ """Tests for ``config`` from CLI, stdout.""" + import pytest from tests.conftest import valid_ce as ce diff --git a/tests/integration/actions/collections/test_direct_interactive_ee.py b/tests/integration/actions/collections/test_direct_interactive_ee.py index 1e8cadde2..02483fc99 100644 --- a/tests/integration/actions/collections/test_direct_interactive_ee.py +++ b/tests/integration/actions/collections/test_direct_interactive_ee.py @@ -1,4 +1,5 @@ """Tests for collections from CLI, interactive, with an EE.""" + import pytest from tests.integration._interactions import Command diff --git a/tests/integration/actions/collections/test_direct_interactive_ee_with_volmount.py b/tests/integration/actions/collections/test_direct_interactive_ee_with_volmount.py index fc3664378..63c5cd2a6 100644 --- a/tests/integration/actions/collections/test_direct_interactive_ee_with_volmount.py +++ b/tests/integration/actions/collections/test_direct_interactive_ee_with_volmount.py @@ -1,4 +1,5 @@ """Tests for collections from CLI, interactive, with an EE.""" + import pytest from tests.integration._interactions import Command diff --git a/tests/integration/actions/collections/test_direct_interactive_noee.py b/tests/integration/actions/collections/test_direct_interactive_noee.py index d3fba46e9..596a8f966 100644 --- a/tests/integration/actions/collections/test_direct_interactive_noee.py +++ b/tests/integration/actions/collections/test_direct_interactive_noee.py @@ -1,4 +1,5 @@ """Tests for collections from CLI, interactive, without an EE.""" + import pytest from tests.integration._interactions import Command diff --git a/tests/integration/actions/collections/test_mode_stdout.py b/tests/integration/actions/collections/test_mode_stdout.py index 5e664226e..6832a6899 100644 --- a/tests/integration/actions/collections/test_mode_stdout.py +++ b/tests/integration/actions/collections/test_mode_stdout.py @@ -1,4 +1,5 @@ """Collection related tests run using subprocess.""" + import json import pytest diff --git a/tests/integration/actions/collections/test_welcome_interactive_ee.py b/tests/integration/actions/collections/test_welcome_interactive_ee.py index 9566b2601..8e4b50ac7 100644 --- a/tests/integration/actions/collections/test_welcome_interactive_ee.py +++ b/tests/integration/actions/collections/test_welcome_interactive_ee.py @@ -1,4 +1,5 @@ """Tests for collections from welcome, interactive, with an EE.""" + import pytest from tests.integration._interactions import Command diff --git a/tests/integration/actions/collections/test_welcome_interactive_noee.py b/tests/integration/actions/collections/test_welcome_interactive_noee.py index 36cda261b..1e74e13d8 100644 --- a/tests/integration/actions/collections/test_welcome_interactive_noee.py +++ b/tests/integration/actions/collections/test_welcome_interactive_noee.py @@ -1,4 +1,5 @@ """Tests for collections from welcome, interactive, without an EE.""" + import pytest from tests.integration._interactions import Command diff --git a/tests/integration/actions/config/base.py b/tests/integration/actions/config/base.py index 809f6b346..028146e45 100644 --- a/tests/integration/actions/config/base.py +++ b/tests/integration/actions/config/base.py @@ -1,4 +1,5 @@ """Base class for ``config`` interactive/stdout tests.""" + import difflib import os diff --git a/tests/integration/actions/config/test_direct_interactive_ee.py b/tests/integration/actions/config/test_direct_interactive_ee.py index 6165b2c5a..daed3e2aa 100644 --- a/tests/integration/actions/config/test_direct_interactive_ee.py +++ b/tests/integration/actions/config/test_direct_interactive_ee.py @@ -1,4 +1,5 @@ """Tests for ``config`` from CLI, interactive, with an EE.""" + import pytest from tests.integration._interactions import Command diff --git a/tests/integration/actions/config/test_direct_interactive_ee_using_cfg.py b/tests/integration/actions/config/test_direct_interactive_ee_using_cfg.py index 737cb4248..98cf404a0 100644 --- a/tests/integration/actions/config/test_direct_interactive_ee_using_cfg.py +++ b/tests/integration/actions/config/test_direct_interactive_ee_using_cfg.py @@ -1,4 +1,5 @@ """Tests for ``config`` from CLI, interactive, with an EE and ansible.cfg file.""" + import pytest from tests.integration._interactions import Command diff --git a/tests/integration/actions/config/test_direct_interactive_noee.py b/tests/integration/actions/config/test_direct_interactive_noee.py index 81853b094..bd5682b1d 100644 --- a/tests/integration/actions/config/test_direct_interactive_noee.py +++ b/tests/integration/actions/config/test_direct_interactive_noee.py @@ -1,4 +1,5 @@ """Tests for ``config`` from CLI, interactive, without an EE.""" + import pytest from tests.integration._interactions import Command diff --git a/tests/integration/actions/config/test_stdout_tmux.py b/tests/integration/actions/config/test_stdout_tmux.py index 3f58e63b2..47607c4a5 100644 --- a/tests/integration/actions/config/test_stdout_tmux.py +++ b/tests/integration/actions/config/test_stdout_tmux.py @@ -1,4 +1,5 @@ """Tests for ``config`` from CLI, stdout.""" + import pytest from tests.integration._interactions import Command diff --git a/tests/integration/actions/config/test_welcome_interactive_ee.py b/tests/integration/actions/config/test_welcome_interactive_ee.py index d8445d469..b52a0b035 100644 --- a/tests/integration/actions/config/test_welcome_interactive_ee.py +++ b/tests/integration/actions/config/test_welcome_interactive_ee.py @@ -1,4 +1,5 @@ """Tests for ``config`` from welcome, interactive, with an EE.""" + import pytest from tests.integration._interactions import Command diff --git a/tests/integration/actions/config/test_welcome_interactive_noee.py b/tests/integration/actions/config/test_welcome_interactive_noee.py index f53ed5684..dd03823d4 100644 --- a/tests/integration/actions/config/test_welcome_interactive_noee.py +++ b/tests/integration/actions/config/test_welcome_interactive_noee.py @@ -1,4 +1,5 @@ """Tests for ``config`` from CLI, interactive, without an EE.""" + import pytest from tests.integration._interactions import Command diff --git a/tests/integration/actions/config/test_welcome_interactive_param_use.py b/tests/integration/actions/config/test_welcome_interactive_param_use.py index a35df48d2..31aecbce7 100644 --- a/tests/integration/actions/config/test_welcome_interactive_param_use.py +++ b/tests/integration/actions/config/test_welcome_interactive_param_use.py @@ -1,4 +1,5 @@ """Tests for ``config`` from welcome, interactive, with parameters.""" + import pytest from tests.integration._interactions import Command diff --git a/tests/integration/actions/config/test_welcome_interactive_specified_config.py b/tests/integration/actions/config/test_welcome_interactive_specified_config.py index 18e8e9563..8b39de86c 100644 --- a/tests/integration/actions/config/test_welcome_interactive_specified_config.py +++ b/tests/integration/actions/config/test_welcome_interactive_specified_config.py @@ -1,4 +1,5 @@ """Tests for ``config`` from welcome, interactive, specify configuration.""" + import pytest from tests.integration._interactions import Command diff --git a/tests/integration/actions/doc/base.py b/tests/integration/actions/doc/base.py index accdf9c4d..9f9e9bed5 100644 --- a/tests/integration/actions/doc/base.py +++ b/tests/integration/actions/doc/base.py @@ -1,4 +1,5 @@ """Base class for doc interactive/stdout tests.""" + from __future__ import annotations import difflib diff --git a/tests/integration/actions/doc/test_direct_interactive_ee.py b/tests/integration/actions/doc/test_direct_interactive_ee.py index 1ba04a0f1..84dda1b23 100644 --- a/tests/integration/actions/doc/test_direct_interactive_ee.py +++ b/tests/integration/actions/doc/test_direct_interactive_ee.py @@ -1,4 +1,5 @@ """Tests for doc from CLI, interactive, with an EE.""" + from __future__ import annotations import pytest diff --git a/tests/integration/actions/doc/test_stdout.py b/tests/integration/actions/doc/test_stdout.py index 3a298d266..0551be366 100644 --- a/tests/integration/actions/doc/test_stdout.py +++ b/tests/integration/actions/doc/test_stdout.py @@ -1,4 +1,5 @@ """Tests for doc from CLI, stdout.""" + from __future__ import annotations import pytest diff --git a/tests/integration/actions/doc/test_stdout_subprocess.py b/tests/integration/actions/doc/test_stdout_subprocess.py index 57cb5a4da..d704d859f 100644 --- a/tests/integration/actions/doc/test_stdout_subprocess.py +++ b/tests/integration/actions/doc/test_stdout_subprocess.py @@ -1,4 +1,5 @@ """Test doc using subprocess.""" + from __future__ import annotations from dataclasses import dataclass diff --git a/tests/integration/actions/doc/test_welcome_interactive_ee.py b/tests/integration/actions/doc/test_welcome_interactive_ee.py index 1689b40db..92afaab88 100644 --- a/tests/integration/actions/doc/test_welcome_interactive_ee.py +++ b/tests/integration/actions/doc/test_welcome_interactive_ee.py @@ -1,4 +1,5 @@ """Tests for doc from welcome, interactive, with an EE.""" + from __future__ import annotations import pytest diff --git a/tests/integration/actions/doc/test_welcome_interactive_noee.py b/tests/integration/actions/doc/test_welcome_interactive_noee.py index fe839dc79..5c6f75573 100644 --- a/tests/integration/actions/doc/test_welcome_interactive_noee.py +++ b/tests/integration/actions/doc/test_welcome_interactive_noee.py @@ -1,4 +1,5 @@ """Tests for doc from welcome, interactive, without an EE.""" + from __future__ import annotations import pytest diff --git a/tests/integration/actions/images/base.py b/tests/integration/actions/images/base.py index 7ffb1dba1..516627c37 100644 --- a/tests/integration/actions/images/base.py +++ b/tests/integration/actions/images/base.py @@ -1,4 +1,5 @@ """Base class for images interactive tests.""" + import difflib import os import re diff --git a/tests/integration/actions/images/test_direct_interactive_ee.py b/tests/integration/actions/images/test_direct_interactive_ee.py index 00534346a..d64ee6155 100644 --- a/tests/integration/actions/images/test_direct_interactive_ee.py +++ b/tests/integration/actions/images/test_direct_interactive_ee.py @@ -1,4 +1,5 @@ """Tests for images from CLI, interactive, with an EE.""" + import pytest from tests.integration._interactions import Command diff --git a/tests/integration/actions/images/test_direct_interactive_noee.py b/tests/integration/actions/images/test_direct_interactive_noee.py index dace5172a..deebb9d81 100644 --- a/tests/integration/actions/images/test_direct_interactive_noee.py +++ b/tests/integration/actions/images/test_direct_interactive_noee.py @@ -1,4 +1,5 @@ """Tests for images from CLI, interactive, without an EE.""" + import pytest from tests.integration._interactions import Command diff --git a/tests/integration/actions/images/test_stdout_tmux.py b/tests/integration/actions/images/test_stdout_tmux.py index d58f0c84c..135d32928 100644 --- a/tests/integration/actions/images/test_stdout_tmux.py +++ b/tests/integration/actions/images/test_stdout_tmux.py @@ -1,4 +1,5 @@ """Tests for ``images`` from CLI, stdout.""" + import pytest from tests.conftest import default_ee_image_name diff --git a/tests/integration/actions/images/test_welcome_interactive_ee.py b/tests/integration/actions/images/test_welcome_interactive_ee.py index 523ff0873..c1be572a8 100644 --- a/tests/integration/actions/images/test_welcome_interactive_ee.py +++ b/tests/integration/actions/images/test_welcome_interactive_ee.py @@ -1,4 +1,5 @@ """Tests for images from welcome, interactive, with an EE.""" + import pytest from tests.integration._interactions import Command diff --git a/tests/integration/actions/images/test_welcome_interactive_noee.py b/tests/integration/actions/images/test_welcome_interactive_noee.py index 77e6cbbeb..603338d33 100644 --- a/tests/integration/actions/images/test_welcome_interactive_noee.py +++ b/tests/integration/actions/images/test_welcome_interactive_noee.py @@ -1,4 +1,5 @@ """Tests for images from CLI, interactive, without an EE.""" + import pytest from tests.integration._interactions import Command diff --git a/tests/integration/actions/inventory/base.py b/tests/integration/actions/inventory/base.py index 46d650e43..dae93a367 100644 --- a/tests/integration/actions/inventory/base.py +++ b/tests/integration/actions/inventory/base.py @@ -1,4 +1,5 @@ """Base class for inventory interactive/stdout tests.""" + import difflib import os diff --git a/tests/integration/actions/inventory/test_direct_interactive_ee.py b/tests/integration/actions/inventory/test_direct_interactive_ee.py index b72c71092..c65027bbd 100644 --- a/tests/integration/actions/inventory/test_direct_interactive_ee.py +++ b/tests/integration/actions/inventory/test_direct_interactive_ee.py @@ -1,4 +1,5 @@ """Tests for inventory from CLI, interactive, with an EE.""" + import pytest from tests.integration._interactions import Command diff --git a/tests/integration/actions/inventory/test_direct_interactive_ee_errors.py b/tests/integration/actions/inventory/test_direct_interactive_ee_errors.py index 60fa46a4f..fb1a28f44 100644 --- a/tests/integration/actions/inventory/test_direct_interactive_ee_errors.py +++ b/tests/integration/actions/inventory/test_direct_interactive_ee_errors.py @@ -1,4 +1,5 @@ """Tests for inventory from CLI, interactive, with an EE, missing inventory.""" + import pytest from tests.integration._interactions import Command diff --git a/tests/integration/actions/inventory/test_direct_interactive_ee_using_cfg.py b/tests/integration/actions/inventory/test_direct_interactive_ee_using_cfg.py index f7271eaff..31267df37 100644 --- a/tests/integration/actions/inventory/test_direct_interactive_ee_using_cfg.py +++ b/tests/integration/actions/inventory/test_direct_interactive_ee_using_cfg.py @@ -1,4 +1,5 @@ """Tests for inventory from CLI, interactive, with an EE, using ansible.cfg.""" + import pytest from tests.integration._interactions import Command diff --git a/tests/integration/actions/inventory/test_direct_interactive_ee_using_plugin.py b/tests/integration/actions/inventory/test_direct_interactive_ee_using_plugin.py index 9eff7d543..98e8478f1 100644 --- a/tests/integration/actions/inventory/test_direct_interactive_ee_using_plugin.py +++ b/tests/integration/actions/inventory/test_direct_interactive_ee_using_plugin.py @@ -1,4 +1,5 @@ """Tests for inventory from CLI, interactive, with an EE, using inventory plugin.""" + import pytest from tests.integration._interactions import Command diff --git a/tests/integration/actions/inventory/test_direct_interactive_noee.py b/tests/integration/actions/inventory/test_direct_interactive_noee.py index feb482877..dbc5d4acf 100644 --- a/tests/integration/actions/inventory/test_direct_interactive_noee.py +++ b/tests/integration/actions/inventory/test_direct_interactive_noee.py @@ -1,4 +1,5 @@ """Tests for inventory from CLI, interactive, without an EE.""" + import pytest from tests.integration._interactions import Command diff --git a/tests/integration/actions/inventory/test_direct_interactive_noee_errors.py b/tests/integration/actions/inventory/test_direct_interactive_noee_errors.py index 4420edf37..37545c311 100644 --- a/tests/integration/actions/inventory/test_direct_interactive_noee_errors.py +++ b/tests/integration/actions/inventory/test_direct_interactive_noee_errors.py @@ -1,4 +1,5 @@ """Tests for inventory from CLI, interactive, with an EE, missing inventory.""" + import pytest from tests.integration._interactions import Command diff --git a/tests/integration/actions/inventory/test_direct_interactive_noee_using_cfg.py b/tests/integration/actions/inventory/test_direct_interactive_noee_using_cfg.py index 64e9a66ea..a15c49322 100644 --- a/tests/integration/actions/inventory/test_direct_interactive_noee_using_cfg.py +++ b/tests/integration/actions/inventory/test_direct_interactive_noee_using_cfg.py @@ -1,4 +1,5 @@ """Tests for inventory from CLI, interactive, without an EE, using ansible.cfg.""" + import pytest from tests.integration._interactions import Command diff --git a/tests/integration/actions/inventory/test_direct_interactive_noee_using_plugin.py b/tests/integration/actions/inventory/test_direct_interactive_noee_using_plugin.py index dff94a5f3..ef399d18a 100644 --- a/tests/integration/actions/inventory/test_direct_interactive_noee_using_plugin.py +++ b/tests/integration/actions/inventory/test_direct_interactive_noee_using_plugin.py @@ -1,4 +1,5 @@ """Tests for inventory from CLI, interactive, with an EE, using inventory plugin.""" + import pytest from tests.integration._interactions import Command diff --git a/tests/integration/actions/inventory/test_stdout_tmux.py b/tests/integration/actions/inventory/test_stdout_tmux.py index 0a123767a..4ca7d9f57 100644 --- a/tests/integration/actions/inventory/test_stdout_tmux.py +++ b/tests/integration/actions/inventory/test_stdout_tmux.py @@ -1,4 +1,5 @@ """Tests for inventory from CLI, stdout.""" + import pytest from tests.integration._interactions import Command diff --git a/tests/integration/actions/inventory/test_welcome_interactive_ee.py b/tests/integration/actions/inventory/test_welcome_interactive_ee.py index a5dd6c56f..00b4ee46f 100644 --- a/tests/integration/actions/inventory/test_welcome_interactive_ee.py +++ b/tests/integration/actions/inventory/test_welcome_interactive_ee.py @@ -1,4 +1,5 @@ """Tests for inventory from welcome, interactive, with an EE.""" + import pytest from tests.integration._interactions import Command diff --git a/tests/integration/actions/inventory/test_welcome_interactive_noee.py b/tests/integration/actions/inventory/test_welcome_interactive_noee.py index ae7d91d37..2fa7cb5a9 100644 --- a/tests/integration/actions/inventory/test_welcome_interactive_noee.py +++ b/tests/integration/actions/inventory/test_welcome_interactive_noee.py @@ -1,4 +1,5 @@ """Tests for inventory from welcome, interactive, without an EE.""" + import pytest from tests.integration._interactions import Command diff --git a/tests/integration/actions/lint/base.py b/tests/integration/actions/lint/base.py index 7c7423e36..ac1ba9ecf 100644 --- a/tests/integration/actions/lint/base.py +++ b/tests/integration/actions/lint/base.py @@ -1,4 +1,5 @@ """Base class for lint interactive tests.""" + from __future__ import annotations import difflib diff --git a/tests/integration/actions/lint/test_direct_interactive_ee.py b/tests/integration/actions/lint/test_direct_interactive_ee.py index e9b13d487..2c83fb219 100644 --- a/tests/integration/actions/lint/test_direct_interactive_ee.py +++ b/tests/integration/actions/lint/test_direct_interactive_ee.py @@ -1,4 +1,5 @@ """Tests for lint from CLI, interactive, with an EE.""" + import pytest from tests.integration._interactions import Command diff --git a/tests/integration/actions/lint/test_direct_interactive_no_errors_ee.py b/tests/integration/actions/lint/test_direct_interactive_no_errors_ee.py index d0f987c75..5fd176685 100644 --- a/tests/integration/actions/lint/test_direct_interactive_no_errors_ee.py +++ b/tests/integration/actions/lint/test_direct_interactive_no_errors_ee.py @@ -1,4 +1,5 @@ """Tests for lint (with no errors) from CLI, interactive, with an EE.""" + import os import pytest diff --git a/tests/integration/actions/lint/test_direct_interactive_noee.py b/tests/integration/actions/lint/test_direct_interactive_noee.py index 3495e8d43..e64c976c0 100644 --- a/tests/integration/actions/lint/test_direct_interactive_noee.py +++ b/tests/integration/actions/lint/test_direct_interactive_noee.py @@ -1,4 +1,5 @@ """Tests for lint from CLI, interactive, without an EE.""" + import pytest from tests.integration._interactions import Command diff --git a/tests/integration/actions/lint/test_stdout_tmux.py b/tests/integration/actions/lint/test_stdout_tmux.py index 4dd7f0d1e..48be8fb63 100644 --- a/tests/integration/actions/lint/test_stdout_tmux.py +++ b/tests/integration/actions/lint/test_stdout_tmux.py @@ -1,4 +1,5 @@ """Tests for ``lint`` from CLI, stdout.""" + import os import pytest diff --git a/tests/integration/actions/lint/test_welcome_interactive_ee.py b/tests/integration/actions/lint/test_welcome_interactive_ee.py index c853a66c6..06005a969 100644 --- a/tests/integration/actions/lint/test_welcome_interactive_ee.py +++ b/tests/integration/actions/lint/test_welcome_interactive_ee.py @@ -1,4 +1,5 @@ """Tests for lint from welcome, interactive, with an EE.""" + import pytest from tests.integration._interactions import Command diff --git a/tests/integration/actions/lint/test_welcome_interactive_noee.py b/tests/integration/actions/lint/test_welcome_interactive_noee.py index 4e46ca1c9..54c44ce69 100644 --- a/tests/integration/actions/lint/test_welcome_interactive_noee.py +++ b/tests/integration/actions/lint/test_welcome_interactive_noee.py @@ -1,4 +1,5 @@ """Tests for lint from welcome, interactive, without an EE.""" + import pytest from tests.integration._interactions import Command diff --git a/tests/integration/actions/replay/base.py b/tests/integration/actions/replay/base.py index 887d4557f..1b05ef77f 100644 --- a/tests/integration/actions/replay/base.py +++ b/tests/integration/actions/replay/base.py @@ -1,4 +1,5 @@ """Base class for replay interactive tests.""" + import difflib import os diff --git a/tests/integration/actions/replay/test_direct_interactive_ee.py b/tests/integration/actions/replay/test_direct_interactive_ee.py index 702d8ad78..e4e7d77fc 100644 --- a/tests/integration/actions/replay/test_direct_interactive_ee.py +++ b/tests/integration/actions/replay/test_direct_interactive_ee.py @@ -1,4 +1,5 @@ """Tests for replay from CLI, interactive, with an EE.""" + import pytest from .base import PLAYBOOK_ARTIFACT diff --git a/tests/integration/actions/replay/test_direct_interactive_noee.py b/tests/integration/actions/replay/test_direct_interactive_noee.py index e6ffc8fc4..8321927c1 100644 --- a/tests/integration/actions/replay/test_direct_interactive_noee.py +++ b/tests/integration/actions/replay/test_direct_interactive_noee.py @@ -1,4 +1,5 @@ """Tests for replay from CLI, interactive, without an EE.""" + import pytest from .base import PLAYBOOK_ARTIFACT diff --git a/tests/integration/actions/replay/test_welcome_interactive_ee.py b/tests/integration/actions/replay/test_welcome_interactive_ee.py index da0f5305d..6768ab7a2 100644 --- a/tests/integration/actions/replay/test_welcome_interactive_ee.py +++ b/tests/integration/actions/replay/test_welcome_interactive_ee.py @@ -1,4 +1,5 @@ """Tests for replay from welcome, interactive, with an EE.""" + import pytest from .base import PLAYBOOK_ARTIFACT diff --git a/tests/integration/actions/replay/test_welcome_interactive_noee.py b/tests/integration/actions/replay/test_welcome_interactive_noee.py index 5702228be..92428fc1d 100644 --- a/tests/integration/actions/replay/test_welcome_interactive_noee.py +++ b/tests/integration/actions/replay/test_welcome_interactive_noee.py @@ -1,4 +1,5 @@ """Tests for replay from welcome, interactive, without an EE.""" + import pytest from .base import PLAYBOOK_ARTIFACT diff --git a/tests/integration/actions/run/base.py b/tests/integration/actions/run/base.py index 5cc7b5e36..ddc7a6212 100644 --- a/tests/integration/actions/run/base.py +++ b/tests/integration/actions/run/base.py @@ -1,4 +1,5 @@ """Base class for run interactive/stdout tests.""" + from __future__ import annotations import difflib diff --git a/tests/integration/actions/run/test_direct_interactive_ee.py b/tests/integration/actions/run/test_direct_interactive_ee.py index 7ef160860..25fd0b813 100644 --- a/tests/integration/actions/run/test_direct_interactive_ee.py +++ b/tests/integration/actions/run/test_direct_interactive_ee.py @@ -1,4 +1,5 @@ """Tests for run from CLI, interactive, with an EE.""" + import pytest from tests.integration._interactions import Command diff --git a/tests/integration/actions/run/test_direct_interactive_ee_collection.py b/tests/integration/actions/run/test_direct_interactive_ee_collection.py index daf81ef3a..472e1ae33 100644 --- a/tests/integration/actions/run/test_direct_interactive_ee_collection.py +++ b/tests/integration/actions/run/test_direct_interactive_ee_collection.py @@ -1,4 +1,5 @@ """Tests for run from CLI, interactive, with an EE.""" + import pytest from tests.integration._interactions import Command diff --git a/tests/integration/actions/run/test_direct_interactive_noee.py b/tests/integration/actions/run/test_direct_interactive_noee.py index 66b85fb10..e13591e63 100644 --- a/tests/integration/actions/run/test_direct_interactive_noee.py +++ b/tests/integration/actions/run/test_direct_interactive_noee.py @@ -1,4 +1,5 @@ """Tests for run from CLI, interactive, without an EE.""" + import pytest from tests.integration._interactions import Command diff --git a/tests/integration/actions/run/test_direct_interactive_noee_collection.py b/tests/integration/actions/run/test_direct_interactive_noee_collection.py index 6cb5ea6b8..35707cdbc 100644 --- a/tests/integration/actions/run/test_direct_interactive_noee_collection.py +++ b/tests/integration/actions/run/test_direct_interactive_noee_collection.py @@ -1,4 +1,5 @@ """Tests for run from CLI, interactive, no EE, using collection playbook.""" + import pytest from tests.integration._interactions import Command diff --git a/tests/integration/actions/run/test_stdout_tmux.py b/tests/integration/actions/run/test_stdout_tmux.py index 6774d3ed4..110975457 100644 --- a/tests/integration/actions/run/test_stdout_tmux.py +++ b/tests/integration/actions/run/test_stdout_tmux.py @@ -1,4 +1,5 @@ """Tests for run from CLI, stdout.""" + import pytest from tests.integration._interactions import Command diff --git a/tests/integration/actions/run/test_welcome_interactive_ee.py b/tests/integration/actions/run/test_welcome_interactive_ee.py index d562eccc4..e81b4b074 100644 --- a/tests/integration/actions/run/test_welcome_interactive_ee.py +++ b/tests/integration/actions/run/test_welcome_interactive_ee.py @@ -1,4 +1,5 @@ """Tests for run from welcome, interactive, with an EE.""" + import pytest from tests.integration._interactions import Command diff --git a/tests/integration/actions/run/test_welcome_interactive_noee.py b/tests/integration/actions/run/test_welcome_interactive_noee.py index 35151b5ad..cfc090458 100644 --- a/tests/integration/actions/run/test_welcome_interactive_noee.py +++ b/tests/integration/actions/run/test_welcome_interactive_noee.py @@ -1,4 +1,5 @@ """Tests for run from welcome, interactive, without an EE.""" + import pytest from tests.integration._interactions import Command diff --git a/tests/integration/actions/run_unicode/base.py b/tests/integration/actions/run_unicode/base.py index ee78e41cc..562bc1d9a 100644 --- a/tests/integration/actions/run_unicode/base.py +++ b/tests/integration/actions/run_unicode/base.py @@ -1,4 +1,5 @@ """Base class for run interactive/stdout tests, with unicode.""" + from __future__ import annotations import difflib diff --git a/tests/integration/actions/run_unicode/test_direct_interactive_ee.py b/tests/integration/actions/run_unicode/test_direct_interactive_ee.py index caf6cb9b1..cee9e523a 100644 --- a/tests/integration/actions/run_unicode/test_direct_interactive_ee.py +++ b/tests/integration/actions/run_unicode/test_direct_interactive_ee.py @@ -1,4 +1,5 @@ """Tests for run from CLI, interactive, with an EE, with unicode.""" + import pytest from tests.integration._interactions import Command diff --git a/tests/integration/actions/run_unicode/test_direct_interactive_noee.py b/tests/integration/actions/run_unicode/test_direct_interactive_noee.py index 214e2d1e3..73735f862 100644 --- a/tests/integration/actions/run_unicode/test_direct_interactive_noee.py +++ b/tests/integration/actions/run_unicode/test_direct_interactive_noee.py @@ -1,4 +1,5 @@ """Tests for run from CLI, interactive, without an EE, with unicode.""" + import pytest from tests.integration._interactions import Command diff --git a/tests/integration/actions/run_unicode/test_stdout_tmux.py b/tests/integration/actions/run_unicode/test_stdout_tmux.py index 522b4bf43..c887cc033 100644 --- a/tests/integration/actions/run_unicode/test_stdout_tmux.py +++ b/tests/integration/actions/run_unicode/test_stdout_tmux.py @@ -1,4 +1,5 @@ """Tests for run from CLI, stdout, with unicode.""" + import pytest from tests.integration._interactions import Command diff --git a/tests/integration/actions/settings/test_stdout_tmux.py b/tests/integration/actions/settings/test_stdout_tmux.py index eda6ad49f..79b303f55 100644 --- a/tests/integration/actions/settings/test_stdout_tmux.py +++ b/tests/integration/actions/settings/test_stdout_tmux.py @@ -1,4 +1,5 @@ """Tests for ``settings`` from CLI, stdout.""" + import pytest from tests.integration._interactions import Command diff --git a/tests/integration/actions/stdout/base.py b/tests/integration/actions/stdout/base.py index 8ecdad1ae..48e9e5f88 100644 --- a/tests/integration/actions/stdout/base.py +++ b/tests/integration/actions/stdout/base.py @@ -1,4 +1,5 @@ """Base class for stdout interactive tests.""" + import difflib import os diff --git a/tests/integration/actions/stdout/test_direct_interactive_ee.py b/tests/integration/actions/stdout/test_direct_interactive_ee.py index d4cb32a64..ee25b11e4 100644 --- a/tests/integration/actions/stdout/test_direct_interactive_ee.py +++ b/tests/integration/actions/stdout/test_direct_interactive_ee.py @@ -1,4 +1,5 @@ """Tests for ``stdout`` from CLI, interactive, with an EE.""" + import pytest from .base import ANSIBLE_PLAYBOOK diff --git a/tests/integration/actions/stdout/test_direct_interactive_noee.py b/tests/integration/actions/stdout/test_direct_interactive_noee.py index 8e6395e10..626711926 100644 --- a/tests/integration/actions/stdout/test_direct_interactive_noee.py +++ b/tests/integration/actions/stdout/test_direct_interactive_noee.py @@ -1,4 +1,5 @@ """Tests for ``stdout`` from CLI, interactive, without an EE.""" + import pytest from .base import ANSIBLE_PLAYBOOK diff --git a/tests/integration/actions/stdout/test_welcome_interactive_ee.py b/tests/integration/actions/stdout/test_welcome_interactive_ee.py index 325de46fd..7abc6134f 100644 --- a/tests/integration/actions/stdout/test_welcome_interactive_ee.py +++ b/tests/integration/actions/stdout/test_welcome_interactive_ee.py @@ -1,4 +1,5 @@ """Tests for stdout from welcome, interactive, with an EE.""" + import pytest from .base import ANSIBLE_PLAYBOOK diff --git a/tests/integration/actions/stdout/test_welcome_interactive_noee.py b/tests/integration/actions/stdout/test_welcome_interactive_noee.py index 3eb328e52..46c33724e 100644 --- a/tests/integration/actions/stdout/test_welcome_interactive_noee.py +++ b/tests/integration/actions/stdout/test_welcome_interactive_noee.py @@ -1,4 +1,5 @@ """Tests for stdout from welcome, interactive, without an EE.""" + import pytest from .base import ANSIBLE_PLAYBOOK diff --git a/tests/integration/actions/templar/base.py b/tests/integration/actions/templar/base.py index 9d9ecdaf9..721ceb79d 100644 --- a/tests/integration/actions/templar/base.py +++ b/tests/integration/actions/templar/base.py @@ -1,4 +1,5 @@ """Base class for templar interactive tests.""" + from __future__ import annotations import difflib diff --git a/tests/integration/actions/templar/test_direct_interactive_ee.py b/tests/integration/actions/templar/test_direct_interactive_ee.py index 8140c1f94..a4e2b2bc0 100644 --- a/tests/integration/actions/templar/test_direct_interactive_ee.py +++ b/tests/integration/actions/templar/test_direct_interactive_ee.py @@ -1,4 +1,5 @@ """Tests for templar from CLI, interactive, with an EE.""" + import pytest from tests.integration._interactions import Command diff --git a/tests/integration/actions/templar/test_direct_interactive_ee_readme.py b/tests/integration/actions/templar/test_direct_interactive_ee_readme.py index d3a3165c6..879b8f922 100644 --- a/tests/integration/actions/templar/test_direct_interactive_ee_readme.py +++ b/tests/integration/actions/templar/test_direct_interactive_ee_readme.py @@ -1,4 +1,5 @@ """Tests for templar from CLI, interactive, with an EE, check {{ readme }}.""" + import pytest from tests.integration._interactions import Command diff --git a/tests/integration/actions/templar/test_direct_interactive_noee.py b/tests/integration/actions/templar/test_direct_interactive_noee.py index b50e9aa3d..1bddbb73f 100644 --- a/tests/integration/actions/templar/test_direct_interactive_noee.py +++ b/tests/integration/actions/templar/test_direct_interactive_noee.py @@ -1,4 +1,5 @@ """Tests for templar from CLI, interactive, without an EE.""" + import pytest from tests.integration._interactions import Command diff --git a/tests/integration/actions/templar/test_welcome_interactive_ee.py b/tests/integration/actions/templar/test_welcome_interactive_ee.py index db65ed95a..daf7f39f9 100644 --- a/tests/integration/actions/templar/test_welcome_interactive_ee.py +++ b/tests/integration/actions/templar/test_welcome_interactive_ee.py @@ -1,4 +1,5 @@ """Tests for templar from welcome, interactive, with an EE.""" + import pytest from tests.integration._interactions import Command diff --git a/tests/integration/actions/templar/test_welcome_interactive_noee.py b/tests/integration/actions/templar/test_welcome_interactive_noee.py index 4154ebc50..322f71fc9 100644 --- a/tests/integration/actions/templar/test_welcome_interactive_noee.py +++ b/tests/integration/actions/templar/test_welcome_interactive_noee.py @@ -1,4 +1,5 @@ """Tests for templar from welcome, interactive, without an EE.""" + import pytest from tests.integration._interactions import Command diff --git a/tests/integration/conftest.py b/tests/integration/conftest.py index 6f89fbf00..06fa6d8ce 100644 --- a/tests/integration/conftest.py +++ b/tests/integration/conftest.py @@ -1,4 +1,5 @@ """Integration test fixtures.""" + from __future__ import annotations import os diff --git a/tests/integration/diagnostics/test_from_cli.py b/tests/integration/diagnostics/test_from_cli.py index 6a3ca3da1..893d8eb5c 100644 --- a/tests/integration/diagnostics/test_from_cli.py +++ b/tests/integration/diagnostics/test_from_cli.py @@ -1,4 +1,5 @@ """Check diagnostics output.""" + from __future__ import annotations import json diff --git a/tests/integration/settings_from_cli/test_json_schema_errors.py b/tests/integration/settings_from_cli/test_json_schema_errors.py index 98105f29b..c0b318ef8 100644 --- a/tests/integration/settings_from_cli/test_json_schema_errors.py +++ b/tests/integration/settings_from_cli/test_json_schema_errors.py @@ -1,4 +1,5 @@ """Check exit messages for json schema validation.""" + from __future__ import annotations import os diff --git a/tests/integration/test_execution_environment.py b/tests/integration/test_execution_environment.py index e6d1aa294..07bdcc993 100644 --- a/tests/integration/test_execution_environment.py +++ b/tests/integration/test_execution_environment.py @@ -1,4 +1,5 @@ """Test the use of ``execution-environment`` through to runner.""" + from __future__ import annotations import os diff --git a/tests/integration/test_execution_environment_image.py b/tests/integration/test_execution_environment_image.py index b4d9d311c..e24243020 100644 --- a/tests/integration/test_execution_environment_image.py +++ b/tests/integration/test_execution_environment_image.py @@ -1,4 +1,5 @@ """Test the use of ``execution-environment-image`` through to runner.""" + from __future__ import annotations import os diff --git a/tests/integration/test_pass_environment_variable.py b/tests/integration/test_pass_environment_variable.py index b5318fce7..ae8296ae7 100644 --- a/tests/integration/test_pass_environment_variable.py +++ b/tests/integration/test_pass_environment_variable.py @@ -1,4 +1,5 @@ """Test the use of ``pass-environment-variable`` through to runner.""" + from __future__ import annotations import os diff --git a/tests/integration/test_set_environment_variable.py b/tests/integration/test_set_environment_variable.py index 45e9f18d2..c3e1edd4c 100644 --- a/tests/integration/test_set_environment_variable.py +++ b/tests/integration/test_set_environment_variable.py @@ -1,4 +1,5 @@ """Test the use of ``set-environment-variable`` through to runner.""" + from __future__ import annotations import os diff --git a/tests/integration/test_stdout_exit_codes.py b/tests/integration/test_stdout_exit_codes.py index 0baa257a7..6857274a1 100644 --- a/tests/integration/test_stdout_exit_codes.py +++ b/tests/integration/test_stdout_exit_codes.py @@ -1,4 +1,5 @@ """Check return codes from mode ``stdout``.""" + from __future__ import annotations import os diff --git a/tests/integration/version_migration/test_v1_v2_settings.py b/tests/integration/version_migration/test_v1_v2_settings.py index 0860a6092..4d69dd8ae 100644 --- a/tests/integration/version_migration/test_v1_v2_settings.py +++ b/tests/integration/version_migration/test_v1_v2_settings.py @@ -1,4 +1,5 @@ """Check migration output.""" + import filecmp import os import shutil diff --git a/tests/unit/actions/collections/test_collection_doc_cache_path.py b/tests/unit/actions/collections/test_collection_doc_cache_path.py index d25e082c3..660aaedbd 100644 --- a/tests/unit/actions/collections/test_collection_doc_cache_path.py +++ b/tests/unit/actions/collections/test_collection_doc_cache_path.py @@ -1,4 +1,5 @@ """Test the use of ``collection-doc-cache-path`` through to runner.""" + import shlex from pathlib import Path diff --git a/tests/unit/actions/run/test_artifact.py b/tests/unit/actions/run/test_artifact.py index 41e6ff103..7bbe22489 100644 --- a/tests/unit/actions/run/test_artifact.py +++ b/tests/unit/actions/run/test_artifact.py @@ -1,4 +1,5 @@ """Unit tests for artifact creation. in the run action.""" + from __future__ import annotations import logging diff --git a/tests/unit/actions/run/test_runner_async.py b/tests/unit/actions/run/test_runner_async.py index f55a4399c..90679cff8 100644 --- a/tests/unit/actions/run/test_runner_async.py +++ b/tests/unit/actions/run/test_runner_async.py @@ -1,4 +1,5 @@ """Test settings through to runner.""" + from __future__ import annotations from copy import deepcopy diff --git a/tests/unit/actions/test_config.py b/tests/unit/actions/test_config.py index 91eaa7633..c4bce3a9f 100644 --- a/tests/unit/actions/test_config.py +++ b/tests/unit/actions/test_config.py @@ -1,4 +1,5 @@ """Unit tests for the ``config`` action.""" + import curses from ansible_navigator.actions.config import color_menu diff --git a/tests/unit/actions/test_inventory.py b/tests/unit/actions/test_inventory.py index 79cfb7b7e..017dc1d44 100644 --- a/tests/unit/actions/test_inventory.py +++ b/tests/unit/actions/test_inventory.py @@ -1,4 +1,5 @@ """Unit tests for the inventory action.""" + import curses from ansible_navigator.actions.inventory import color_menu diff --git a/tests/unit/configuration_subsystem/conftest.py b/tests/unit/configuration_subsystem/conftest.py index 6644751e8..e0a55ada2 100644 --- a/tests/unit/configuration_subsystem/conftest.py +++ b/tests/unit/configuration_subsystem/conftest.py @@ -1,4 +1,5 @@ """Fixtures for configuration subsystem tests.""" + from __future__ import annotations import os diff --git a/tests/unit/configuration_subsystem/defaults.py b/tests/unit/configuration_subsystem/defaults.py index 23c1bee5e..96c87579b 100644 --- a/tests/unit/configuration_subsystem/defaults.py +++ b/tests/unit/configuration_subsystem/defaults.py @@ -1,4 +1,5 @@ """Defaults for adjacent tests.""" + import os from tests.defaults import FIXTURES_DIR diff --git a/tests/unit/configuration_subsystem/post_processors/test_execution_environment_volume_mounts.py b/tests/unit/configuration_subsystem/post_processors/test_execution_environment_volume_mounts.py index a55c49ba0..511a55a61 100644 --- a/tests/unit/configuration_subsystem/post_processors/test_execution_environment_volume_mounts.py +++ b/tests/unit/configuration_subsystem/post_processors/test_execution_environment_volume_mounts.py @@ -1,4 +1,5 @@ """Tests for the execution environment volume mount post processor.""" + from __future__ import annotations from collections.abc import Iterable diff --git a/tests/unit/configuration_subsystem/post_processors/test_inventory.py b/tests/unit/configuration_subsystem/post_processors/test_inventory.py index 85bbaca30..a2d3cc4fc 100644 --- a/tests/unit/configuration_subsystem/post_processors/test_inventory.py +++ b/tests/unit/configuration_subsystem/post_processors/test_inventory.py @@ -1,4 +1,5 @@ """Test the use of the ansible.cfg file for inventory.""" + from copy import deepcopy from pathlib import Path diff --git a/tests/unit/configuration_subsystem/post_processors/test_playbook_artifact_save_as.py b/tests/unit/configuration_subsystem/post_processors/test_playbook_artifact_save_as.py index 90a0b5149..19405b957 100644 --- a/tests/unit/configuration_subsystem/post_processors/test_playbook_artifact_save_as.py +++ b/tests/unit/configuration_subsystem/post_processors/test_playbook_artifact_save_as.py @@ -1,4 +1,5 @@ """Tests for the playbook artifact save as post processor.""" + from __future__ import annotations from copy import deepcopy diff --git a/tests/unit/configuration_subsystem/post_processors/test_time_zone.py b/tests/unit/configuration_subsystem/post_processors/test_time_zone.py index 27a736544..43479da2a 100644 --- a/tests/unit/configuration_subsystem/post_processors/test_time_zone.py +++ b/tests/unit/configuration_subsystem/post_processors/test_time_zone.py @@ -1,4 +1,5 @@ """Tests for the time zone post processor.""" + from __future__ import annotations from copy import deepcopy diff --git a/tests/unit/configuration_subsystem/test_ansible_config_parse.py b/tests/unit/configuration_subsystem/test_ansible_config_parse.py index bab43ed1d..2fa3474ee 100644 --- a/tests/unit/configuration_subsystem/test_ansible_config_parse.py +++ b/tests/unit/configuration_subsystem/test_ansible_config_parse.py @@ -1,4 +1,5 @@ """Test the basic parsing of an ansible.cfg file.""" + from copy import deepcopy from pathlib import Path diff --git a/tests/unit/configuration_subsystem/test_broken_settings.py b/tests/unit/configuration_subsystem/test_broken_settings.py index 6a4e85ee6..5ba58f624 100644 --- a/tests/unit/configuration_subsystem/test_broken_settings.py +++ b/tests/unit/configuration_subsystem/test_broken_settings.py @@ -1,4 +1,5 @@ """Tests using broken settings files.""" + import os from .conftest import GenerateConfigCallable diff --git a/tests/unit/configuration_subsystem/test_configurator.py b/tests/unit/configuration_subsystem/test_configurator.py index 1041a8769..95a974b71 100644 --- a/tests/unit/configuration_subsystem/test_configurator.py +++ b/tests/unit/configuration_subsystem/test_configurator.py @@ -1,4 +1,5 @@ """Some tests directly for ``Configurator``.""" + import os from copy import deepcopy diff --git a/tests/unit/configuration_subsystem/test_container_engine_auto.py b/tests/unit/configuration_subsystem/test_container_engine_auto.py index b2a14c01b..ed83bbf44 100644 --- a/tests/unit/configuration_subsystem/test_container_engine_auto.py +++ b/tests/unit/configuration_subsystem/test_container_engine_auto.py @@ -1,4 +1,5 @@ """Tests related to the auto detection of the container engine.""" + import shutil diff --git a/tests/unit/configuration_subsystem/test_entries_sanity.py b/tests/unit/configuration_subsystem/test_entries_sanity.py index bb6e5918a..d7a74f7d7 100644 --- a/tests/unit/configuration_subsystem/test_entries_sanity.py +++ b/tests/unit/configuration_subsystem/test_entries_sanity.py @@ -1,4 +1,5 @@ """Some sanity and syntax checking of the navigator configuration.""" + from collections import Counter from pathlib import Path diff --git a/tests/unit/configuration_subsystem/test_fixture_sanity.py b/tests/unit/configuration_subsystem/test_fixture_sanity.py index 8e407e049..e46a66e36 100644 --- a/tests/unit/configuration_subsystem/test_fixture_sanity.py +++ b/tests/unit/configuration_subsystem/test_fixture_sanity.py @@ -3,6 +3,7 @@ Some handy tests to ensure the fixture data has entries for for all entries. """ + import os from ansible_navigator.configuration_subsystem import NavigatorConfiguration diff --git a/tests/unit/configuration_subsystem/test_invalid_params.py b/tests/unit/configuration_subsystem/test_invalid_params.py index 487484f16..c40016a59 100644 --- a/tests/unit/configuration_subsystem/test_invalid_params.py +++ b/tests/unit/configuration_subsystem/test_invalid_params.py @@ -1,4 +1,5 @@ """Tests using invalid parameters.""" + import tempfile import pytest diff --git a/tests/unit/configuration_subsystem/test_json_schema.py b/tests/unit/configuration_subsystem/test_json_schema.py index bdc8043ff..f1c529df5 100644 --- a/tests/unit/configuration_subsystem/test_json_schema.py +++ b/tests/unit/configuration_subsystem/test_json_schema.py @@ -1,4 +1,5 @@ """Tests for the transformation of settings to a json schema.""" + from __future__ import annotations from copy import deepcopy diff --git a/tests/unit/configuration_subsystem/test_mode_subcommand_action.py b/tests/unit/configuration_subsystem/test_mode_subcommand_action.py index 743576b56..034e3fc2c 100644 --- a/tests/unit/configuration_subsystem/test_mode_subcommand_action.py +++ b/tests/unit/configuration_subsystem/test_mode_subcommand_action.py @@ -2,6 +2,7 @@ Use invalid package and subcommand names """ + from ansible_navigator.configuration_subsystem.configurator import Configurator from ansible_navigator.configuration_subsystem.definitions import ApplicationConfiguration from ansible_navigator.configuration_subsystem.definitions import SettingsEntry diff --git a/tests/unit/configuration_subsystem/test_sample_configurations.py b/tests/unit/configuration_subsystem/test_sample_configurations.py index b5353a79e..6c69ef65a 100644 --- a/tests/unit/configuration_subsystem/test_sample_configurations.py +++ b/tests/unit/configuration_subsystem/test_sample_configurations.py @@ -3,6 +3,7 @@ Prove code paths not covered by the ansible-navigator configuration """ + import pytest from ansible_navigator.configuration_subsystem.configurator import Configurator diff --git a/tests/unit/configuration_subsystem/test_settings_effective.py b/tests/unit/configuration_subsystem/test_settings_effective.py index d945c74ba..2b4527c1d 100644 --- a/tests/unit/configuration_subsystem/test_settings_effective.py +++ b/tests/unit/configuration_subsystem/test_settings_effective.py @@ -1,4 +1,5 @@ """Test the ability to recreate a settings file post configuration.""" + from __future__ import annotations import operator diff --git a/tests/unit/logger/test_append.py b/tests/unit/logger/test_append.py index 28ffcf914..1040113cc 100644 --- a/tests/unit/logger/test_append.py +++ b/tests/unit/logger/test_append.py @@ -1,4 +1,5 @@ """Tests for appending to the log.""" + from __future__ import annotations from dataclasses import dataclass diff --git a/tests/unit/logger/test_time_zone.py b/tests/unit/logger/test_time_zone.py index 2cda404bd..ab37a81b2 100644 --- a/tests/unit/logger/test_time_zone.py +++ b/tests/unit/logger/test_time_zone.py @@ -1,4 +1,5 @@ """Tests for time zone support in the log.""" + from __future__ import annotations import re diff --git a/tests/unit/test_cli.py b/tests/unit/test_cli.py index 55a1cbd37..bfdfbdf47 100644 --- a/tests/unit/test_cli.py +++ b/tests/unit/test_cli.py @@ -1,4 +1,5 @@ """Tests using the CLi directly.""" + import shlex from copy import deepcopy diff --git a/tests/unit/ui_framework/test_colorize.py b/tests/unit/ui_framework/test_colorize.py index e29bbdcd9..38e1cee72 100644 --- a/tests/unit/ui_framework/test_colorize.py +++ b/tests/unit/ui_framework/test_colorize.py @@ -1,4 +1,5 @@ """Tests for colorize.""" + from __future__ import annotations from typing import NamedTuple diff --git a/tests/unit/ui_framework/test_progress_bar.py b/tests/unit/ui_framework/test_progress_bar.py index 3564702db..5cbe12b4c 100644 --- a/tests/unit/ui_framework/test_progress_bar.py +++ b/tests/unit/ui_framework/test_progress_bar.py @@ -1,4 +1,5 @@ """Test for the conversion of percent string to progress bars.""" + from dataclasses import dataclass from ansible_navigator.content_defs import ContentBase diff --git a/tests/unit/utils/test_dict_merge.py b/tests/unit/utils/test_dict_merge.py index b289a0e98..831a667aa 100644 --- a/tests/unit/utils/test_dict_merge.py +++ b/tests/unit/utils/test_dict_merge.py @@ -1,4 +1,5 @@ """Tests for utils.dict_merge.""" + from collections import deque import pytest diff --git a/tests/unit/utils/test_functions.py b/tests/unit/utils/test_functions.py index ab0709975..717610c56 100644 --- a/tests/unit/utils/test_functions.py +++ b/tests/unit/utils/test_functions.py @@ -1,4 +1,5 @@ """Test the functions exposed in the :mod:`~ansible_navigator.utils.functions` subpackage.""" + from __future__ import annotations import os diff --git a/tests/unit/utils/test_serialize_dataclass.py b/tests/unit/utils/test_serialize_dataclass.py index dd9bce74f..0b6048a97 100644 --- a/tests/unit/utils/test_serialize_dataclass.py +++ b/tests/unit/utils/test_serialize_dataclass.py @@ -1,4 +1,5 @@ """Tests for serializing a dataclass.""" + from __future__ import annotations from collections.abc import Iterable diff --git a/tests/unit/utils/test_unserializable.py b/tests/unit/utils/test_unserializable.py index f54cd40e3..facab1229 100644 --- a/tests/unit/utils/test_unserializable.py +++ b/tests/unit/utils/test_unserializable.py @@ -1,4 +1,5 @@ """Tests for content that cannot be serialized.""" + from __future__ import annotations from collections import deque