id int64 0 458k | file_name stringlengths 4 119 | file_path stringlengths 14 227 | content stringlengths 24 9.96M | size int64 24 9.96M | language stringclasses 1
value | extension stringclasses 14
values | total_lines int64 1 219k | avg_line_length float64 2.52 4.63M | max_line_length int64 5 9.91M | alphanum_fraction float64 0 1 | repo_name stringlengths 7 101 | repo_stars int64 100 139k | repo_forks int64 0 26.4k | repo_open_issues int64 0 2.27k | repo_license stringclasses 12
values | repo_extraction_date stringclasses 433
values |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
13,100 | executor.py | ansible_ansible/test/lib/ansible_test/_internal/executor.py | """Execute Ansible tests."""
from __future__ import annotations
import typing as t
from .io import (
read_text_file,
)
from .util import (
ApplicationWarning,
display,
)
from .ci import (
get_ci_provider,
)
from .classification import (
categorize_changes,
)
from .config import (
TestConfi... | 2,959 | Python | .py | 81 | 30.901235 | 108 | 0.674181 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,101 | junit_xml.py | ansible_ansible/test/lib/ansible_test/_internal/junit_xml.py | """
Dataclasses for creating JUnit XML files.
See: https://github.com/junit-team/junit5/blob/main/platform-tests/src/test/resources/jenkins-junit.xsd
"""
from __future__ import annotations
import abc
import dataclasses
import datetime
import decimal
from xml.dom import minidom
# noinspection PyPep8Naming
from xml.et... | 8,671 | Python | .py | 211 | 33.691943 | 154 | 0.65078 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,102 | ssh.py | ansible_ansible/test/lib/ansible_test/_internal/ssh.py | """High level functions for working with SSH."""
from __future__ import annotations
import dataclasses
import itertools
import json
import os
import random
import re
import subprocess
import shlex
import typing as t
from .encoding import (
to_bytes,
to_text,
)
from .util import (
ApplicationError,
co... | 10,781 | Python | .py | 231 | 37.805195 | 151 | 0.628972 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,103 | locale_util.py | ansible_ansible/test/lib/ansible_test/_internal/locale_util.py | """Initialize locale settings. This must be imported very early in ansible-test startup."""
from __future__ import annotations
import locale
import sys
import typing as t
STANDARD_LOCALE = 'en_US.UTF-8'
"""
The standard locale used by ansible-test and its subprocesses and delegated instances.
"""
FALLBACK_LOCALE = ... | 2,161 | Python | .py | 44 | 42.954545 | 122 | 0.696522 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,104 | test.py | ansible_ansible/test/lib/ansible_test/_internal/test.py | """Classes for storing and processing test results."""
from __future__ import annotations
import collections.abc as c
import datetime
import typing as t
from .util import (
display,
)
from .util_common import (
get_docs_url,
write_text_test_results,
write_json_test_results,
ResultType,
)
from .m... | 14,515 | Python | .py | 355 | 31.171831 | 139 | 0.587666 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,105 | docker_util.py | ansible_ansible/test/lib/ansible_test/_internal/docker_util.py | """Functions for accessing docker via the docker cli."""
from __future__ import annotations
import dataclasses
import enum
import json
import os
import pathlib
import re
import socket
import time
import urllib.parse
import typing as t
from .util import (
ApplicationError,
common_environment,
display,
... | 38,220 | Python | .py | 800 | 40.3375 | 157 | 0.663806 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,106 | host_configs.py | ansible_ansible/test/lib/ansible_test/_internal/host_configs.py | """Configuration for the test hosts requested by the user."""
from __future__ import annotations
import abc
import dataclasses
import enum
import os
import pickle
import sys
import typing as t
from .constants import (
SUPPORTED_PYTHON_VERSIONS,
)
from .io import (
open_binary_file,
)
from .completion import... | 18,634 | Python | .py | 409 | 38.645477 | 158 | 0.702671 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,107 | target.py | ansible_ansible/test/lib/ansible_test/_internal/target.py | """Test target identification, iteration and inclusion/exclusion."""
from __future__ import annotations
import collections
import collections.abc as c
import enum
import os
import re
import itertools
import abc
import typing as t
from .encoding import (
to_bytes,
to_text,
)
from .io import (
read_text_fi... | 25,320 | Python | .py | 513 | 39.844055 | 157 | 0.636356 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,108 | provisioning.py | ansible_ansible/test/lib/ansible_test/_internal/provisioning.py | """Provision hosts for running tests."""
from __future__ import annotations
import collections.abc as c
import dataclasses
import functools
import itertools
import os
import pickle
import sys
import time
import traceback
import typing as t
from .config import (
EnvironmentConfig,
)
from .util import (
Applic... | 7,320 | Python | .py | 163 | 37.380368 | 147 | 0.68178 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,109 | cgroup.py | ansible_ansible/test/lib/ansible_test/_internal/cgroup.py | """Linux control group constants, classes and utilities."""
from __future__ import annotations
import codecs
import dataclasses
import pathlib
import re
class CGroupPath:
"""Linux cgroup path constants."""
ROOT = '/sys/fs/cgroup'
SYSTEMD = '/sys/fs/cgroup/systemd'
SYSTEMD_RELEASE_AGENT = '/sys/fs/cg... | 3,916 | Python | .py | 89 | 37.05618 | 119 | 0.665176 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,110 | constants.py | ansible_ansible/test/lib/ansible_test/_internal/constants.py | """Constants used by ansible-test. Imports should not be used in this file (other than to import the target common constants)."""
from __future__ import annotations
from .._util.target.common.constants import (
CONTROLLER_PYTHON_VERSIONS,
REMOTE_ONLY_PYTHON_VERSIONS,
)
STATUS_HOST_CONNECTION_ERROR = 4
# Sett... | 1,969 | Python | .py | 40 | 46.225 | 147 | 0.741281 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,111 | util_common.py | ansible_ansible/test/lib/ansible_test/_internal/util_common.py | """Common utility code that depends on CommonConfig."""
from __future__ import annotations
import collections.abc as c
import contextlib
import json
import os
import re
import shlex
import sys
import tempfile
import textwrap
import typing as t
from .constants import (
ANSIBLE_BIN_SYMLINK_MAP,
)
from .encoding im... | 17,490 | Python | .py | 409 | 36.386308 | 141 | 0.676148 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,112 | thread.py | ansible_ansible/test/lib/ansible_test/_internal/thread.py | """Python threading tools."""
from __future__ import annotations
import collections.abc as c
import contextlib
import functools
import sys
import threading
import queue
import typing as t
TCallable = t.TypeVar('TCallable', bound=t.Callable[..., t.Any])
class WrappedThread(threading.Thread):
"""Wrapper around T... | 2,596 | Python | .py | 63 | 34.492063 | 110 | 0.659371 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,113 | pypi_proxy.py | ansible_ansible/test/lib/ansible_test/_internal/pypi_proxy.py | """PyPI proxy management."""
from __future__ import annotations
import os
import urllib.parse
from .io import (
write_text_file,
)
from .config import (
EnvironmentConfig,
)
from .host_configs import (
PosixConfig,
)
from .util import (
ApplicationError,
display,
)
from .util_common import (
... | 6,019 | Python | .py | 132 | 40.174242 | 135 | 0.7056 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,114 | git.py | ansible_ansible/test/lib/ansible_test/_internal/git.py | """Wrapper around git command-line tools."""
from __future__ import annotations
import re
import typing as t
from .util import (
SubprocessError,
raw_command,
)
class Git:
"""Wrapper around git command-line tools."""
def __init__(self, root: t.Optional[str] = None) -> None:
self.git = 'git'... | 4,366 | Python | .py | 80 | 46.3375 | 149 | 0.620221 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,115 | connections.py | ansible_ansible/test/lib/ansible_test/_internal/connections.py | """Connection abstraction for interacting with test hosts."""
from __future__ import annotations
import abc
import shlex
import tempfile
import typing as t
from .io import (
read_text_file,
)
from .config import (
EnvironmentConfig,
)
from .util import (
Display,
OutputStream,
SubprocessError,
... | 7,855 | Python | .py | 213 | 27.920188 | 150 | 0.594965 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,116 | init.py | ansible_ansible/test/lib/ansible_test/_internal/init.py | """Early initialization for ansible-test before most other imports have been performed."""
from __future__ import annotations
import resource
from .constants import (
SOFT_RLIMIT_NOFILE,
)
CURRENT_RLIMIT_NOFILE = resource.getrlimit(resource.RLIMIT_NOFILE)
DESIRED_RLIMIT_NOFILE = (SOFT_RLIMIT_NOFILE, CURRENT_RLIM... | 505 | Python | .py | 11 | 43.454545 | 90 | 0.802041 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,117 | encoding.py | ansible_ansible/test/lib/ansible_test/_internal/encoding.py | """Functions for encoding and decoding strings."""
from __future__ import annotations
import typing as t
ENCODING = 'utf-8'
def to_optional_bytes(value: t.Optional[str | bytes], errors: str = 'strict') -> t.Optional[bytes]:
"""Return the given value as bytes encoded using UTF-8 if not already bytes, or None if ... | 1,379 | Python | .py | 24 | 52.541667 | 113 | 0.695749 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,118 | cache.py | ansible_ansible/test/lib/ansible_test/_internal/cache.py | """Cache for commonly shared data that is intended to be immutable."""
from __future__ import annotations
import collections.abc as c
import typing as t
from .config import (
CommonConfig,
)
TValue = t.TypeVar('TValue')
class CommonCache:
"""Common cache."""
def __init__(self, args: CommonConfig) -> N... | 1,050 | Python | .py | 22 | 41.727273 | 150 | 0.6778 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,119 | venv.py | ansible_ansible/test/lib/ansible_test/_internal/venv.py | """Virtual environment management."""
from __future__ import annotations
import collections.abc as c
import json
import os
import pathlib
import sys
import typing as t
from .config import (
EnvironmentConfig,
)
from .util import (
find_python,
SubprocessError,
ANSIBLE_TEST_TARGET_TOOLS_ROOT,
disp... | 5,521 | Python | .py | 139 | 33.971223 | 136 | 0.704946 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,120 | python_requirements.py | ansible_ansible/test/lib/ansible_test/_internal/python_requirements.py | """Python requirements management"""
from __future__ import annotations
import base64
import dataclasses
import json
import os
import typing as t
from .encoding import (
to_text,
to_bytes,
)
from .io import (
read_text_file,
)
from .util import (
ANSIBLE_TEST_DATA_ROOT,
ANSIBLE_TEST_TARGET_ROOT,... | 15,205 | Python | .py | 334 | 39.452096 | 148 | 0.705447 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,121 | payload.py | ansible_ansible/test/lib/ansible_test/_internal/payload.py | """Payload management for sending Ansible files and test content to other systems (VMs, containers)."""
from __future__ import annotations
import os
import stat
import tarfile
import tempfile
import time
import typing as t
from .constants import (
ANSIBLE_BIN_SYMLINK_MAP,
)
from .config import (
IntegrationC... | 8,012 | Python | .py | 163 | 41.226994 | 153 | 0.663167 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,122 | metadata.py | ansible_ansible/test/lib/ansible_test/_internal/metadata.py | """Test metadata for passing data to delegated tests."""
from __future__ import annotations
import typing as t
from .util import (
display,
generate_name,
)
from .io import (
write_json_file,
read_json_file,
)
from .diff import (
parse_diff,
FileDiff,
)
class Metadata:
"""Metadata objec... | 4,791 | Python | .py | 105 | 37.447619 | 133 | 0.645064 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,123 | __init__.py | ansible_ansible/test/lib/ansible_test/_internal/__init__.py | """Test runner for all Ansible tests."""
from __future__ import annotations
import os
import sys
import typing as t
# This import should occur as early as possible.
# It must occur before subprocess has been imported anywhere in the current process.
from .init import (
CURRENT_RLIMIT_NOFILE,
)
from .constants im... | 3,156 | Python | .py | 103 | 24.407767 | 87 | 0.663366 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,124 | become.py | ansible_ansible/test/lib/ansible_test/_internal/become.py | """Become abstraction for interacting with test hosts."""
from __future__ import annotations
import abc
import shlex
from .util import (
get_subclasses,
)
class Become(metaclass=abc.ABCMeta):
"""Base class for become implementations."""
@classmethod
def name(cls) -> str:
"""The name of this... | 3,071 | Python | .py | 79 | 32.113924 | 113 | 0.628001 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,125 | content_config.py | ansible_ansible/test/lib/ansible_test/_internal/content_config.py | """Content configuration."""
from __future__ import annotations
import os
import pickle
import typing as t
from .constants import (
CONTROLLER_PYTHON_VERSIONS,
SUPPORTED_PYTHON_VERSIONS,
)
from .compat.packaging import (
PACKAGING_IMPORT_ERROR,
SpecifierSet,
Version,
)
from .compat.yaml import (... | 5,588 | Python | .py | 128 | 37.164063 | 129 | 0.692833 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,126 | host_profiles.py | ansible_ansible/test/lib/ansible_test/_internal/host_profiles.py | """Profiles to represent individual test hosts or a user-provided inventory file."""
from __future__ import annotations
import abc
import dataclasses
import os
import shlex
import tempfile
import time
import typing as t
from .io import (
read_text_file,
write_text_file,
)
from .config import (
CommonConf... | 65,629 | Python | .py | 1,143 | 46.881015 | 159 | 0.652183 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,127 | bootstrap.py | ansible_ansible/test/lib/ansible_test/_internal/bootstrap.py | """Bootstrapping for test hosts."""
from __future__ import annotations
import dataclasses
import os
import typing as t
from .io import (
read_text_file,
)
from .util import (
ANSIBLE_TEST_TARGET_ROOT,
)
from .util_common import (
ShellScriptTemplate,
set_shebang,
)
from .core_ci import (
SshKey... | 2,533 | Python | .py | 71 | 28.943662 | 102 | 0.653799 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,128 | completion.py | ansible_ansible/test/lib/ansible_test/_internal/completion.py | """Loading, parsing and storing of completion configurations."""
from __future__ import annotations
import abc
import dataclasses
import enum
import os
import typing as t
from .constants import (
CONTROLLER_PYTHON_VERSIONS,
SUPPORTED_PYTHON_VERSIONS,
)
from .util import (
ANSIBLE_TEST_DATA_ROOT,
cach... | 11,052 | Python | .py | 232 | 41.426724 | 159 | 0.698388 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,129 | diff.py | ansible_ansible/test/lib/ansible_test/_internal/diff.py | """Diff parsing functions and classes."""
from __future__ import annotations
import re
import textwrap
import traceback
import typing as t
from .util import (
ApplicationError,
)
def parse_diff(lines: list[str]) -> list[FileDiff]:
"""Parse the given diff lines and return a list of FileDiff objects represent... | 7,310 | Python | .py | 177 | 30.898305 | 144 | 0.562632 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,130 | timeout.py | ansible_ansible/test/lib/ansible_test/_internal/timeout.py | """Timeout management for tests."""
from __future__ import annotations
import dataclasses
import datetime
import functools
import os
import signal
import time
import typing as t
from .io import (
read_json_file,
)
from .config import (
CommonConfig,
TestConfig,
)
from .util import (
display,
Tim... | 4,052 | Python | .py | 96 | 36.229167 | 140 | 0.704488 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,131 | data.py | ansible_ansible/test/lib/ansible_test/_internal/data.py | """Context information for the current invocation of ansible-test."""
from __future__ import annotations
import collections.abc as c
import dataclasses
import os
import typing as t
from .util import (
ApplicationError,
import_plugins,
is_subdir,
ANSIBLE_LIB_ROOT,
ANSIBLE_TEST_ROOT,
ANSIBLE_SOU... | 11,184 | Python | .py | 220 | 41.822727 | 159 | 0.66835 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,132 | containers.py | ansible_ansible/test/lib/ansible_test/_internal/containers.py | """High level functions for working with containers."""
from __future__ import annotations
import collections.abc as c
import contextlib
import json
import random
import time
import uuid
import threading
import typing as t
from .util import (
ApplicationError,
SubprocessError,
display,
sanitize_host_n... | 33,905 | Python | .py | 723 | 38.305671 | 156 | 0.659093 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,133 | inventory.py | ansible_ansible/test/lib/ansible_test/_internal/inventory.py | """Inventory creation from host profiles."""
from __future__ import annotations
import shutil
import typing as t
from .config import (
EnvironmentConfig,
)
from .util import (
sanitize_host_name,
exclude_none_values,
)
from .host_profiles import (
ControllerHostProfile,
ControllerProfile,
Ho... | 5,408 | Python | .py | 138 | 29.891304 | 135 | 0.630805 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,134 | http.py | ansible_ansible/test/lib/ansible_test/_internal/http.py | """
Primitive replacement for requests to avoid extra dependency.
Avoids use of urllib2 due to lack of SNI support.
"""
from __future__ import annotations
import json
import time
import typing as t
from .util import (
ApplicationError,
SubprocessError,
display,
)
from .util_common import (
CommonConf... | 4,123 | Python | .py | 101 | 31.821782 | 143 | 0.584546 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,135 | container_probe.py | ansible_ansible/test/lib/ansible_test/_internal/dev/container_probe.py | """Diagnostic utilities to probe container cgroup behavior during development and testing (both manual and integration)."""
from __future__ import annotations
import dataclasses
import enum
import json
import os
import pathlib
import pwd
import typing as t
from ..io import (
read_text_file,
write_text_file,
)... | 7,819 | Python | .py | 160 | 40.25625 | 152 | 0.651242 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,136 | __init__.py | ansible_ansible/test/lib/ansible_test/_internal/dev/__init__.py | """Development and testing support code. Enabled through the use of `--dev-*` command line options."""
from __future__ import annotations
| 138 | Python | .py | 2 | 68 | 102 | 0.75 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,137 | local.py | ansible_ansible/test/lib/ansible_test/_internal/ci/local.py | """Support code for working without a supported CI provider."""
from __future__ import annotations
import os
import platform
import random
import re
import typing as t
from ..config import (
CommonConfig,
TestConfig,
)
from ..io import (
read_text_file,
)
from ..git import (
Git,
)
from ..util impo... | 6,739 | Python | .py | 160 | 32.875 | 104 | 0.613121 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,138 | __init__.py | ansible_ansible/test/lib/ansible_test/_internal/ci/__init__.py | """Support code for CI environments."""
from __future__ import annotations
import abc
import base64
import json
import os
import tempfile
import typing as t
from ..encoding import (
to_bytes,
to_text,
)
from ..io import (
read_text_file,
write_text_file,
)
from ..config import (
CommonConfig,
... | 7,738 | Python | .py | 159 | 41.283019 | 157 | 0.688431 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,139 | azp.py | ansible_ansible/test/lib/ansible_test/_internal/ci/azp.py | """Support code for working with Azure Pipelines."""
from __future__ import annotations
import os
import tempfile
import uuid
import typing as t
import urllib.parse
from ..encoding import (
to_bytes,
)
from ..config import (
CommonConfig,
TestConfig,
)
from ..git import (
Git,
)
from ..http import ... | 10,136 | Python | .py | 207 | 40.014493 | 150 | 0.644877 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,140 | epilog.py | ansible_ansible/test/lib/ansible_test/_internal/cli/epilog.py | """Argument parsing epilog generation."""
from __future__ import annotations
from .argparsing import (
CompositeActionCompletionFinder,
)
from ..data import (
data_context,
)
def get_epilog(completer: CompositeActionCompletionFinder) -> str:
"""Generate and return the epilog to use for help output."""
... | 658 | Python | .py | 17 | 34.294118 | 85 | 0.725984 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,141 | converters.py | ansible_ansible/test/lib/ansible_test/_internal/cli/converters.py | """Converters for use as the type argument for arparse's add_argument method."""
from __future__ import annotations
import argparse
def key_value_type(value: str) -> tuple[str, str]:
"""Wrapper around key_value."""
return key_value(value)
def key_value(value: str) -> tuple[str, str]:
"""Type parsing an... | 572 | Python | .py | 12 | 43.416667 | 97 | 0.688969 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,142 | completers.py | ansible_ansible/test/lib/ansible_test/_internal/cli/completers.py | """Completers for use with argcomplete."""
from __future__ import annotations
import argparse
from ..target import (
find_target_completion,
)
from .argparsing.argcompletion import (
OptionCompletionFinder,
)
def complete_target(completer: OptionCompletionFinder, prefix: str, parsed_args: argparse.Namespac... | 1,104 | Python | .py | 21 | 49.047619 | 119 | 0.756983 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,143 | __init__.py | ansible_ansible/test/lib/ansible_test/_internal/cli/__init__.py | """Command line parsing."""
from __future__ import annotations
import argparse
import os
import sys
import typing as t
from .argparsing import (
CompositeActionCompletionFinder,
)
from .commands import (
do_commands,
)
from .epilog import (
get_epilog,
)
from .compat import (
HostSettings,
conv... | 1,427 | Python | .py | 47 | 25.702128 | 141 | 0.703812 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,144 | compat.py | ansible_ansible/test/lib/ansible_test/_internal/cli/compat.py | """Provides compatibility with first-generation host delegation options in ansible-test."""
from __future__ import annotations
import argparse
import collections.abc as c
import dataclasses
import enum
import os
import types
import typing as t
from ..constants import (
CONTROLLER_PYTHON_VERSIONS,
SUPPORTED_PY... | 23,101 | Python | .py | 413 | 46.622276 | 160 | 0.683535 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,145 | environments.py | ansible_ansible/test/lib/ansible_test/_internal/cli/environments.py | """Command line parsing for test environments."""
from __future__ import annotations
import argparse
import enum
import functools
import typing as t
from ..constants import (
CONTROLLER_PYTHON_VERSIONS,
REMOTE_PROVIDERS,
SECCOMP_CHOICES,
SUPPORTED_PYTHON_VERSIONS,
)
from ..util import (
REMOTE_AR... | 19,956 | Python | .py | 480 | 34.854167 | 160 | 0.693862 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,146 | actions.py | ansible_ansible/test/lib/ansible_test/_internal/cli/actions.py | """Actions for handling composite arguments with argparse."""
from __future__ import annotations
from .argparsing import (
CompositeAction,
NamespaceParser,
)
from .parsers import (
DelegatedControllerParser,
NetworkSshTargetParser,
NetworkTargetParser,
OriginControllerParser,
PosixSshTarg... | 3,366 | Python | .py | 68 | 43.794118 | 90 | 0.750459 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,147 | argcompletion.py | ansible_ansible/test/lib/ansible_test/_internal/cli/argparsing/argcompletion.py | """Wrapper around argcomplete providing bug fixes and additional features."""
from __future__ import annotations
import argparse
import enum
import os
import typing as t
class Substitute:
"""Substitute for missing class which accepts all arguments."""
def __init__(self, *args, **kwargs) -> None:
pas... | 5,166 | Python | .py | 113 | 38.548673 | 149 | 0.692078 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,148 | __init__.py | ansible_ansible/test/lib/ansible_test/_internal/cli/argparsing/__init__.py | """Completion finder which brings together custom options and completion logic."""
from __future__ import annotations
import abc
import argparse
import os
import re
import typing as t
from .argcompletion import (
OptionCompletionFinder,
get_comp_type,
register_safe_action,
warn,
)
from .parsers impor... | 8,922 | Python | .py | 208 | 34.625 | 152 | 0.671019 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,149 | parsers.py | ansible_ansible/test/lib/ansible_test/_internal/cli/argparsing/parsers.py | """General purpose composite argument parsing and completion."""
from __future__ import annotations
import abc
import collections.abc as c
import contextlib
import dataclasses
import enum
import os
import re
import typing as t
# NOTE: When choosing delimiters, take into account Bash and argcomplete behavior.
#
# Reco... | 21,490 | Python | .py | 438 | 40.305936 | 149 | 0.655822 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,150 | actions.py | ansible_ansible/test/lib/ansible_test/_internal/cli/argparsing/actions.py | """Actions for argparse."""
from __future__ import annotations
import argparse
import enum
import typing as t
class EnumAction(argparse.Action):
"""Parse an enum using the lowercase enum names."""
def __init__(self, **kwargs: t.Any) -> None:
self.enum_type: t.Type[enum.Enum] = kwargs.pop('type', Non... | 606 | Python | .py | 14 | 38.214286 | 83 | 0.669506 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,151 | base_argument_parsers.py | ansible_ansible/test/lib/ansible_test/_internal/cli/parsers/base_argument_parsers.py | """Base classes for the primary parsers for composite command line arguments."""
from __future__ import annotations
import abc
import typing as t
from ..argparsing.parsers import (
CompletionError,
NamespaceParser,
ParserState,
)
class ControllerNamespaceParser(NamespaceParser, metaclass=abc.ABCMeta):
... | 2,288 | Python | .py | 56 | 34.625 | 100 | 0.678878 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,152 | __init__.py | ansible_ansible/test/lib/ansible_test/_internal/cli/parsers/__init__.py | """Composite argument parsers for ansible-test specific command-line arguments."""
from __future__ import annotations
import typing as t
from ...constants import (
SUPPORTED_PYTHON_VERSIONS,
)
from ...ci import (
get_ci_provider,
)
from ...host_configs import (
ControllerConfig,
NetworkConfig,
N... | 10,487 | Python | .py | 226 | 38.606195 | 140 | 0.668141 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,153 | host_config_parsers.py | ansible_ansible/test/lib/ansible_test/_internal/cli/parsers/host_config_parsers.py | """Composite parsers for the various types of hosts."""
from __future__ import annotations
import typing as t
from ...completion import (
docker_completion,
network_completion,
remote_completion,
windows_completion,
filter_completion,
)
from ...host_configs import (
ControllerConfig,
Dock... | 11,216 | Python | .py | 230 | 41.108696 | 143 | 0.673029 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,154 | value_parsers.py | ansible_ansible/test/lib/ansible_test/_internal/cli/parsers/value_parsers.py | """Composite argument value parsers used by other parsers."""
from __future__ import annotations
import collections.abc as c
import typing as t
from ...host_configs import (
NativePythonConfig,
PythonConfig,
VirtualPythonConfig,
)
from ..argparsing.parsers import (
AbsolutePathParser,
AnyParser,
... | 6,060 | Python | .py | 130 | 38.5 | 150 | 0.666497 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,155 | helpers.py | ansible_ansible/test/lib/ansible_test/_internal/cli/parsers/helpers.py | """Helper functions for composite parsers."""
from __future__ import annotations
from ...constants import (
CONTROLLER_PYTHON_VERSIONS,
SUPPORTED_PYTHON_VERSIONS,
)
from ...completion import (
docker_completion,
remote_completion,
filter_completion,
)
from ...host_configs import (
DockerConfi... | 2,034 | Python | .py | 41 | 44.804878 | 111 | 0.753667 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,156 | key_value_parsers.py | ansible_ansible/test/lib/ansible_test/_internal/cli/parsers/key_value_parsers.py | """Composite argument key-value parsers used by other parsers."""
from __future__ import annotations
import typing as t
from ...constants import (
CONTROLLER_PYTHON_VERSIONS,
REMOTE_PROVIDERS,
SECCOMP_CHOICES,
SUPPORTED_PYTHON_VERSIONS,
)
from ...completion import (
AuditMode,
CGroupVersion,
... | 9,570 | Python | .py | 188 | 42.87234 | 145 | 0.675858 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,157 | __init__.py | ansible_ansible/test/lib/ansible_test/_internal/cli/commands/__init__.py | """Command line parsing for all commands."""
from __future__ import annotations
import argparse
import functools
import sys
from ...util import (
display,
)
from ..completers import (
complete_target,
register_completer,
)
from ..environments import (
CompositeActionCompletionFinder,
)
from .covera... | 5,436 | Python | .py | 195 | 21.246154 | 119 | 0.618672 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,158 | env.py | ansible_ansible/test/lib/ansible_test/_internal/cli/commands/env.py | """Command line parsing for the `env` command."""
from __future__ import annotations
import argparse
from ...commands.env import (
EnvConfig,
command_env,
)
from ..environments import (
CompositeActionCompletionFinder,
ControllerMode,
TargetMode,
add_environments,
)
def do_env(
subparse... | 1,399 | Python | .py | 51 | 21.490196 | 99 | 0.647455 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,159 | shell.py | ansible_ansible/test/lib/ansible_test/_internal/cli/commands/shell.py | """Command line parsing for the `shell` command."""
from __future__ import annotations
import argparse
from ...commands.shell import (
command_shell,
)
from ...config import (
ShellConfig,
)
from ..environments import (
CompositeActionCompletionFinder,
ControllerMode,
TargetMode,
add_environ... | 1,268 | Python | .py | 47 | 21.468085 | 92 | 0.662531 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,160 | units.py | ansible_ansible/test/lib/ansible_test/_internal/cli/commands/units.py | """Command line parsing for the `units` command."""
from __future__ import annotations
import argparse
from ...config import (
UnitsConfig,
)
from ...commands.units import (
command_units,
)
from ...target import (
walk_units_targets,
)
from ..environments import (
CompositeActionCompletionFinder,
... | 1,406 | Python | .py | 52 | 21.557692 | 92 | 0.660701 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,161 | sanity.py | ansible_ansible/test/lib/ansible_test/_internal/cli/commands/sanity.py | """Command line parsing for the `sanity` command."""
from __future__ import annotations
import argparse
from ...config import (
SanityConfig,
)
from ...commands.sanity import (
command_sanity,
sanity_get_tests,
)
from ...target import (
walk_sanity_targets,
)
from ..environments import (
Compos... | 2,409 | Python | .py | 86 | 21.674419 | 94 | 0.633681 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,162 | xml.py | ansible_ansible/test/lib/ansible_test/_internal/cli/commands/coverage/xml.py | """Command line parsing for the `coverage xml` command."""
from __future__ import annotations
import argparse
import collections.abc as c
import typing as t
from ....commands.coverage.xml import (
command_coverage_xml,
CoverageXmlConfig,
)
from ...environments import (
CompositeActionCompletionFinder,
... | 1,151 | Python | .py | 34 | 29.294118 | 109 | 0.736462 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,163 | report.py | ansible_ansible/test/lib/ansible_test/_internal/cli/commands/coverage/report.py | """Command line parsing for the `coverage report` command."""
from __future__ import annotations
import argparse
import collections.abc as c
import typing as t
from ....commands.coverage.report import (
command_coverage_report,
CoverageReportConfig,
)
from ...environments import (
CompositeActionCompleti... | 1,683 | Python | .py | 49 | 28.857143 | 107 | 0.701603 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,164 | __init__.py | ansible_ansible/test/lib/ansible_test/_internal/cli/commands/coverage/__init__.py | """Command line parsing for all `coverage` commands."""
from __future__ import annotations
import argparse
from ....commands.coverage import (
COVERAGE_GROUPS,
)
from ...environments import (
CompositeActionCompletionFinder,
)
from .analyze import (
do_analyze,
)
from .combine import (
do_combine,
... | 1,967 | Python | .py | 66 | 25.121212 | 81 | 0.697131 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,165 | html.py | ansible_ansible/test/lib/ansible_test/_internal/cli/commands/coverage/html.py | """Command line parsing for the `coverage html` command."""
from __future__ import annotations
import argparse
import collections.abc as c
import typing as t
from ....commands.coverage.html import (
command_coverage_html,
CoverageHtmlConfig,
)
from ...environments import (
CompositeActionCompletionFinder... | 1,162 | Python | .py | 34 | 29.617647 | 109 | 0.739053 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,166 | erase.py | ansible_ansible/test/lib/ansible_test/_internal/cli/commands/coverage/erase.py | """Command line parsing for the `coverage erase` command."""
from __future__ import annotations
import argparse
from ....commands.coverage.erase import (
command_coverage_erase,
CoverageEraseConfig,
)
from ...environments import (
CompositeActionCompletionFinder,
ControllerMode,
TargetMode,
a... | 894 | Python | .py | 29 | 26.137931 | 103 | 0.724942 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,167 | combine.py | ansible_ansible/test/lib/ansible_test/_internal/cli/commands/coverage/combine.py | """Command line parsing for the `coverage combine` command."""
from __future__ import annotations
import argparse
import collections.abc as c
import typing as t
from ....commands.coverage.combine import (
command_coverage_combine,
CoverageCombineConfig,
)
from ...environments import (
CompositeActionComp... | 1,357 | Python | .py | 39 | 29.846154 | 109 | 0.731651 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,168 | __init__.py | ansible_ansible/test/lib/ansible_test/_internal/cli/commands/coverage/analyze/__init__.py | """Command line parsing for all `coverage analyze` commands."""
from __future__ import annotations
import argparse
from .targets import (
do_targets,
)
from ....environments import (
CompositeActionCompletionFinder,
)
def do_analyze(
subparsers,
parent: argparse.ArgumentParser,
completer: Compo... | 698 | Python | .py | 21 | 29.238095 | 80 | 0.741791 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,169 | generate.py | ansible_ansible/test/lib/ansible_test/_internal/cli/commands/coverage/analyze/targets/generate.py | """Command line parsing for the `coverage analyze targets generate` command."""
from __future__ import annotations
import argparse
from ......commands.coverage.analyze.targets.generate import (
command_coverage_analyze_targets_generate,
CoverageAnalyzeTargetsGenerateConfig,
)
from .....environments import (
... | 1,389 | Python | .py | 39 | 30.25641 | 122 | 0.729851 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,170 | filter.py | ansible_ansible/test/lib/ansible_test/_internal/cli/commands/coverage/analyze/targets/filter.py | """Command line parsing for the `coverage analyze targets filter` command."""
from __future__ import annotations
import argparse
from ......commands.coverage.analyze.targets.filter import (
command_coverage_analyze_targets_filter,
CoverageAnalyzeTargetsFilterConfig,
)
from .....environments import (
Comp... | 2,029 | Python | .py | 62 | 26.467742 | 120 | 0.682028 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,171 | missing.py | ansible_ansible/test/lib/ansible_test/_internal/cli/commands/coverage/analyze/targets/missing.py | """Command line parsing for the `coverage analyze targets missing` command."""
from __future__ import annotations
import argparse
from ......commands.coverage.analyze.targets.missing import (
command_coverage_analyze_targets_missing,
CoverageAnalyzeTargetsMissingConfig,
)
from .....environments import (
... | 1,795 | Python | .py | 52 | 28.653846 | 121 | 0.704624 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,172 | __init__.py | ansible_ansible/test/lib/ansible_test/_internal/cli/commands/coverage/analyze/targets/__init__.py | """Command line parsing for all `coverage analyze targets` commands."""
from __future__ import annotations
import argparse
from .....environments import (
CompositeActionCompletionFinder,
)
from .combine import (
do_combine,
)
from .expand import (
do_expand,
)
from .filter import (
do_filter,
)
f... | 1,082 | Python | .py | 37 | 25.567568 | 81 | 0.738878 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,173 | combine.py | ansible_ansible/test/lib/ansible_test/_internal/cli/commands/coverage/analyze/targets/combine.py | """Command line parsing for the `coverage analyze targets combine` command."""
from __future__ import annotations
import argparse
from ......commands.coverage.analyze.targets.combine import (
command_coverage_analyze_targets_combine,
CoverageAnalyzeTargetsCombineConfig,
)
from .....environments import (
... | 1,388 | Python | .py | 39 | 30.230769 | 121 | 0.728155 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,174 | expand.py | ansible_ansible/test/lib/ansible_test/_internal/cli/commands/coverage/analyze/targets/expand.py | """Command line parsing for the `coverage analyze targets expand` command."""
from __future__ import annotations
import argparse
from ......commands.coverage.analyze.targets.expand import (
command_coverage_analyze_targets_expand,
CoverageAnalyzeTargetsExpandConfig,
)
from .....environments import (
Comp... | 1,374 | Python | .py | 38 | 30.894737 | 120 | 0.732278 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,175 | windows.py | ansible_ansible/test/lib/ansible_test/_internal/cli/commands/integration/windows.py | """Command line parsing for the `windows-integration` command."""
from __future__ import annotations
import argparse
import collections.abc as c
import typing as t
from ....commands.integration.windows import (
command_windows_integration,
)
from ....config import (
WindowsIntegrationConfig,
)
from ....targ... | 1,414 | Python | .py | 40 | 30.975 | 128 | 0.757153 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,176 | network.py | ansible_ansible/test/lib/ansible_test/_internal/cli/commands/integration/network.py | """Command line parsing for the `network-integration` command."""
from __future__ import annotations
import argparse
import collections.abc as c
import os
import typing as t
from ....commands.integration.network import (
command_network_integration,
)
from ....config import (
NetworkIntegrationConfig,
)
fro... | 2,621 | Python | .py | 67 | 34.119403 | 148 | 0.727703 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,177 | __init__.py | ansible_ansible/test/lib/ansible_test/_internal/cli/commands/integration/__init__.py | """Command line parsing for all integration commands."""
from __future__ import annotations
import argparse
from ...completers import (
complete_target,
register_completer,
)
from ...environments import (
CompositeActionCompletionFinder,
)
from .network import (
do_network_integration,
)
from .posi... | 4,029 | Python | .py | 133 | 23.75188 | 101 | 0.639255 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,178 | posix.py | ansible_ansible/test/lib/ansible_test/_internal/cli/commands/integration/posix.py | """Command line parsing for the `integration` command."""
from __future__ import annotations
import argparse
import collections.abc as c
import typing as t
from ....commands.integration.posix import (
command_posix_integration,
)
from ....config import (
PosixIntegrationConfig,
)
from ....target import (
... | 1,350 | Python | .py | 40 | 29.375 | 118 | 0.749038 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,179 | packaging.py | ansible_ansible/test/lib/ansible_test/_internal/compat/packaging.py | """Packaging compatibility."""
from __future__ import annotations
import typing as t
try:
from packaging import (
specifiers,
version,
)
SpecifierSet: t.Optional[t.Type[specifiers.SpecifierSet]] = specifiers.SpecifierSet
Version: t.Optional[t.Type[version.Version]] = version.Version
... | 518 | Python | .py | 15 | 30.133333 | 87 | 0.728 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,180 | __init__.py | ansible_ansible/test/lib/ansible_test/_internal/compat/__init__.py | """Nearly empty __init__.py to keep pylint happy."""
from __future__ import annotations
| 88 | Python | .py | 2 | 43 | 52 | 0.709302 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,181 | yaml.py | ansible_ansible/test/lib/ansible_test/_internal/compat/yaml.py | """PyYAML compatibility."""
from __future__ import annotations
import typing as t
from functools import (
partial,
)
try:
import yaml as _yaml
YAML_IMPORT_ERROR = None
except ImportError as ex:
yaml_load = None # pylint: disable=invalid-name
YAML_IMPORT_ERROR = ex
else:
try:
_SafeLo... | 530 | Python | .py | 18 | 25.5 | 101 | 0.708087 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,182 | __init__.py | ansible_ansible/test/lib/ansible_test/_internal/commands/__init__.py | """Nearly empty __init__.py to keep pylint happy."""
from __future__ import annotations
| 88 | Python | .py | 2 | 43 | 52 | 0.709302 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,183 | shellcheck.py | ansible_ansible/test/lib/ansible_test/_internal/commands/sanity/shellcheck.py | """Sanity test using shellcheck."""
from __future__ import annotations
import os
import typing as t
from xml.etree.ElementTree import (
fromstring,
Element,
)
from . import (
SanityVersionNeutral,
SanityMessage,
SanityFailure,
SanitySuccess,
SanitySkipped,
SanityTargets,
SANITY_RO... | 3,070 | Python | .py | 83 | 28.831325 | 147 | 0.628842 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,184 | bin_symlinks.py | ansible_ansible/test/lib/ansible_test/_internal/commands/sanity/bin_symlinks.py | """Sanity test for symlinks in the bin directory."""
from __future__ import annotations
import os
from . import (
SanityVersionNeutral,
SanityMessage,
SanityFailure,
SanitySuccess,
SanityTargets,
)
from ...constants import (
__file__ as symlink_map_full_path,
)
from ...test import (
Test... | 3,072 | Python | .py | 74 | 33 | 154 | 0.620202 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,185 | compile.py | ansible_ansible/test/lib/ansible_test/_internal/commands/sanity/compile.py | """Sanity test for proper python syntax."""
from __future__ import annotations
import os
from . import (
SanityMultipleVersion,
SanityMessage,
SanityFailure,
SanitySuccess,
SanityTargets,
SanitySkipped,
TARGET_SANITY_ROOT,
)
from ...test import (
TestResult,
)
from ...target import (... | 2,539 | Python | .py | 69 | 29.855072 | 123 | 0.645254 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,186 | ansible_doc.py | ansible_ansible/test/lib/ansible_test/_internal/commands/sanity/ansible_doc.py | """Sanity test for ansible-doc."""
from __future__ import annotations
import collections
import json
import os
import re
from . import (
DOCUMENTABLE_PLUGINS,
MULTI_FILE_PLUGINS,
SanitySingleVersion,
SanityFailure,
SanitySuccess,
SanityTargets,
SanityMessage,
)
from ...test import (
T... | 5,776 | Python | .py | 127 | 33.322835 | 151 | 0.582382 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,187 | __init__.py | ansible_ansible/test/lib/ansible_test/_internal/commands/sanity/__init__.py | """Execute Ansible sanity tests."""
from __future__ import annotations
import abc
import glob
import hashlib
import json
import os
import pathlib
import re
import collections
import collections.abc as c
import typing as t
from ...constants import (
CONTROLLER_PYTHON_VERSIONS,
REMOTE_ONLY_PYTHON_VERSIONS,
... | 53,388 | Python | .py | 981 | 43.627931 | 160 | 0.635927 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,188 | integration_aliases.py | ansible_ansible/test/lib/ansible_test/_internal/commands/sanity/integration_aliases.py | """Sanity test to check integration test aliases."""
from __future__ import annotations
import dataclasses
import json
import textwrap
import os
import re
import typing as t
from . import (
SanitySingleVersion,
SanityMessage,
SanityFailure,
SanitySuccess,
SanityTargets,
SANITY_ROOT,
)
from ..... | 16,221 | Python | .py | 319 | 39.846395 | 160 | 0.613957 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,189 | yamllint.py | ansible_ansible/test/lib/ansible_test/_internal/commands/sanity/yamllint.py | """Sanity test using yamllint."""
from __future__ import annotations
import json
import os
import typing as t
from . import (
SanitySingleVersion,
SanityMessage,
SanityFailure,
SanitySuccess,
SanityTargets,
SANITY_ROOT,
)
from ...test import (
TestResult,
)
from ...target import (
Te... | 3,423 | Python | .py | 95 | 27.936842 | 147 | 0.618441 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,190 | validate_modules.py | ansible_ansible/test/lib/ansible_test/_internal/commands/sanity/validate_modules.py | """Sanity test using validate-modules."""
from __future__ import annotations
import collections
import contextlib
import json
import os
import tarfile
import typing as t
from . import (
DOCUMENTABLE_PLUGINS,
MULTI_FILE_PLUGINS,
SanitySingleVersion,
SanityMessage,
SanityFailure,
SanitySuccess,
... | 8,186 | Python | .py | 196 | 31.908163 | 147 | 0.616074 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,191 | pep8.py | ansible_ansible/test/lib/ansible_test/_internal/commands/sanity/pep8.py | """Sanity test for PEP 8 style guidelines using pycodestyle."""
from __future__ import annotations
import os
import typing as t
from . import (
SanitySingleVersion,
SanityMessage,
SanityFailure,
SanitySuccess,
SanityTargets,
SANITY_ROOT,
)
from ...test import (
TestResult,
)
from ...targ... | 3,125 | Python | .py | 85 | 28.694118 | 147 | 0.606965 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,192 | ignores.py | ansible_ansible/test/lib/ansible_test/_internal/commands/sanity/ignores.py | """Sanity test for the sanity ignore file."""
from __future__ import annotations
import os
from . import (
SanityFailure,
SanityIgnoreParser,
SanityVersionNeutral,
SanitySuccess,
SanityMessage,
SanityTargets,
)
from ...test import (
calculate_confidence,
calculate_best_confidence,
... | 2,789 | Python | .py | 65 | 32.923077 | 142 | 0.629068 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,193 | pslint.py | ansible_ansible/test/lib/ansible_test/_internal/commands/sanity/pslint.py | """Sanity test using PSScriptAnalyzer."""
from __future__ import annotations
import json
import os
import re
import typing as t
from . import (
SanityVersionNeutral,
SanityMessage,
SanityFailure,
SanitySuccess,
SanitySkipped,
SanityTargets,
SANITY_ROOT,
)
from ...test import (
TestRes... | 3,210 | Python | .py | 90 | 27.8 | 147 | 0.61521 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,194 | import.py | ansible_ansible/test/lib/ansible_test/_internal/commands/sanity/import.py | """Sanity test for proper import exception handling."""
from __future__ import annotations
import collections.abc as c
import os
from . import (
SanityMultipleVersion,
SanityMessage,
SanityFailure,
SanitySuccess,
SanitySkipped,
TARGET_SANITY_ROOT,
SanityTargets,
create_sanity_virtualen... | 7,416 | Python | .py | 156 | 37.884615 | 158 | 0.637171 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,195 | pylint.py | ansible_ansible/test/lib/ansible_test/_internal/commands/sanity/pylint.py | """Sanity test using pylint."""
from __future__ import annotations
import collections.abc as c
import itertools
import json
import os
import datetime
import typing as t
from . import (
SanitySingleVersion,
SanityMessage,
SanityFailure,
SanitySuccess,
SanityTargets,
SANITY_ROOT,
)
from ...cons... | 11,682 | Python | .py | 230 | 41.1 | 154 | 0.635149 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,196 | __init__.py | ansible_ansible/test/lib/ansible_test/_internal/commands/env/__init__.py | """Show information about the test environment."""
from __future__ import annotations
import datetime
import os
import platform
import sys
import typing as t
from ...config import (
CommonConfig,
)
from ...io import (
write_json_file,
)
from ...util import (
display,
get_ansible_version,
get_ava... | 5,165 | Python | .py | 152 | 26.940789 | 132 | 0.62241 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,197 | xml.py | ansible_ansible/test/lib/ansible_test/_internal/commands/coverage/xml.py | """Generate XML code coverage reports."""
from __future__ import annotations
import os
import time
from xml.etree.ElementTree import (
Comment,
Element,
SubElement,
tostring,
)
from xml.dom import (
minidom,
)
from ...io import (
make_dirs,
read_json_file,
)
from ...util_common import (... | 5,774 | Python | .py | 142 | 33.359155 | 125 | 0.64333 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,198 | report.py | ansible_ansible/test/lib/ansible_test/_internal/commands/coverage/report.py | """Generate console code coverage reports."""
from __future__ import annotations
import os
import typing as t
from ...io import (
read_json_file,
)
from ...util import (
display,
)
from ...data import (
data_context,
)
from ...provisioning import (
prepare_profiles,
)
from .combine import (
co... | 4,868 | Python | .py | 112 | 34.660714 | 112 | 0.602757 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |
13,199 | __init__.py | ansible_ansible/test/lib/ansible_test/_internal/commands/coverage/__init__.py | """Common logic for the coverage subcommand."""
from __future__ import annotations
import collections.abc as c
import json
import os
import re
import typing as t
from ...encoding import (
to_bytes,
)
from ...io import (
read_text_file,
read_json_file,
)
from ...util import (
ApplicationError,
co... | 14,408 | Python | .py | 281 | 44.587189 | 158 | 0.676047 | ansible/ansible | 62,258 | 23,791 | 861 | GPL-3.0 | 9/5/2024, 5:11:58 PM (Europe/Amsterdam) |