summaryrefslogtreecommitdiff
path: root/test/lib/ansible_test/_internal/cli/parsers/value_parsers.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/lib/ansible_test/_internal/cli/parsers/value_parsers.py')
-rw-r--r--test/lib/ansible_test/_internal/cli/parsers/value_parsers.py16
1 files changed, 10 insertions, 6 deletions
diff --git a/test/lib/ansible_test/_internal/cli/parsers/value_parsers.py b/test/lib/ansible_test/_internal/cli/parsers/value_parsers.py
index 9453b76098..f416281e04 100644
--- a/test/lib/ansible_test/_internal/cli/parsers/value_parsers.py
+++ b/test/lib/ansible_test/_internal/cli/parsers/value_parsers.py
@@ -60,12 +60,14 @@ class PythonParser(Parser):
Known docker/remote environments limit the available Python versions to configured values known to be valid.
The origin host and unknown environments assume all relevant Python versions are available.
"""
- def __init__(self,
- versions: c.Sequence[str],
- *,
- allow_default: bool,
- allow_venv: bool,
- ):
+
+ def __init__(
+ self,
+ versions: c.Sequence[str],
+ *,
+ allow_default: bool,
+ allow_venv: bool,
+ ):
version_choices = list(versions)
if allow_default:
@@ -134,6 +136,7 @@ class PythonParser(Parser):
class PlatformParser(ChoicesParser):
"""Composite argument parser for "{platform}/{version}" formatted choices."""
+
def __init__(self, choices: list[str]) -> None:
super().__init__(choices, conditions=MatchConditions.CHOICE | MatchConditions.ANY)
@@ -152,6 +155,7 @@ class SshConnectionParser(Parser):
Composite argument parser for connecting to a host using SSH.
Format: user@host[:port]
"""
+
EXPECTED_FORMAT = '{user}@{host}[:{port}]'
def parse(self, state: ParserState) -> t.Any: