summaryrefslogtreecommitdiff
path: root/test/lib/ansible_test/_internal/provider/layout/collection.py
diff options
context:
space:
mode:
authorMatt Clay <matt@mystile.com>2023-02-13 10:49:58 -0800
committerGitHub <noreply@github.com>2023-02-13 10:49:58 -0800
commit715ab99462b1799f4a0c1caeddf161e930adf13f (patch)
treee4c74ab28613ac1cadecac189ac6ec4da51af067 /test/lib/ansible_test/_internal/provider/layout/collection.py
parent43487c6581caf0e0f3988d156d15b2ff6df129d3 (diff)
downloadansible-715ab99462b1799f4a0c1caeddf161e930adf13f.tar.gz
ansible-test - Improve code formatting (#79983)
* ansible-test - Add blank lines after docstrings * ansible-test - Preserve formatting of arg pairs * ansible-test - Remove unused string * ansible-test - Remove pointless dict() usage * ansible-test - Clean up initial func arg indenting * ansible-test - Clean up constructor arg indenting * ansible-test - Clean up func arg wrapping * ansible-test - Clean up comma and paren placement
Diffstat (limited to 'test/lib/ansible_test/_internal/provider/layout/collection.py')
-rw-r--r--test/lib/ansible_test/_internal/provider/layout/collection.py46
1 files changed, 24 insertions, 22 deletions
diff --git a/test/lib/ansible_test/_internal/provider/layout/collection.py b/test/lib/ansible_test/_internal/provider/layout/collection.py
index 299d0bc6df..d747f31f31 100644
--- a/test/lib/ansible_test/_internal/provider/layout/collection.py
+++ b/test/lib/ansible_test/_internal/provider/layout/collection.py
@@ -17,6 +17,7 @@ from ...util import (
class CollectionLayout(LayoutProvider):
"""Layout provider for Ansible collections."""
+
@staticmethod
def is_content_root(path: str) -> bool:
"""Return True if the given path is a content root for this provider."""
@@ -52,28 +53,29 @@ class CollectionLayout(LayoutProvider):
integration_targets_path = self.__check_integration_path(paths, integration_messages)
self.__check_unit_path(paths, unit_messages)
- return ContentLayout(root,
- paths,
- plugin_paths=plugin_paths,
- collection=CollectionDetail(
- name=collection_name,
- namespace=collection_namespace,
- root=collection_root,
- ),
- test_path='tests',
- results_path='tests/output',
- sanity_path='tests/sanity',
- sanity_messages=sanity_messages,
- integration_path='tests/integration',
- integration_targets_path=integration_targets_path.rstrip(os.path.sep),
- integration_vars_path='tests/integration/integration_config.yml',
- integration_messages=integration_messages,
- unit_path='tests/unit',
- unit_module_path='tests/unit/plugins/modules',
- unit_module_utils_path='tests/unit/plugins/module_utils',
- unit_messages=unit_messages,
- unsupported=not (is_valid_identifier(collection_namespace) and is_valid_identifier(collection_name)),
- )
+ return ContentLayout(
+ root,
+ paths,
+ plugin_paths=plugin_paths,
+ collection=CollectionDetail(
+ name=collection_name,
+ namespace=collection_namespace,
+ root=collection_root,
+ ),
+ test_path='tests',
+ results_path='tests/output',
+ sanity_path='tests/sanity',
+ sanity_messages=sanity_messages,
+ integration_path='tests/integration',
+ integration_targets_path=integration_targets_path.rstrip(os.path.sep),
+ integration_vars_path='tests/integration/integration_config.yml',
+ integration_messages=integration_messages,
+ unit_path='tests/unit',
+ unit_module_path='tests/unit/plugins/modules',
+ unit_module_utils_path='tests/unit/plugins/module_utils',
+ unit_messages=unit_messages,
+ unsupported=not (is_valid_identifier(collection_namespace) and is_valid_identifier(collection_name)),
+ )
@staticmethod
def __check_test_path(paths: list[str], messages: LayoutMessages) -> None: