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,200
html.py
ansible_ansible/test/lib/ansible_test/_internal/commands/coverage/html.py
"""Generate HTML code coverage reports.""" from __future__ import annotations import os from ...io import ( make_dirs, ) from ...util import ( display, ) from ...util_common import ( ResultType, ) from ...provisioning import ( prepare_profiles, ) from .combine import ( combine_coverage_files, ...
1,319
Python
.py
37
30.918919
98
0.692429
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,201
erase.py
ansible_ansible/test/lib/ansible_test/_internal/commands/coverage/erase.py
"""Erase code coverage files.""" from __future__ import annotations import os from ...util_common import ( ResultType, ) from ...executor import ( Delegate, ) from ...provisioning import ( prepare_profiles, ) from . import ( CoverageConfig, ) def command_coverage_erase(args: CoverageEraseConfig) ...
915
Python
.py
29
26.758621
72
0.699541
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,202
combine.py
ansible_ansible/test/lib/ansible_test/_internal/commands/coverage/combine.py
"""Combine code coverage files.""" from __future__ import annotations import collections.abc as c import os import json import typing as t from ...target import ( walk_compile_targets, walk_powershell_targets, ) from ...io import ( read_text_file, ) from ...util import ( ANSIBLE_TEST_TOOLS_ROOT, ...
11,950
Python
.py
258
38.104651
137
0.655616
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,203
__init__.py
ansible_ansible/test/lib/ansible_test/_internal/commands/coverage/analyze/__init__.py
"""Common logic for the `coverage analyze` subcommand.""" from __future__ import annotations import typing as t from .. import ( CoverageConfig, ) class CoverageAnalyzeConfig(CoverageConfig): """Configuration for the `coverage analyze` command.""" def __init__(self, args: t.Any) -> None: super()...
619
Python
.py
13
42.846154
136
0.715474
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,204
generate.py
ansible_ansible/test/lib/ansible_test/_internal/commands/coverage/analyze/targets/generate.py
"""Analyze code coverage data to determine which integration test targets provide coverage for each arc or line.""" from __future__ import annotations import os import typing as t from .....encoding import ( to_text, ) from .....data import ( data_context, ) from .....util_common import ( ResultType, ) ...
4,972
Python
.py
119
36.142857
152
0.706212
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,205
filter.py
ansible_ansible/test/lib/ansible_test/_internal/commands/coverage/analyze/targets/filter.py
"""Filter an aggregated coverage file, keeping only the specified targets.""" from __future__ import annotations import collections.abc as c import re import typing as t from .....executor import ( Delegate, ) from .....provisioning import ( prepare_profiles, ) from . import ( CoverageAnalyzeTargetsConf...
3,958
Python
.py
88
38.488636
104
0.697784
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,206
missing.py
ansible_ansible/test/lib/ansible_test/_internal/commands/coverage/analyze/targets/missing.py
"""Identify aggregated coverage in one file missing from another.""" from __future__ import annotations import os import typing as t from .....encoding import ( to_bytes, ) from .....executor import ( Delegate, ) from .....provisioning import ( prepare_profiles, ) from . import ( CoverageAnalyzeTar...
3,894
Python
.py
88
38.068182
158
0.683095
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,207
__init__.py
ansible_ansible/test/lib/ansible_test/_internal/commands/coverage/analyze/targets/__init__.py
"""Analyze integration test target code coverage.""" from __future__ import annotations import collections.abc as c import os import typing as t from .....io import ( read_json_file, write_json_file, ) from .....util import ( ApplicationError, display, ) from .. import ( CoverageAnalyzeConfig, )...
5,785
Python
.py
110
47.118182
160
0.682472
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,208
combine.py
ansible_ansible/test/lib/ansible_test/_internal/commands/coverage/analyze/targets/combine.py
"""Combine integration test target code coverage reports.""" from __future__ import annotations import typing as t from .....executor import ( Delegate, ) from .....provisioning import ( prepare_profiles, ) from . import ( CoverageAnalyzeTargetsConfig, get_target_index, make_report, read_repo...
2,367
Python
.py
55
37.6
104
0.719895
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,209
expand.py
ansible_ansible/test/lib/ansible_test/_internal/commands/coverage/analyze/targets/expand.py
"""Expand target names in an aggregated coverage file.""" from __future__ import annotations import typing as t from .....io import ( SortedSetEncoder, write_json_file, ) from .....executor import ( Delegate, ) from .....provisioning import ( prepare_profiles, ) from . import ( CoverageAnalyzeTa...
1,407
Python
.py
38
32.289474
94
0.718081
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,210
__init__.py
ansible_ansible/test/lib/ansible_test/_internal/commands/shell/__init__.py
"""Open a shell prompt inside an ansible-test environment.""" from __future__ import annotations import os import sys import typing as t from ...util import ( ApplicationError, OutputStream, display, SubprocessError, HostConnectionError, ) from ...config import ( ShellConfig, ) from ...execu...
4,371
Python
.py
104
34.519231
126
0.666982
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,211
filters.py
ansible_ansible/test/lib/ansible_test/_internal/commands/integration/filters.py
"""Logic for filtering out integration test targets which are unsupported for the currently provided arguments and available hosts.""" from __future__ import annotations import abc import typing as t from ...config import ( IntegrationConfig, ) from ...util import ( cache, detect_architecture, displa...
12,168
Python
.py
201
52.676617
160
0.699764
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,212
windows.py
ansible_ansible/test/lib/ansible_test/_internal/commands/integration/windows.py
"""Windows integration testing.""" from __future__ import annotations import os from ...util import ( ApplicationError, ANSIBLE_TEST_CONFIG_ROOT, ) from ...util_common import ( handle_layout_messages, ) from ...containers import ( create_container_hooks, local_ssh, root_ssh, ) from ...targe...
2,639
Python
.py
63
36.857143
145
0.733776
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,213
network.py
ansible_ansible/test/lib/ansible_test/_internal/commands/integration/network.py
"""Network integration testing.""" from __future__ import annotations import os from ...util import ( ApplicationError, ANSIBLE_TEST_CONFIG_ROOT, ) from ...util_common import ( handle_layout_messages, ) from ...target import ( walk_network_integration_targets, ) from ...config import ( NetworkI...
2,417
Python
.py
60
34.933333
115
0.726496
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,214
__init__.py
ansible_ansible/test/lib/ansible_test/_internal/commands/integration/__init__.py
"""Ansible integration test infrastructure.""" from __future__ import annotations import collections.abc as c import contextlib import datetime import json import os import re import shutil import tempfile import time import typing as t from ...encoding import ( to_bytes, ) from ...ansible_util import ( ansi...
36,888
Python
.py
732
41.103825
159
0.664272
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,215
coverage.py
ansible_ansible/test/lib/ansible_test/_internal/commands/integration/coverage.py
"""Code coverage support for integration tests.""" from __future__ import annotations import abc import os import shutil import tempfile import typing as t import zipfile from ...io import ( write_text_file, ) from ...ansible_util import ( run_playbook, ) from ...config import ( IntegrationConfig, ) fr...
15,578
Python
.py
312
41.464744
159
0.669856
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,216
posix.py
ansible_ansible/test/lib/ansible_test/_internal/commands/integration/posix.py
"""POSIX integration testing.""" from __future__ import annotations import os from ...util_common import ( handle_layout_messages, ) from ...containers import ( create_container_hooks, local_ssh, root_ssh, ) from ...target import ( walk_posix_integration_targets, ) from ...config import ( P...
1,444
Python
.py
36
36.555556
145
0.757163
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,217
gcp.py
ansible_ansible/test/lib/ansible_test/_internal/commands/integration/cloud/gcp.py
# Copyright: (c) 2018, Google Inc. # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) """GCP plugin for integration tests.""" from __future__ import annotations import configparser from ....util import ( display, ) from ....config import ( IntegrationConfig, ) from ...
1,591
Python
.py
41
32.341463
96
0.682529
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,218
scaleway.py
ansible_ansible/test/lib/ansible_test/_internal/commands/integration/cloud/scaleway.py
"""Scaleway plugin for integration tests.""" from __future__ import annotations import configparser from ....util import ( display, ) from ....config import ( IntegrationConfig, ) from . import ( CloudEnvironment, CloudEnvironmentConfig, CloudProvider, ) class ScalewayCloudProvider(CloudProvid...
1,537
Python
.py
41
30.707317
105
0.666667
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,219
cloudscale.py
ansible_ansible/test/lib/ansible_test/_internal/commands/integration/cloud/cloudscale.py
# -*- coding: utf-8 -*- # # (c) 2018, Gaudenz Steinlin <gaudenz.steinlin@cloudscale.ch> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) """Cloudscale plugin for integration tests.""" from __future__ import annotations import configparser from ....util import ( display...
1,794
Python
.py
45
33.644444
101
0.687861
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,220
acme.py
ansible_ansible/test/lib/ansible_test/_internal/commands/integration/cloud/acme.py
"""ACME plugin for integration tests.""" from __future__ import annotations import os from ....config import ( IntegrationConfig, ) from ....containers import ( run_support_container, ) from . import ( CloudEnvironment, CloudEnvironmentConfig, CloudProvider, ) class ACMEProvider(CloudProvider)...
2,141
Python
.py
59
28.305085
106
0.631426
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,221
vcenter.py
ansible_ansible/test/lib/ansible_test/_internal/commands/integration/cloud/vcenter.py
"""VMware vCenter plugin for integration tests.""" from __future__ import annotations import configparser from ....util import ( ApplicationError, display, ) from ....config import ( IntegrationConfig, ) from . import ( CloudEnvironment, CloudEnvironmentConfig, CloudProvider, ) class Vcent...
2,190
Python
.py
52
33.269231
103
0.636192
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,222
aws.py
ansible_ansible/test/lib/ansible_test/_internal/commands/integration/cloud/aws.py
"""AWS plugin for integration tests.""" from __future__ import annotations import os import uuid import configparser import typing as t from ....util import ( ApplicationError, display, ) from ....config import ( IntegrationConfig, ) from ....target import ( IntegrationTarget, ) from ....core_ci im...
4,202
Python
.py
95
35.905263
156
0.653478
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,223
openshift.py
ansible_ansible/test/lib/ansible_test/_internal/commands/integration/cloud/openshift.py
"""OpenShift plugin for integration tests.""" from __future__ import annotations import re from ....io import ( read_text_file, ) from ....util import ( display, ) from ....config import ( IntegrationConfig, ) from ....containers import ( run_support_container, wait_for_file, ) from . import (...
3,224
Python
.py
81
31.962963
143
0.629939
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,224
opennebula.py
ansible_ansible/test/lib/ansible_test/_internal/commands/integration/cloud/opennebula.py
"""OpenNebula plugin for integration tests.""" from __future__ import annotations import configparser from ....util import ( display, ) from . import ( CloudEnvironment, CloudEnvironmentConfig, CloudProvider, ) class OpenNebulaCloudProvider(CloudProvider): """Checks if a configuration file has ...
1,807
Python
.py
45
32.466667
105
0.669341
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,225
digitalocean.py
ansible_ansible/test/lib/ansible_test/_internal/commands/integration/cloud/digitalocean.py
"""DigitalOcean plugin for integration tests.""" from __future__ import annotations import configparser from ....util import ( display, ) from ....config import ( IntegrationConfig, ) from . import ( CloudEnvironment, CloudEnvironmentConfig, CloudProvider, ) class DigitalOceanCloudProvider(Clo...
1,497
Python
.py
40
30.8
105
0.679167
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,226
vultr.py
ansible_ansible/test/lib/ansible_test/_internal/commands/integration/cloud/vultr.py
"""Vultr plugin for integration tests.""" from __future__ import annotations import configparser from ....util import ( display, ) from ....config import ( IntegrationConfig, ) from . import ( CloudEnvironment, CloudEnvironmentConfig, CloudProvider, ) class VultrCloudProvider(CloudProvider): ...
1,488
Python
.py
40
30.575
105
0.67645
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,227
galaxy.py
ansible_ansible/test/lib/ansible_test/_internal/commands/integration/cloud/galaxy.py
"""Galaxy (ansible-galaxy) plugin for integration tests.""" from __future__ import annotations import os import tempfile from ....config import ( IntegrationConfig, ) from ....docker_util import ( docker_cp_to, docker_exec, ) from ....containers import ( run_support_container, ) from ....encoding i...
6,210
Python
.py
152
32.743421
116
0.635007
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,228
nios.py
ansible_ansible/test/lib/ansible_test/_internal/commands/integration/cloud/nios.py
"""NIOS plugin for integration tests.""" from __future__ import annotations import os from ....config import ( IntegrationConfig, ) from ....containers import ( run_support_container, ) from . import ( CloudEnvironment, CloudEnvironmentConfig, CloudProvider, ) class NiosProvider(CloudProvider)...
2,582
Python
.py
73
27.356164
96
0.628169
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,229
__init__.py
ansible_ansible/test/lib/ansible_test/_internal/commands/integration/cloud/__init__.py
"""Plugin system for cloud providers and environments for use in integration tests.""" from __future__ import annotations import abc import datetime import os import re import tempfile import time import typing as t from ....encoding import ( to_bytes, ) from ....io import ( read_text_file, ) from ....util ...
14,501
Python
.py
289
42.397924
158
0.661751
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,230
hcloud.py
ansible_ansible/test/lib/ansible_test/_internal/commands/integration/cloud/hcloud.py
"""Hetzner Cloud plugin for integration tests.""" from __future__ import annotations import configparser from ....util import ( display, ) from ....config import ( IntegrationConfig, ) from ....target import ( IntegrationTarget, ) from ....core_ci import ( AnsibleCoreCI, CloudResource, ) from ...
3,006
Python
.py
74
32.837838
104
0.653899
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,231
cs.py
ansible_ansible/test/lib/ansible_test/_internal/commands/integration/cloud/cs.py
"""CloudStack plugin for integration tests.""" from __future__ import annotations import json import configparser import os import urllib.parse import typing as t from ....util import ( ApplicationError, display, ) from ....config import ( IntegrationConfig, ) from ....docker_util import ( docker_ex...
5,027
Python
.py
128
30.148438
132
0.617096
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,232
azure.py
ansible_ansible/test/lib/ansible_test/_internal/commands/integration/cloud/azure.py
"""Azure plugin for integration tests.""" from __future__ import annotations import configparser import typing as t from ....util import ( ApplicationError, display, ) from ....config import ( IntegrationConfig, ) from ....target import ( IntegrationTarget, ) from ....core_ci import ( AnsibleCo...
5,071
Python
.py
120
34.258333
123
0.641444
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,233
httptester.py
ansible_ansible/test/lib/ansible_test/_internal/commands/integration/cloud/httptester.py
"""HTTP Tester plugin for integration tests.""" from __future__ import annotations import os from ....util import ( display, generate_password, ) from ....config import ( IntegrationConfig, ) from ....containers import ( run_support_container, ) from . import ( CloudEnvironment, CloudEnviro...
2,513
Python
.py
70
27.4
113
0.625929
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,234
__init__.py
ansible_ansible/test/lib/ansible_test/_internal/commands/units/__init__.py
"""Execute unit tests using pytest.""" from __future__ import annotations import os import sys import typing as t from ...constants import ( CONTROLLER_MIN_PYTHON_VERSION, CONTROLLER_PYTHON_VERSIONS, REMOTE_ONLY_PYTHON_VERSIONS, SUPPORTED_PYTHON_VERSIONS, ) from ...io import ( write_text_file, ...
12,845
Python
.py
257
41.883268
160
0.67488
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,235
python.py
ansible_ansible/test/lib/ansible_test/_internal/classification/python.py
"""Analyze python import statements.""" from __future__ import annotations import ast import os import re import typing as t from ..io import ( read_binary_file, ) from ..util import ( display, ApplicationError, is_subdir, ) from ..data import ( data_context, ) from ..target import ( TestTa...
13,532
Python
.py
250
44.668
159
0.639148
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,236
__init__.py
ansible_ansible/test/lib/ansible_test/_internal/classification/__init__.py
"""Classify changes in Ansible code.""" from __future__ import annotations import collections import os import re import time import typing as t from ..target import ( walk_module_targets, walk_integration_targets, walk_units_targets, walk_compile_targets, walk_sanity_targets, load_integration...
34,142
Python
.py
680
36.960294
143
0.577014
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,237
powershell.py
ansible_ansible/test/lib/ansible_test/_internal/classification/powershell.py
"""Analyze powershell import statements.""" from __future__ import annotations import os import re from ..io import ( read_text_file, ) from ..util import ( display, ) from .common import ( resolve_csharp_ps_util, ) from ..data import ( data_context, ) from ..target import ( TestTarget, ) de...
3,053
Python
.py
67
39.358209
142
0.677834
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,238
csharp.py
ansible_ansible/test/lib/ansible_test/_internal/classification/csharp.py
"""Analyze C# import statements.""" from __future__ import annotations import os import re from ..io import ( open_text_file, ) from ..util import ( display, ) from .common import ( resolve_csharp_ps_util, ) from ..data import ( data_context, ) from ..target import ( TestTarget, ) def get_cs...
3,241
Python
.py
68
40.852941
131
0.668893
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,239
common.py
ansible_ansible/test/lib/ansible_test/_internal/classification/common.py
"""Common classification code used by multiple languages.""" from __future__ import annotations import os from ..data import ( data_context, ) def resolve_csharp_ps_util(import_name: str, path: str) -> str: """Return the fully qualified name of the given import if possible, otherwise return the original imp...
894
Python
.py
19
39.736842
117
0.664747
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,240
__init__.py
ansible_ansible/test/lib/ansible_test/_internal/provider/__init__.py
"""Provider (plugin) infrastructure for ansible-test.""" from __future__ import annotations import abc import os import typing as t from ..util import ( ApplicationError, get_subclasses, ) def get_path_provider_classes(provider_type: t.Type[TPathProvider]) -> list[t.Type[TPathProvider]]: """Return a lis...
2,246
Python
.py
51
37.156863
109
0.675725
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,241
unsupported.py
ansible_ansible/test/lib/ansible_test/_internal/provider/layout/unsupported.py
"""Layout provider for an unsupported directory layout.""" from __future__ import annotations from . import ( ContentLayout, LayoutProvider, ) class UnsupportedLayout(LayoutProvider): """Layout provider for an unsupported directory layout.""" sequence = 0 # disable automatic detection @staticm...
1,240
Python
.py
35
26.228571
80
0.592654
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,242
collection.py
ansible_ansible/test/lib/ansible_test/_internal/provider/layout/collection.py
"""Layout provider for Ansible collections.""" from __future__ import annotations import os from . import ( ContentLayout, LayoutProvider, CollectionDetail, LayoutMessages, ) from ...util import ( is_valid_identifier, ) class CollectionLayout(LayoutProvider): """Layout provider for Ansible ...
6,130
Python
.py
110
46.127273
146
0.667
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,243
ansible.py
ansible_ansible/test/lib/ansible_test/_internal/provider/layout/ansible.py
"""Layout provider for Ansible source.""" from __future__ import annotations import os from . import ( ContentLayout, LayoutProvider, ) from ...util import ( ANSIBLE_SOURCE_ROOT, ANSIBLE_TEST_ROOT, ) class AnsibleLayout(LayoutProvider): """Layout provider for Ansible source.""" @staticmeth...
1,979
Python
.py
50
30.12
130
0.604797
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,244
__init__.py
ansible_ansible/test/lib/ansible_test/_internal/provider/layout/__init__.py
"""Code for finding content.""" from __future__ import annotations import abc import collections import os import typing as t from ...util import ( ANSIBLE_SOURCE_ROOT, ) from .. import ( PathProvider, ) class Layout: """Description of content locations and helper methods to access content.""" def...
7,601
Python
.py
191
31.753927
128
0.621313
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,245
unsupported.py
ansible_ansible/test/lib/ansible_test/_internal/provider/source/unsupported.py
"""Source provider to use when the layout is unsupported.""" from __future__ import annotations from . import ( SourceProvider, ) class UnsupportedSource(SourceProvider): """Source provider to use when the layout is unsupported.""" sequence = 0 # disable automatic detection @staticmethod def i...
604
Python
.py
15
35.133333
80
0.689537
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,246
git.py
ansible_ansible/test/lib/ansible_test/_internal/provider/source/git.py
"""Source provider for a content root managed by git version control.""" from __future__ import annotations import os from ...git import ( Git, ) from ...encoding import ( to_bytes, ) from ...util import ( SubprocessError, ) from . import ( SourceProvider, ) class GitSource(SourceProvider): "...
2,540
Python
.py
52
41.115385
119
0.658704
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,247
__init__.py
ansible_ansible/test/lib/ansible_test/_internal/provider/source/__init__.py
"""Common code for source providers.""" from __future__ import annotations import abc from .. import ( PathProvider, ) class SourceProvider(PathProvider): """Base class for source providers.""" @abc.abstractmethod def get_paths(self, path: str) -> list[str]: """Return the list of available ...
359
Python
.py
11
29
78
0.708455
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,248
unversioned.py
ansible_ansible/test/lib/ansible_test/_internal/provider/source/unversioned.py
"""Fallback source provider when no other provider matches the content root.""" from __future__ import annotations import os from ...constants import ( TIMEOUT_PATH, ) from ...encoding import ( to_bytes, ) from . import ( SourceProvider, ) class UnversionedSource(SourceProvider): """Fallback sourc...
2,240
Python
.py
63
25.253968
138
0.539175
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,249
installed.py
ansible_ansible/test/lib/ansible_test/_internal/provider/source/installed.py
"""Source provider for content which has been installed.""" from __future__ import annotations import os from . import ( SourceProvider, ) class InstalledSource(SourceProvider): """Source provider for content which has been installed.""" sequence = 0 # disable automatic detection @staticmethod ...
1,165
Python
.py
28
32.928571
106
0.617438
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,250
hide_unraisable.py
ansible_ansible/test/lib/ansible_test/_util/controller/sanity/pylint/plugins/hide_unraisable.py
"""Temporary plugin to prevent stdout noise pollution from finalization of abandoned generators.""" from __future__ import annotations import sys import typing as t if t.TYPE_CHECKING: from pylint.lint import PyLinter def _mask_finalizer_valueerror(ur: t.Any) -> None: """Mask only ValueErrors from finalizin...
835
Python
.py
16
48.25
99
0.763547
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,251
deprecated.py
ansible_ansible/test/lib/ansible_test/_util/controller/sanity/pylint/plugins/deprecated.py
"""Ansible specific plyint plugin for checking deprecations.""" # (c) 2018, Matt Martz <matt@sivel.net> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # -*- coding: utf-8 -*- from __future__ import annotations import datetime import re import shlex import typing as t from ...
18,008
Python
.py
366
36.374317
112
0.579758
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,252
string_format.py
ansible_ansible/test/lib/ansible_test/_util/controller/sanity/pylint/plugins/string_format.py
"""Ansible specific pylint plugin for checking format string usage.""" # (c) 2018, Matt Martz <matt@sivel.net> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # -*- coding: utf-8 -*- from __future__ import annotations import astroid # support pylint 2.x and 3.x -- remove w...
2,626
Python
.py
61
35.606557
107
0.663401
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,253
unwanted.py
ansible_ansible/test/lib/ansible_test/_util/controller/sanity/pylint/plugins/unwanted.py
"""A plugin for pylint to identify imports and functions which should not be used.""" from __future__ import annotations import os import typing as t import astroid # support pylint 2.x and 3.x -- remove when supporting only 3.x try: from pylint.interfaces import IAstroidChecker except ImportError: class IAs...
9,061
Python
.py
174
38.022989
144
0.573401
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,254
yaml_to_json.py
ansible_ansible/test/lib/ansible_test/_util/controller/sanity/integration-aliases/yaml_to_json.py
"""Read YAML from stdin and write JSON to stdout.""" from __future__ import annotations import json import sys from yaml import load try: from yaml import CSafeLoader as SafeLoader except ImportError: from yaml import SafeLoader json.dump(load(sys.stdin, Loader=SafeLoader), sys.stdout)
299
Python
.py
10
27.7
57
0.796491
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,255
yamllinter.py
ansible_ansible/test/lib/ansible_test/_util/controller/sanity/yamllint/yamllinter.py
"""Wrapper around yamllint that supports YAML embedded in Ansible modules.""" from __future__ import annotations import ast import json import os import re import sys import typing as t import yaml from yaml.resolver import Resolver from yaml.constructor import SafeConstructor from yaml.error import MarkedYAMLError f...
9,076
Python
.py
203
32.423645
133
0.563506
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,256
no-get-exception.py
ansible_ansible/test/lib/ansible_test/_util/controller/sanity/code-smell/no-get-exception.py
"""Disallow use of the get_exception function.""" from __future__ import annotations import re import sys def main(): """Main entry point.""" basic_allow_once = True for path in sys.argv[1:] or sys.stdin.read().splitlines(): with open(path, 'r', encoding='utf-8') as path_fd: for line...
947
Python
.py
20
35.75
129
0.551687
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,257
no-illegal-filenames.py
ansible_ansible/test/lib/ansible_test/_util/controller/sanity/code-smell/no-illegal-filenames.py
""" Check for illegal filenames on various operating systems. The main rules are derived from restrictions on Windows: https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file#naming-conventions """ from __future__ import annotations import os import struct import sys from ansible.module_utils.basic import...
1,757
Python
.py
69
20.898551
86
0.589606
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,258
use-compat-six.py
ansible_ansible/test/lib/ansible_test/_util/controller/sanity/code-smell/use-compat-six.py
"""Disallow importing of the six module.""" from __future__ import annotations import re import sys def main(): """Main entry point.""" for path in sys.argv[1:] or sys.stdin.read().splitlines(): with open(path, 'r', encoding='utf-8') as path_fd: for line, text in enumerate(path_fd.readlin...
631
Python
.py
15
33.466667
89
0.545902
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,259
no-assert.py
ansible_ansible/test/lib/ansible_test/_util/controller/sanity/code-smell/no-assert.py
"""Disallow use of assert.""" from __future__ import annotations import re import sys ASSERT_RE = re.compile(r'^\s*assert[^a-z0-9_:]') def main(): """Main entry point.""" for path in sys.argv[1:] or sys.stdin.read().splitlines(): with open(path, 'r', encoding='utf-8') as file: for i, lin...
684
Python
.py
17
31.529412
122
0.54697
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,260
replace-urlopen.py
ansible_ansible/test/lib/ansible_test/_util/controller/sanity/code-smell/replace-urlopen.py
"""Disallow use of the urlopen function.""" from __future__ import annotations import re import sys def main(): """Main entry point.""" for path in sys.argv[1:] or sys.stdin.read().splitlines(): with open(path, 'r', encoding='utf-8') as path_fd: for line, text in enumerate(path_fd.readlin...
624
Python
.py
15
33
103
0.547264
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,261
use-argspec-type-path.py
ansible_ansible/test/lib/ansible_test/_util/controller/sanity/code-smell/use-argspec-type-path.py
"""Disallow use of the expanduser function.""" from __future__ import annotations import re import sys def main(): """Main entry point.""" for path in sys.argv[1:] or sys.stdin.read().splitlines(): with open(path, 'r', encoding='utf-8') as path_fd: for line, text in enumerate(path_fd.read...
632
Python
.py
15
33.533333
116
0.563011
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,262
shebang.py
ansible_ansible/test/lib/ansible_test/_util/controller/sanity/code-smell/shebang.py
"""Check shebangs, execute bits and byte order marks.""" from __future__ import annotations import os import re import stat import sys def main(): """Main entry point.""" standard_shebangs = set([ b'#!/bin/bash -eu', b'#!/bin/bash -eux', b'#!/bin/sh', b'#!/usr/bin/env bash', ...
4,672
Python
.py
101
33.069307
123
0.516711
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,263
line-endings.py
ansible_ansible/test/lib/ansible_test/_util/controller/sanity/code-smell/line-endings.py
"""Require Unix line endings.""" from __future__ import annotations import sys def main(): """Main entry point.""" for path in sys.argv[1:] or sys.stdin.read().splitlines(): with open(path, 'rb') as path_fd: contents = path_fd.read() if b'\r' in contents: print('%s: u...
415
Python
.py
12
28.75
78
0.571788
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,264
changelog.py
ansible_ansible/test/lib/ansible_test/_util/controller/sanity/code-smell/changelog.py
"""Check changelog fragment naming, syntax, etc.""" from __future__ import annotations import os import sys import subprocess def main(): """Main entry point.""" paths = sys.argv[1:] or sys.stdin.read().splitlines() allowed_extensions = ('.yml', '.yaml') config_path = 'changelogs/config.yaml' #...
2,070
Python
.py
42
42.52381
140
0.662687
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,265
runtime-metadata.py
ansible_ansible/test/lib/ansible_test/_util/controller/sanity/code-smell/runtime-metadata.py
"""Schema validation of ansible-core's ansible_builtin_runtime.yml and collection's meta/runtime.yml""" from __future__ import annotations import datetime import os import re import sys from collections.abc import Sequence, Mapping from functools import partial import yaml from voluptuous import All, Any, MultipleI...
13,273
Python
.py
282
37.77305
135
0.6293
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,266
action-plugin-docs.py
ansible_ansible/test/lib/ansible_test/_util/controller/sanity/code-smell/action-plugin-docs.py
"""Test to verify action plugins have an associated module to provide documentation.""" from __future__ import annotations import os import sys def main(): """Main entry point.""" paths = sys.argv[1:] or sys.stdin.read().splitlines() module_names = set() module_prefixes = { 'lib/ansible/mod...
1,926
Python
.py
46
32.804348
137
0.602585
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,267
symlinks.py
ansible_ansible/test/lib/ansible_test/_util/controller/sanity/code-smell/symlinks.py
"""Check for unwanted symbolic links.""" from __future__ import annotations import os import sys def main(): """Main entry point.""" root_dir = os.getcwd() + os.path.sep for path in sys.argv[1:] or sys.stdin.read().splitlines(): if not os.path.islink(path.rstrip(os.path.sep)): contin...
867
Python
.py
22
31.590909
134
0.610778
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,268
empty-init.py
ansible_ansible/test/lib/ansible_test/_util/controller/sanity/code-smell/empty-init.py
"""Require empty __init__.py files.""" from __future__ import annotations import os import sys def main(): """Main entry point.""" for path in sys.argv[1:] or sys.stdin.read().splitlines(): if os.path.getsize(path) > 0: print('%s: empty __init__.py required' % path) if __name__ == '__ma...
338
Python
.py
11
26.363636
62
0.596273
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,269
no-smart-quotes.py
ansible_ansible/test/lib/ansible_test/_util/controller/sanity/code-smell/no-smart-quotes.py
"""Disallow use of Unicode quotes.""" # -*- coding: utf-8 -*- from __future__ import annotations import re import sys def main(): """Main entry point.""" for path in sys.argv[1:] or sys.stdin.read().splitlines(): with open(path, 'rb') as path_fd: for line, text in enumerate(path_fd.readli...
861
Python
.py
21
29.761905
98
0.49697
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,270
sphinx.py
ansible_ansible/test/lib/ansible_test/_util/controller/sanity/code-smell/changelog/sphinx.py
"""Block the sphinx module from being loaded.""" from __future__ import annotations raise ImportError('The sphinx module has been prevented from loading to maintain consistent test results.')
193
Python
.py
3
63
107
0.798942
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,271
validate.py
ansible_ansible/test/lib/ansible_test/_util/controller/sanity/validate-modules/validate.py
from __future__ import annotations from validate_modules.main import main if __name__ == '__main__': main()
114
Python
.py
4
26
38
0.685185
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,272
module_args.py
ansible_ansible/test/lib/ansible_test/_util/controller/sanity/validate-modules/validate_modules/module_args.py
# -*- coding: utf-8 -*- # # Copyright (C) 2016 Matt Martz <matt@sivel.net> # Copyright (C) 2016 Rackspace US, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of ...
6,422
Python
.py
130
43.053846
134
0.692468
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,273
utils.py
ansible_ansible/test/lib/ansible_test/_util/controller/sanity/validate-modules/validate_modules/utils.py
# -*- coding: utf-8 -*- # # Copyright (C) 2015 Matt Martz <matt@sivel.net> # Copyright (C) 2015 Rackspace US, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of ...
7,081
Python
.py
178
32.488764
155
0.641639
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,274
__init__.py
ansible_ansible/test/lib/ansible_test/_util/controller/sanity/validate-modules/validate_modules/__init__.py
# -*- coding: utf-8 -*- # # Copyright (C) 2015 Matt Martz <matt@sivel.net> # Copyright (C) 2015 Rackspace US, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of ...
816
Python
.py
18
44.333333
74
0.734336
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,275
schema.py
ansible_ansible/test/lib/ansible_test/_util/controller/sanity/validate-modules/validate_modules/schema.py
# -*- coding: utf-8 -*- # Copyright: (c) 2015, Matt Martz <matt@sivel.net> # Copyright: (c) 2015, Rackspace US, Inc. # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import annotations import re from ansible.module_utils.compat.version import StrictVersion ...
37,212
Python
.py
807
35.261462
142
0.590957
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,276
main.py
ansible_ansible/test/lib/ansible_test/_util/controller/sanity/validate-modules/validate_modules/main.py
# -*- coding: utf-8 -*- # # Copyright (C) 2015 Matt Martz <matt@sivel.net> # Copyright (C) 2015 Rackspace US, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of ...
115,791
Python
.py
2,347
32.647209
157
0.512503
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,277
collection_detail.py
ansible_ansible/test/lib/ansible_test/_util/controller/tools/collection_detail.py
"""Retrieve collection detail.""" from __future__ import annotations import json import os import re import sys import yaml # See semantic versioning specification (https://semver.org/) NUMERIC_IDENTIFIER = r'(?:0|[1-9][0-9]*)' ALPHANUMERIC_IDENTIFIER = r'(?:[0-9]*[a-zA-Z-][a-zA-Z0-9-]*)' PRE_RELEASE_IDENTIFIER = ...
2,995
Python
.py
66
39.227273
99
0.652878
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,278
yaml_to_json.py
ansible_ansible/test/lib/ansible_test/_util/controller/tools/yaml_to_json.py
"""Read YAML from stdin and write JSON to stdout.""" from __future__ import annotations import datetime import json import sys from yaml import load try: from yaml import CSafeLoader as SafeLoader except ImportError: from yaml import SafeLoader # unique ISO date marker matching the one present in importer.p...
725
Python
.py
18
37.222222
74
0.765043
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,279
compile.py
ansible_ansible/test/lib/ansible_test/_util/target/sanity/compile/compile.py
"""Python syntax checker with lint friendly output.""" from __future__ import annotations import sys ENCODING = 'utf-8' ERRORS = 'replace' def main(): """Main program entry point.""" for path in sys.argv[1:] or sys.stdin.read().splitlines(): compile_source(path) def compile_source(path): """Co...
1,302
Python
.py
32
35.46875
130
0.658964
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,280
importer.py
ansible_ansible/test/lib/ansible_test/_util/target/sanity/import/importer.py
"""Import the given python module(s) and report error(s) encountered.""" from __future__ import annotations def main(): """ Main program function used to isolate globals from imported code. Changes to globals in imported modules on Python 2.x will overwrite our own globals. """ import os impor...
24,873
Python
.py
445
43.835955
154
0.621078
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,281
quiet_pip.py
ansible_ansible/test/lib/ansible_test/_util/target/setup/quiet_pip.py
"""Custom entry-point for pip that filters out unwanted logging and warnings.""" from __future__ import annotations import logging import os import re import runpy import sys BUILTIN_FILTERER_FILTER = logging.Filterer.filter LOGGING_MESSAGE_FILTER = re.compile("^(" ".*Running pip ...
1,979
Python
.py
40
39.15
139
0.615784
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,282
probe_cgroups.py
ansible_ansible/test/lib/ansible_test/_util/target/setup/probe_cgroups.py
"""A tool for probing cgroups to determine write access.""" from __future__ import annotations import json import os import sys def main(): # type: () -> None """Main program entry point.""" probe_dir = sys.argv[1] paths = sys.argv[2:] results = {} for path in paths: probe_path = os.pat...
659
Python
.py
22
23.681818
63
0.596184
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,283
requirements.py
ansible_ansible/test/lib/ansible_test/_util/target/setup/requirements.py
"""A tool for installing test requirements on the controller and target host.""" from __future__ import annotations # pylint: disable=wrong-import-position import resource # Setting a low soft RLIMIT_NOFILE value will improve the performance of subprocess.Popen on Python 2.x when close_fds=True. # This will affect a...
13,698
Python
.py
277
42.833935
151
0.673535
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,284
constants.py
ansible_ansible/test/lib/ansible_test/_util/target/common/constants.py
"""Constants used by ansible-test's CLI entry point (as well as the rest of ansible-test). Imports should not be used in this file.""" # NOTE: This file resides in the _util/target directory to ensure compatibility with all supported Python versions. from __future__ import annotations REMOTE_ONLY_PYTHON_VERSIONS = (...
427
Python
.py
13
29.692308
134
0.695122
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,285
yamlcheck.py
ansible_ansible/test/lib/ansible_test/_util/target/tools/yamlcheck.py
"""Show availability of PyYAML and libyaml support.""" from __future__ import annotations import json try: import yaml except ImportError: yaml = None try: from yaml import CLoader except ImportError: CLoader = None print(json.dumps(dict( yaml=bool(yaml), cloader=bool(CLoader), )))
311
Python
.py
15
17.866667
54
0.739726
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,286
virtualenvcheck.py
ansible_ansible/test/lib/ansible_test/_util/target/tools/virtualenvcheck.py
"""Detect the real python interpreter when running in a virtual environment created by the 'virtualenv' module.""" from __future__ import annotations import json try: # virtualenv <20 from sys import real_prefix except ImportError: real_prefix = None try: # venv and virtualenv >= 20 from sys impo...
465
Python
.py
16
26.0625
114
0.750562
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,287
ansible_pytest_coverage.py
ansible_ansible/test/lib/ansible_test/_util/target/pytest/plugins/ansible_pytest_coverage.py
"""Monkey patch os._exit when running under coverage so we don't lose coverage data in forks, such as with `pytest --boxed`. PYTEST_DONT_REWRITE""" from __future__ import annotations def pytest_configure(): """Configure this pytest plugin.""" try: if pytest_configure.executed: return e...
1,998
Python
.py
52
30.173077
147
0.656104
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,288
ansible_forked.py
ansible_ansible/test/lib/ansible_test/_util/target/pytest/plugins/ansible_forked.py
"""Run each test in its own fork. PYTEST_DONT_REWRITE""" # MIT License (see licenses/MIT-license.txt or https://opensource.org/licenses/MIT) # Based on code originally from: # https://github.com/pytest-dev/pytest-forked # https://github.com/pytest-dev/py # TIP: Disable pytest-xdist when debugging internal errors in thi...
3,599
Python
.py
66
48.651515
150
0.70825
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,289
ansible_pytest_collections.py
ansible_ansible/test/lib/ansible_test/_util/target/pytest/plugins/ansible_pytest_collections.py
"""Enable unit testing of Ansible collections. PYTEST_DONT_REWRITE""" from __future__ import annotations import os # set by ansible-test to a single directory, rather than a list of directories as supported by Ansible itself ANSIBLE_COLLECTIONS_PATH = os.path.join(os.environ['ANSIBLE_COLLECTIONS_PATH'], 'ansible_coll...
4,997
Python
.py
81
54.679012
150
0.724667
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,290
python.py
ansible_ansible/test/lib/ansible_test/_util/target/injector/python.py
# auto-shebang """Provides an entry point for python scripts and python modules on the controller with the current python interpreter and optional code coverage collection.""" from __future__ import annotations import importlib.util import os import sys NETWORKING_CLI_STUB_SCRIPT = 'ansible_connection_cli_stub.py' ...
2,478
Python
.py
54
38.814815
160
0.64158
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,291
ansible_test_cli_stub.py
ansible_ansible/test/lib/ansible_test/_util/target/cli/ansible_test_cli_stub.py
#!/usr/bin/env python # PYTHON_ARGCOMPLETE_OK """Command line entry point for ansible-test.""" # NOTE: This file resides in the _util/target directory to ensure compatibility with all supported Python versions. from __future__ import annotations import os import sys def main(args=None): """Main program entry p...
1,650
Python
.py
29
51.931034
136
0.717933
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,292
pkgng.py
ansible_ansible/test/support/integration/plugins/modules/pkgng.py
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2013, bleader # Written by bleader <bleader@ratonland.org> # Based on pkgin module written by Shaun Zinck <shaun.zinck at gmail.com> # that was based on pacman module written by Afterburn <https://github.com/afterburn> # that was based on apt module written by Matthew W...
13,924
Python
.py
321
34.847352
140
0.60034
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,293
_reboot.py
ansible_ansible/test/support/windows-integration/collections/ansible_collections/ansible/windows/plugins/plugin_utils/_reboot.py
# Copyright: (c) 2021, Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) """Reboot action for Windows hosts This contains the code to reboot a Windows host for use by other action plugins in this collection. Right now it should only be used in this collection...
21,796
Python
.py
508
35.05315
122
0.657143
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,294
_quote.py
ansible_ansible/test/support/windows-integration/collections/ansible_collections/ansible/windows/plugins/plugin_utils/_quote.py
# Copyright (c) 2021 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) """Quoting helpers for Windows This contains code to help with quoting values for use in the variable Windows shell. Right now it should only be used in ansible.windows as the interface is...
4,387
Python
.py
80
49.825
161
0.700515
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,295
win_reboot.py
ansible_ansible/test/support/windows-integration/collections/ansible_collections/ansible/windows/plugins/action/win_reboot.py
# Copyright: (c) 2018, Matt Davis <mdavis@ansible.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import annotations from ansible.errors import AnsibleError from ansible.module_utils.common.text.converters import to_native from ansible.module_utils.com...
3,875
Python
.py
80
38.5875
119
0.618808
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,296
win_copy.py
ansible_ansible/test/support/windows-integration/collections/ansible_collections/ansible/windows/plugins/action/win_copy.py
# This file is part of Ansible # Copyright (c) 2017 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import annotations import base64 import json import os import os.path import shutil import tempfile import traceback import zipfile from an...
23,466
Python
.py
445
38.31236
133
0.56859
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,297
win_acl.py
ansible_ansible/test/support/windows-integration/collections/ansible_collections/ansible/windows/plugins/modules/win_acl.py
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2015, Phil Schwartz <schwartzmx@gmail.com> # Copyright: (c) 2015, Trond Hindenes # Copyright: (c) 2015, Hans-Joachim Kliemeck <git@kliemeck.de> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) ANSIBLE_METADATA = {'m...
4,112
Python
.py
124
29.048387
119
0.721357
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,298
win_shell.py
ansible_ansible/test/support/windows-integration/collections/ansible_collections/ansible/windows/plugins/modules/win_shell.py
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2016, Ansible, inc # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], 'supported_by': 'core'} DOCUMENTATIO...
5,618
Python
.py
157
31.675159
127
0.71308
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)
13,299
win_copy.py
ansible_ansible/test/support/windows-integration/collections/ansible_collections/ansible/windows/plugins/modules/win_copy.py
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2015, Jon Hawkesworth (@jhawkesworth) <figs@unity.demon.co.uk> # Copyright: (c) 2017, Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) ANSIBLE_METADATA = {'metadata_version': '1.1', ...
6,765
Python
.py
194
30.690722
151
0.705703
ansible/ansible
62,258
23,791
861
GPL-3.0
9/5/2024, 5:11:58 PM (Europe/Amsterdam)