mirror of
https://github.com/ansible-collections/community.docker.git
synced 2026-01-28 23:16:22 +00:00
Re-sort imports.
This commit is contained in:
parent
42121e3326
commit
712d920941
@ -10,7 +10,6 @@ import sys
|
||||
|
||||
import nox
|
||||
|
||||
|
||||
try:
|
||||
import antsibull_nox
|
||||
except ImportError:
|
||||
|
||||
@ -9,7 +9,6 @@
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
|
||||
DOCUMENTATION = r"""
|
||||
author:
|
||||
- Lorin Hochestein (!UNKNOWN)
|
||||
@ -131,7 +130,6 @@ from ansible_collections.community.docker.plugins.module_utils._version import (
|
||||
LooseVersion,
|
||||
)
|
||||
|
||||
|
||||
display = Display()
|
||||
|
||||
|
||||
|
||||
@ -4,7 +4,6 @@
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
|
||||
DOCUMENTATION = r"""
|
||||
author:
|
||||
- Felix Fontein (@felixfontein)
|
||||
@ -138,7 +137,6 @@ from ansible_collections.community.docker.plugins.plugin_utils._socket_handler i
|
||||
DockerSocketHandler,
|
||||
)
|
||||
|
||||
|
||||
if t.TYPE_CHECKING:
|
||||
from collections.abc import Callable
|
||||
|
||||
|
||||
@ -7,7 +7,6 @@
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
|
||||
DOCUMENTATION = r"""
|
||||
name: nsenter
|
||||
short_description: execute on host running controller container
|
||||
@ -55,7 +54,6 @@ from ansible.plugins.connection import ConnectionBase
|
||||
from ansible.utils.display import Display
|
||||
from ansible.utils.path import unfrackpath
|
||||
|
||||
|
||||
display = Display()
|
||||
|
||||
|
||||
|
||||
@ -8,7 +8,6 @@
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
|
||||
DOCUMENTATION = r"""
|
||||
name: docker_containers
|
||||
short_description: Ansible dynamic inventory plugin for Docker containers
|
||||
@ -195,7 +194,6 @@ from ansible_collections.community.docker.plugins.plugin_utils._unsafe import (
|
||||
make_unsafe,
|
||||
)
|
||||
|
||||
|
||||
if t.TYPE_CHECKING:
|
||||
from ansible.inventory.data import InventoryData
|
||||
from ansible.parsing.dataloader import DataLoader
|
||||
|
||||
@ -4,7 +4,6 @@
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
|
||||
DOCUMENTATION = r"""
|
||||
name: docker_machine
|
||||
author: Ximon Eighteen (@ximon18)
|
||||
@ -117,7 +116,6 @@ from ansible_collections.community.docker.plugins.plugin_utils._unsafe import (
|
||||
make_unsafe,
|
||||
)
|
||||
|
||||
|
||||
if t.TYPE_CHECKING:
|
||||
from ansible.inventory.data import InventoryData
|
||||
from ansible.parsing.dataloader import DataLoader
|
||||
|
||||
@ -5,7 +5,6 @@
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
|
||||
DOCUMENTATION = r"""
|
||||
name: docker_swarm
|
||||
author:
|
||||
@ -168,7 +167,6 @@ from ansible_collections.community.docker.plugins.plugin_utils._unsafe import (
|
||||
make_unsafe,
|
||||
)
|
||||
|
||||
|
||||
if t.TYPE_CHECKING:
|
||||
from ansible.inventory.data import InventoryData
|
||||
from ansible.parsing.dataloader import DataLoader
|
||||
|
||||
@ -14,7 +14,6 @@ from __future__ import annotations
|
||||
import traceback
|
||||
import typing as t
|
||||
|
||||
|
||||
REQUESTS_IMPORT_ERROR: str | None # pylint: disable=invalid-name
|
||||
try:
|
||||
from requests import Session # noqa: F401, pylint: disable=unused-import
|
||||
|
||||
@ -52,7 +52,6 @@ from ..utils.decorators import minimum_version, update_headers
|
||||
from ..utils.proxy import ProxyConfig
|
||||
from ..utils.socket import consume_socket_output, demux_adaptor, frames_iter
|
||||
|
||||
|
||||
if t.TYPE_CHECKING:
|
||||
from requests import Response
|
||||
from requests.adapters import BaseAdapter
|
||||
|
||||
@ -21,7 +21,6 @@ from .credentials.errors import CredentialsNotFound, StoreError
|
||||
from .credentials.store import Store
|
||||
from .utils import config
|
||||
|
||||
|
||||
if t.TYPE_CHECKING:
|
||||
from ansible_collections.community.docker.plugins.module_utils._api.api.client import (
|
||||
APIClient,
|
||||
|
||||
@ -13,7 +13,6 @@ from __future__ import annotations
|
||||
|
||||
import sys
|
||||
|
||||
|
||||
MINIMUM_DOCKER_API_VERSION = "1.21"
|
||||
DEFAULT_TIMEOUT_SECONDS = 60
|
||||
STREAM_HEADER_SIZE_BYTES = 8
|
||||
|
||||
@ -24,7 +24,6 @@ from .config import (
|
||||
)
|
||||
from .context import Context
|
||||
|
||||
|
||||
if t.TYPE_CHECKING:
|
||||
from ..tls import TLSConfig
|
||||
|
||||
|
||||
@ -19,7 +19,6 @@ from ..constants import DEFAULT_UNIX_SOCKET, IS_WINDOWS_PLATFORM
|
||||
from ..utils.config import find_config_file, get_default_config_file
|
||||
from ..utils.utils import parse_host
|
||||
|
||||
|
||||
METAFILE = "meta.json"
|
||||
|
||||
|
||||
|
||||
@ -25,7 +25,6 @@ from .config import (
|
||||
get_tls_dir,
|
||||
)
|
||||
|
||||
|
||||
IN_MEMORY = "IN MEMORY"
|
||||
|
||||
|
||||
|
||||
@ -11,7 +11,6 @@
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
|
||||
PROGRAM_PREFIX = "docker-credential-"
|
||||
DEFAULT_LINUX_STORE = "secretservice"
|
||||
DEFAULT_OSX_STORE = "osxkeychain"
|
||||
|
||||
@ -13,7 +13,6 @@ from __future__ import annotations
|
||||
|
||||
import typing as t
|
||||
|
||||
|
||||
if t.TYPE_CHECKING:
|
||||
from subprocess import CalledProcessError
|
||||
|
||||
|
||||
@ -17,7 +17,6 @@ from ansible.module_utils.common.text.converters import to_text
|
||||
|
||||
from ._import_helper import HTTPError as _HTTPError
|
||||
|
||||
|
||||
if t.TYPE_CHECKING:
|
||||
from requests import Response
|
||||
|
||||
|
||||
@ -17,7 +17,6 @@ import typing as t
|
||||
from . import errors
|
||||
from .transport.ssladapter import SSLHTTPAdapter
|
||||
|
||||
|
||||
if t.TYPE_CHECKING:
|
||||
from ansible_collections.community.docker.plugins.module_utils._api.api.client import (
|
||||
APIClient,
|
||||
|
||||
@ -19,7 +19,6 @@ from .._import_helper import HTTPAdapter, urllib3, urllib3_connection
|
||||
from .basehttpadapter import BaseHTTPAdapter
|
||||
from .npipesocket import NpipeSocket
|
||||
|
||||
|
||||
if t.TYPE_CHECKING:
|
||||
from collections.abc import Mapping
|
||||
|
||||
|
||||
@ -17,7 +17,6 @@ import time
|
||||
import traceback
|
||||
import typing as t
|
||||
|
||||
|
||||
PYWIN32_IMPORT_ERROR: str | None # pylint: disable=invalid-name
|
||||
try:
|
||||
import pywintypes
|
||||
|
||||
@ -25,7 +25,6 @@ from .. import constants
|
||||
from .._import_helper import HTTPAdapter, urllib3, urllib3_connection
|
||||
from .basehttpadapter import BaseHTTPAdapter
|
||||
|
||||
|
||||
PARAMIKO_IMPORT_ERROR: str | None # pylint: disable=invalid-name
|
||||
try:
|
||||
import paramiko
|
||||
|
||||
@ -16,7 +16,6 @@ import typing as t
|
||||
from .._import_helper import HTTPAdapter, urllib3
|
||||
from .basehttpadapter import BaseHTTPAdapter
|
||||
|
||||
|
||||
# Resolves OpenSSL issues in some servers:
|
||||
# https://lukasa.co.uk/2013/01/Choosing_SSL_Version_In_Requests/
|
||||
# https://github.com/kennethreitz/requests/pull/799
|
||||
|
||||
@ -18,7 +18,6 @@ from .. import constants
|
||||
from .._import_helper import HTTPAdapter, urllib3, urllib3_connection
|
||||
from .basehttpadapter import BaseHTTPAdapter
|
||||
|
||||
|
||||
if t.TYPE_CHECKING:
|
||||
from collections.abc import Mapping
|
||||
|
||||
|
||||
@ -17,7 +17,6 @@ import typing as t
|
||||
from .._import_helper import urllib3
|
||||
from ..errors import DockerException
|
||||
|
||||
|
||||
if t.TYPE_CHECKING:
|
||||
from requests import Response
|
||||
|
||||
|
||||
@ -22,7 +22,6 @@ import typing as t
|
||||
from ..constants import IS_WINDOWS_PLATFORM, WINDOWS_LONGPATH_PREFIX
|
||||
from . import fnmatch
|
||||
|
||||
|
||||
if t.TYPE_CHECKING:
|
||||
from collections.abc import Sequence
|
||||
|
||||
|
||||
@ -18,7 +18,6 @@ import typing as t
|
||||
|
||||
from ..constants import IS_WINDOWS_PLATFORM
|
||||
|
||||
|
||||
DOCKER_CONFIG_FILENAME = os.path.join(".docker", "config.json")
|
||||
LEGACY_DOCKER_CONFIG_FILENAME = ".dockercfg"
|
||||
|
||||
|
||||
@ -17,7 +17,6 @@ import typing as t
|
||||
from .. import errors
|
||||
from . import utils
|
||||
|
||||
|
||||
if t.TYPE_CHECKING:
|
||||
from collections.abc import Callable
|
||||
|
||||
|
||||
@ -25,7 +25,6 @@ from __future__ import annotations
|
||||
|
||||
import re
|
||||
|
||||
|
||||
__all__ = ["fnmatch", "fnmatchcase", "translate"]
|
||||
|
||||
_cache: dict[str, re.Pattern] = {}
|
||||
|
||||
@ -17,7 +17,6 @@ import typing as t
|
||||
|
||||
from ..errors import StreamParseError
|
||||
|
||||
|
||||
if t.TYPE_CHECKING:
|
||||
import re
|
||||
from collections.abc import Callable
|
||||
|
||||
@ -14,7 +14,6 @@ from __future__ import annotations
|
||||
import re
|
||||
import typing as t
|
||||
|
||||
|
||||
if t.TYPE_CHECKING:
|
||||
from collections.abc import Collection, Sequence
|
||||
|
||||
|
||||
@ -20,7 +20,6 @@ import typing as t
|
||||
|
||||
from ..transport.npipesocket import NpipeSocket
|
||||
|
||||
|
||||
if t.TYPE_CHECKING:
|
||||
from collections.abc import Sequence
|
||||
|
||||
|
||||
@ -34,7 +34,6 @@ from ..constants import (
|
||||
)
|
||||
from ..tls import TLSConfig
|
||||
|
||||
|
||||
if t.TYPE_CHECKING:
|
||||
from collections.abc import Mapping, Sequence
|
||||
|
||||
|
||||
@ -34,7 +34,6 @@ from ansible_collections.community.docker.plugins.module_utils._version import (
|
||||
LooseVersion,
|
||||
)
|
||||
|
||||
|
||||
HAS_DOCKER_PY_2 = False # pylint: disable=invalid-name
|
||||
HAS_DOCKER_PY_3 = False # pylint: disable=invalid-name
|
||||
HAS_DOCKER_ERROR: None | str # pylint: disable=invalid-name
|
||||
|
||||
@ -21,7 +21,6 @@ from ansible_collections.community.docker.plugins.module_utils._version import (
|
||||
LooseVersion,
|
||||
)
|
||||
|
||||
|
||||
try:
|
||||
from requests.exceptions import ( # noqa: F401, pylint: disable=unused-import
|
||||
RequestException,
|
||||
@ -60,7 +59,6 @@ from ansible_collections.community.docker.plugins.module_utils._util import (
|
||||
update_tls_hostname,
|
||||
)
|
||||
|
||||
|
||||
if t.TYPE_CHECKING:
|
||||
from collections.abc import Callable
|
||||
|
||||
|
||||
@ -31,7 +31,6 @@ from ansible_collections.community.docker.plugins.module_utils._version import (
|
||||
LooseVersion,
|
||||
)
|
||||
|
||||
|
||||
if t.TYPE_CHECKING:
|
||||
from collections.abc import Mapping, Sequence
|
||||
|
||||
|
||||
@ -34,7 +34,6 @@ from ansible_collections.community.docker.plugins.module_utils._version import (
|
||||
LooseVersion,
|
||||
)
|
||||
|
||||
|
||||
PYYAML_IMPORT_ERROR: None | str # pylint: disable=invalid-name
|
||||
try:
|
||||
import yaml
|
||||
|
||||
@ -25,7 +25,6 @@ from ansible_collections.community.docker.plugins.module_utils._api.errors impor
|
||||
NotFound,
|
||||
)
|
||||
|
||||
|
||||
if t.TYPE_CHECKING:
|
||||
from collections.abc import Callable
|
||||
|
||||
|
||||
@ -16,7 +16,6 @@ from __future__ import annotations
|
||||
import typing as t
|
||||
from enum import Enum
|
||||
|
||||
|
||||
# The format is defined in https://pkg.go.dev/github.com/kr/logfmt?utm_source=godoc
|
||||
# (look for "EBNFish")
|
||||
|
||||
|
||||
@ -32,7 +32,6 @@ from ansible_collections.community.docker.plugins.module_utils._util import (
|
||||
sanitize_labels,
|
||||
)
|
||||
|
||||
|
||||
if t.TYPE_CHECKING:
|
||||
from collections.abc import Callable, Sequence
|
||||
|
||||
|
||||
@ -117,7 +117,6 @@ from ansible_collections.community.docker.plugins.module_utils._version import (
|
||||
LooseVersion,
|
||||
)
|
||||
|
||||
|
||||
if t.TYPE_CHECKING:
|
||||
from collections.abc import Callable, Sequence
|
||||
|
||||
|
||||
@ -29,7 +29,6 @@ from ansible_collections.community.docker.plugins.module_utils._util import (
|
||||
sanitize_result,
|
||||
)
|
||||
|
||||
|
||||
if t.TYPE_CHECKING:
|
||||
from collections.abc import Sequence
|
||||
|
||||
|
||||
@ -16,7 +16,6 @@ from __future__ import annotations
|
||||
import re
|
||||
import typing as t
|
||||
|
||||
|
||||
_VALID_STR = re.compile("^[A-Za-z0-9_-]+$")
|
||||
|
||||
|
||||
|
||||
@ -23,7 +23,6 @@ from ansible_collections.community.docker.plugins.module_utils._socket_helper im
|
||||
write_to_socket,
|
||||
)
|
||||
|
||||
|
||||
if t.TYPE_CHECKING:
|
||||
from collections.abc import Callable
|
||||
from types import TracebackType
|
||||
|
||||
@ -14,7 +14,6 @@ import socket as pysocket
|
||||
import typing as t
|
||||
from collections.abc import Callable
|
||||
|
||||
|
||||
if t.TYPE_CHECKING:
|
||||
SocketLike = pysocket.socket
|
||||
|
||||
|
||||
@ -12,7 +12,6 @@ import json
|
||||
import typing as t
|
||||
from time import sleep
|
||||
|
||||
|
||||
try:
|
||||
from docker.errors import APIError, NotFound
|
||||
except ImportError:
|
||||
|
||||
@ -18,7 +18,6 @@ from ansible.module_utils.basic import env_fallback
|
||||
from ansible.module_utils.common.collections import is_sequence
|
||||
from ansible.module_utils.common.text.converters import to_text
|
||||
|
||||
|
||||
if t.TYPE_CHECKING:
|
||||
from collections.abc import Callable
|
||||
|
||||
|
||||
@ -7,7 +7,6 @@
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
|
||||
DOCUMENTATION = r"""
|
||||
module: current_container_facts
|
||||
short_description: Return facts about whether the module runs in a container
|
||||
|
||||
@ -8,7 +8,6 @@
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
|
||||
DOCUMENTATION = r"""
|
||||
module: docker_compose_v2
|
||||
|
||||
|
||||
@ -6,7 +6,6 @@
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
|
||||
DOCUMENTATION = r"""
|
||||
module: docker_compose_v2_exec
|
||||
|
||||
|
||||
@ -6,7 +6,6 @@
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
|
||||
DOCUMENTATION = r"""
|
||||
module: docker_compose_v2_pull
|
||||
|
||||
|
||||
@ -6,7 +6,6 @@
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
|
||||
DOCUMENTATION = r"""
|
||||
module: docker_compose_v2_run
|
||||
|
||||
|
||||
@ -6,7 +6,6 @@
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
|
||||
DOCUMENTATION = r"""
|
||||
module: docker_config
|
||||
|
||||
@ -200,7 +199,6 @@ import hashlib
|
||||
import traceback
|
||||
import typing as t
|
||||
|
||||
|
||||
try:
|
||||
from docker.errors import APIError, DockerException
|
||||
except ImportError:
|
||||
|
||||
@ -6,7 +6,6 @@
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
|
||||
DOCUMENTATION = r"""
|
||||
module: docker_container
|
||||
|
||||
|
||||
@ -6,7 +6,6 @@
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
|
||||
DOCUMENTATION = r"""
|
||||
module: docker_container_copy_into
|
||||
|
||||
@ -198,7 +197,6 @@ from ansible_collections.community.docker.plugins.module_utils._scramble import
|
||||
scramble,
|
||||
)
|
||||
|
||||
|
||||
if t.TYPE_CHECKING:
|
||||
import tarfile
|
||||
|
||||
|
||||
@ -6,7 +6,6 @@
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
|
||||
DOCUMENTATION = r"""
|
||||
module: docker_container_exec
|
||||
|
||||
|
||||
@ -6,7 +6,6 @@
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
|
||||
DOCUMENTATION = r"""
|
||||
module: docker_container_info
|
||||
|
||||
|
||||
@ -6,7 +6,6 @@
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
|
||||
DOCUMENTATION = r"""
|
||||
module: docker_context_info
|
||||
|
||||
@ -193,7 +192,6 @@ from ansible_collections.community.docker.plugins.module_utils._api.errors impor
|
||||
DockerException,
|
||||
)
|
||||
|
||||
|
||||
if t.TYPE_CHECKING:
|
||||
from ansible_collections.community.docker.plugins.module_utils._api.tls import (
|
||||
TLSConfig,
|
||||
|
||||
@ -6,7 +6,6 @@
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
|
||||
DOCUMENTATION = r"""
|
||||
module: docker_host_info
|
||||
|
||||
|
||||
@ -6,7 +6,6 @@
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
|
||||
DOCUMENTATION = r"""
|
||||
module: docker_image
|
||||
|
||||
@ -413,7 +412,6 @@ from ansible_collections.community.docker.plugins.module_utils._version import (
|
||||
LooseVersion,
|
||||
)
|
||||
|
||||
|
||||
if t.TYPE_CHECKING:
|
||||
from collections.abc import Callable
|
||||
|
||||
|
||||
@ -6,7 +6,6 @@
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
|
||||
DOCUMENTATION = r"""
|
||||
module: docker_image_build
|
||||
|
||||
@ -304,7 +303,6 @@ from ansible_collections.community.docker.plugins.module_utils._version import (
|
||||
LooseVersion,
|
||||
)
|
||||
|
||||
|
||||
if t.TYPE_CHECKING:
|
||||
from ansible.module_utils.basic import AnsibleModule
|
||||
|
||||
|
||||
@ -6,7 +6,6 @@
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
|
||||
DOCUMENTATION = r"""
|
||||
module: docker_image_export
|
||||
|
||||
|
||||
@ -6,7 +6,6 @@
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
|
||||
DOCUMENTATION = r"""
|
||||
module: docker_image_info
|
||||
|
||||
|
||||
@ -6,7 +6,6 @@
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
|
||||
DOCUMENTATION = r"""
|
||||
module: docker_image_load
|
||||
|
||||
|
||||
@ -6,7 +6,6 @@
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
|
||||
DOCUMENTATION = r"""
|
||||
module: docker_image_pull
|
||||
|
||||
|
||||
@ -6,7 +6,6 @@
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
|
||||
DOCUMENTATION = r"""
|
||||
module: docker_image_push
|
||||
|
||||
|
||||
@ -6,7 +6,6 @@
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
|
||||
DOCUMENTATION = r"""
|
||||
module: docker_image_remove
|
||||
|
||||
|
||||
@ -6,7 +6,6 @@
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
|
||||
DOCUMENTATION = r"""
|
||||
module: docker_image_tag
|
||||
|
||||
@ -121,7 +120,6 @@ from ansible_collections.community.docker.plugins.module_utils._util import (
|
||||
is_valid_tag,
|
||||
)
|
||||
|
||||
|
||||
if t.TYPE_CHECKING:
|
||||
from ansible.module_utils.basic import AnsibleModule
|
||||
|
||||
|
||||
@ -9,7 +9,6 @@
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
|
||||
DOCUMENTATION = r"""
|
||||
module: docker_login
|
||||
short_description: Log into a Docker registry
|
||||
|
||||
@ -6,7 +6,6 @@
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
|
||||
DOCUMENTATION = r"""
|
||||
module: docker_network
|
||||
short_description: Manage Docker networks
|
||||
|
||||
@ -6,7 +6,6 @@
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
|
||||
DOCUMENTATION = r"""
|
||||
module: docker_network_info
|
||||
|
||||
|
||||
@ -6,7 +6,6 @@
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
|
||||
DOCUMENTATION = r"""
|
||||
module: docker_node
|
||||
short_description: Manage Docker Swarm node
|
||||
@ -136,7 +135,6 @@ node:
|
||||
import traceback
|
||||
import typing as t
|
||||
|
||||
|
||||
try:
|
||||
from docker.errors import APIError, DockerException
|
||||
except ImportError:
|
||||
|
||||
@ -6,7 +6,6 @@
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
|
||||
DOCUMENTATION = r"""
|
||||
module: docker_node_info
|
||||
|
||||
@ -96,7 +95,6 @@ from ansible_collections.community.docker.plugins.module_utils._swarm import (
|
||||
AnsibleDockerSwarmClient,
|
||||
)
|
||||
|
||||
|
||||
try:
|
||||
from docker.errors import DockerException
|
||||
except ImportError:
|
||||
|
||||
@ -7,7 +7,6 @@
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
|
||||
DOCUMENTATION = r"""
|
||||
module: docker_plugin
|
||||
short_description: Manage Docker plugins
|
||||
|
||||
@ -6,7 +6,6 @@
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
|
||||
DOCUMENTATION = r"""
|
||||
module: docker_prune
|
||||
|
||||
|
||||
@ -6,7 +6,6 @@
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
|
||||
DOCUMENTATION = r"""
|
||||
module: docker_secret
|
||||
|
||||
@ -192,7 +191,6 @@ import hashlib
|
||||
import traceback
|
||||
import typing as t
|
||||
|
||||
|
||||
try:
|
||||
from docker.errors import APIError, DockerException
|
||||
except ImportError:
|
||||
|
||||
@ -6,7 +6,6 @@
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
|
||||
DOCUMENTATION = r"""
|
||||
module: docker_stack
|
||||
author: "Dario Zanzico (@dariko)"
|
||||
@ -168,7 +167,6 @@ from ansible_collections.community.docker.plugins.module_utils._common_cli impor
|
||||
DockerException,
|
||||
)
|
||||
|
||||
|
||||
try:
|
||||
from jsondiff import diff as json_diff
|
||||
|
||||
|
||||
@ -6,7 +6,6 @@
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
|
||||
DOCUMENTATION = r"""
|
||||
module: docker_stack_info
|
||||
author: "Jose Angel Munoz (@imjoseangel)"
|
||||
|
||||
@ -6,7 +6,6 @@
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
|
||||
DOCUMENTATION = r"""
|
||||
module: docker_stack_task_info
|
||||
author: "Jose Angel Munoz (@imjoseangel)"
|
||||
|
||||
@ -6,7 +6,6 @@
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
|
||||
DOCUMENTATION = r"""
|
||||
module: docker_swarm
|
||||
short_description: Manage Swarm cluster
|
||||
@ -294,7 +293,6 @@ import json
|
||||
import traceback
|
||||
import typing as t
|
||||
|
||||
|
||||
try:
|
||||
from docker.errors import APIError, DockerException
|
||||
except ImportError:
|
||||
|
||||
@ -6,7 +6,6 @@
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
|
||||
DOCUMENTATION = r"""
|
||||
module: docker_swarm_info
|
||||
|
||||
@ -188,7 +187,6 @@ tasks:
|
||||
import traceback
|
||||
import typing as t
|
||||
|
||||
|
||||
try:
|
||||
from docker.errors import APIError, DockerException
|
||||
except ImportError:
|
||||
|
||||
@ -6,7 +6,6 @@
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
|
||||
DOCUMENTATION = r"""
|
||||
module: docker_swarm_service
|
||||
author:
|
||||
@ -874,7 +873,6 @@ from ansible_collections.community.docker.plugins.module_utils._version import (
|
||||
LooseVersion,
|
||||
)
|
||||
|
||||
|
||||
try:
|
||||
from docker import types
|
||||
from docker.errors import (
|
||||
|
||||
@ -6,7 +6,6 @@
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
|
||||
DOCUMENTATION = r"""
|
||||
module: docker_swarm_service_info
|
||||
|
||||
@ -65,7 +64,6 @@ service:
|
||||
import traceback
|
||||
import typing as t
|
||||
|
||||
|
||||
try:
|
||||
from docker.errors import DockerException
|
||||
except ImportError:
|
||||
|
||||
@ -6,7 +6,6 @@
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
|
||||
DOCUMENTATION = r"""
|
||||
module: docker_volume
|
||||
short_description: Manage Docker volumes
|
||||
|
||||
@ -6,7 +6,6 @@
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
|
||||
DOCUMENTATION = r"""
|
||||
module: docker_volume_info
|
||||
short_description: Retrieve facts about Docker volumes
|
||||
|
||||
@ -19,7 +19,6 @@ from ansible_collections.community.docker.plugins.module_utils._util import (
|
||||
DOCKER_COMMON_ARGS,
|
||||
)
|
||||
|
||||
|
||||
if t.TYPE_CHECKING:
|
||||
from ansible.plugins import AnsiblePlugin
|
||||
|
||||
|
||||
@ -19,7 +19,6 @@ from ansible_collections.community.docker.plugins.module_utils._util import (
|
||||
DOCKER_COMMON_ARGS,
|
||||
)
|
||||
|
||||
|
||||
if t.TYPE_CHECKING:
|
||||
from ansible.plugins import AnsiblePlugin
|
||||
|
||||
|
||||
@ -13,7 +13,6 @@ from ansible_collections.community.docker.plugins.module_utils._socket_handler i
|
||||
DockerSocketHandlerBase,
|
||||
)
|
||||
|
||||
|
||||
if t.TYPE_CHECKING:
|
||||
from ansible.utils.display import Display
|
||||
|
||||
|
||||
@ -17,7 +17,6 @@ from ansible.utils.unsafe_proxy import (
|
||||
)
|
||||
from ansible.utils.unsafe_proxy import wrap_var as _make_unsafe
|
||||
|
||||
|
||||
_RE_TEMPLATE_CHARS = re.compile("[{}]")
|
||||
_RE_TEMPLATE_CHARS_BYTES = re.compile(b"[{}]")
|
||||
|
||||
|
||||
@ -19,7 +19,6 @@ from ansible_collections.community.docker.plugins.inventory.docker_containers im
|
||||
InventoryModule,
|
||||
)
|
||||
|
||||
|
||||
if t.TYPE_CHECKING:
|
||||
from collections.abc import Callable
|
||||
|
||||
|
||||
@ -42,7 +42,6 @@ from ansible_collections.community.docker.tests.unit.plugins.module_utils._api.c
|
||||
|
||||
from .. import fake_api
|
||||
|
||||
|
||||
if t.TYPE_CHECKING:
|
||||
from ansible_collections.community.docker.plugins.module_utils._api.auth import (
|
||||
AuthConfig,
|
||||
|
||||
@ -8,5 +8,4 @@
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
|
||||
DEFAULT_DOCKER_API_VERSION = "1.45"
|
||||
|
||||
@ -17,7 +17,6 @@ from ansible_collections.community.docker.tests.unit.plugins.module_utils._api.c
|
||||
|
||||
from . import fake_stat
|
||||
|
||||
|
||||
if t.TYPE_CHECKING:
|
||||
from collections.abc import Callable
|
||||
|
||||
|
||||
@ -8,7 +8,6 @@
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
|
||||
OBJ = {
|
||||
"read": "2015-02-11T19:20:46.667237763+02:00",
|
||||
"network": {
|
||||
|
||||
@ -17,7 +17,6 @@ from ansible_collections.community.docker.plugins.module_utils._api.transport im
|
||||
ssladapter,
|
||||
)
|
||||
|
||||
|
||||
try:
|
||||
from ssl import CertificateError, match_hostname # type: ignore
|
||||
except ImportError:
|
||||
|
||||
@ -27,7 +27,6 @@ from ansible_collections.community.docker.plugins.module_utils._api.utils.build
|
||||
tar,
|
||||
)
|
||||
|
||||
|
||||
if t.TYPE_CHECKING:
|
||||
from collections.abc import Collection
|
||||
|
||||
|
||||
@ -16,7 +16,6 @@ from ansible_collections.community.docker.plugins.module_utils._api.utils.json_s
|
||||
stream_as_text,
|
||||
)
|
||||
|
||||
|
||||
if t.TYPE_CHECKING:
|
||||
T = t.TypeVar("T")
|
||||
|
||||
|
||||
@ -14,7 +14,6 @@ from ansible_collections.community.docker.plugins.module_utils._api.utils.proxy
|
||||
ProxyConfig,
|
||||
)
|
||||
|
||||
|
||||
HTTP = "http://test:80"
|
||||
HTTPS = "https://test:443"
|
||||
FTP = "ftp://user:password@host:23"
|
||||
|
||||
@ -44,7 +44,6 @@ from ansible_collections.community.docker.tests.unit.plugins.module_utils._api.c
|
||||
DEFAULT_DOCKER_API_VERSION,
|
||||
)
|
||||
|
||||
|
||||
TEST_CERT_DIR = os.path.join(
|
||||
os.path.dirname(__file__),
|
||||
"testdata/certs",
|
||||
|
||||
@ -10,7 +10,6 @@ from ansible_collections.community.docker.plugins.module_utils._compose_v2 impor
|
||||
Event,
|
||||
)
|
||||
|
||||
|
||||
EVENT_TEST_CASES: list[tuple[str, str, bool, bool, str, list[Event], list[str]]] = [
|
||||
# #######################################################################################################################
|
||||
# ## Docker Compose 2.18.1 ##############################################################################################
|
||||
|
||||
@ -14,7 +14,6 @@ from ansible_collections.community.docker.plugins.module_utils._compose_v2 impor
|
||||
|
||||
from .compose_v2_test_cases import EVENT_TEST_CASES
|
||||
|
||||
|
||||
EXTRA_TEST_CASES: list[tuple[str, str, bool, bool, str, list[Event], list[str]]] = [
|
||||
(
|
||||
"2.24.2-manual-build-dry-run",
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user