Re-sort imports.

This commit is contained in:
Felix Fontein
2025-12-25 21:59:01 +01:00
parent 42121e3326
commit 712d920941
106 changed files with 0 additions and 127 deletions
-2
View File
@@ -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()
-2
View File
@@ -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
-2
View File
@@ -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()
-2
View File
@@ -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
-2
View File
@@ -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
-2
View File
@@ -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
-1
View File
@@ -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
-1
View File
@@ -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,
-1
View File
@@ -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
-1
View File
@@ -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
-1
View File
@@ -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
-1
View File
@@ -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
-1
View File
@@ -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
-1
View File
@@ -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
-1
View File
@@ -34,7 +34,6 @@ from ..constants import (
)
from ..tls import TLSConfig
if t.TYPE_CHECKING:
from collections.abc import Mapping, Sequence
-1
View File
@@ -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
-2
View File
@@ -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
-1
View File
@@ -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
-1
View File
@@ -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
-1
View File
@@ -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
-1
View File
@@ -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
-1
View File
@@ -16,7 +16,6 @@ from __future__ import annotations
import re
import typing as t
_VALID_STR = re.compile("^[A-Za-z0-9_-]+$")
-1
View File
@@ -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
-1
View File
@@ -14,7 +14,6 @@ import socket as pysocket
import typing as t
from collections.abc import Callable
if t.TYPE_CHECKING:
SocketLike = pysocket.socket
-1
View File
@@ -12,7 +12,6 @@ import json
import typing as t
from time import sleep
try:
from docker.errors import APIError, NotFound
except ImportError:
-1
View File
@@ -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
-1
View File
@@ -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
-1
View File
@@ -6,7 +6,6 @@
from __future__ import annotations
DOCUMENTATION = r"""
module: docker_compose_v2_run
-2
View File
@@ -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:
-1
View File
@@ -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
-1
View File
@@ -6,7 +6,6 @@
from __future__ import annotations
DOCUMENTATION = r"""
module: docker_container_exec
-1
View File
@@ -6,7 +6,6 @@
from __future__ import annotations
DOCUMENTATION = r"""
module: docker_container_info
-2
View File
@@ -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,
-1
View File
@@ -6,7 +6,6 @@
from __future__ import annotations
DOCUMENTATION = r"""
module: docker_host_info
-2
View File
@@ -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
-2
View File
@@ -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
-1
View File
@@ -6,7 +6,6 @@
from __future__ import annotations
DOCUMENTATION = r"""
module: docker_image_export
-1
View File
@@ -6,7 +6,6 @@
from __future__ import annotations
DOCUMENTATION = r"""
module: docker_image_info
-1
View File
@@ -6,7 +6,6 @@
from __future__ import annotations
DOCUMENTATION = r"""
module: docker_image_load
-1
View File
@@ -6,7 +6,6 @@
from __future__ import annotations
DOCUMENTATION = r"""
module: docker_image_pull
-1
View File
@@ -6,7 +6,6 @@
from __future__ import annotations
DOCUMENTATION = r"""
module: docker_image_push
-1
View File
@@ -6,7 +6,6 @@
from __future__ import annotations
DOCUMENTATION = r"""
module: docker_image_remove
-2
View File
@@ -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
-1
View File
@@ -9,7 +9,6 @@
from __future__ import annotations
DOCUMENTATION = r"""
module: docker_login
short_description: Log into a Docker registry
-1
View File
@@ -6,7 +6,6 @@
from __future__ import annotations
DOCUMENTATION = r"""
module: docker_network
short_description: Manage Docker networks
-1
View File
@@ -6,7 +6,6 @@
from __future__ import annotations
DOCUMENTATION = r"""
module: docker_network_info
-2
View File
@@ -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:
-2
View File
@@ -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:
-1
View File
@@ -7,7 +7,6 @@
from __future__ import annotations
DOCUMENTATION = r"""
module: docker_plugin
short_description: Manage Docker plugins
-1
View File
@@ -6,7 +6,6 @@
from __future__ import annotations
DOCUMENTATION = r"""
module: docker_prune
-2
View File
@@ -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:
-2
View File
@@ -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
-1
View File
@@ -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)"
-2
View File
@@ -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:
-2
View File
@@ -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:
-2
View File
@@ -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:
-1
View File
@@ -6,7 +6,6 @@
from __future__ import annotations
DOCUMENTATION = r"""
module: docker_volume
short_description: Manage Docker volumes
-1
View File
@@ -6,7 +6,6 @@
from __future__ import annotations
DOCUMENTATION = r"""
module: docker_volume_info
short_description: Retrieve facts about Docker volumes
-1
View File
@@ -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
-1
View File
@@ -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
-1
View File
@@ -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
-1
View File
@@ -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"[{}]")