Fix ansible-test type hints.

pull/27449/merge
Matt Clay 7 years ago
parent 0a2cdb2585
commit f6d7fc548e

@ -841,7 +841,7 @@ def compile_version(args, python_version, include, exclude):
:type args: CompileConfig :type args: CompileConfig
:type python_version: str :type python_version: str
:type include: tuple[CompletionTarget] :type include: tuple[CompletionTarget]
:param exclude: tuple[CompletionTarget] :type exclude: tuple[CompletionTarget]
:rtype: TestResult :rtype: TestResult
""" """
command = 'compile' command = 'compile'

@ -79,8 +79,8 @@ class Git(object):
def run_git_split(self, cmd, separator=None, str_errors='strict'): def run_git_split(self, cmd, separator=None, str_errors='strict'):
""" """
:type cmd: list[str] :type cmd: list[str]
:param separator: str | None :type separator: str | None
:type str_errors: 'strict' | 'replace' :type str_errors: str
:rtype: list[str] :rtype: list[str]
""" """
output = self.run_git(cmd, str_errors=str_errors).strip(separator) output = self.run_git(cmd, str_errors=str_errors).strip(separator)
@ -93,7 +93,7 @@ class Git(object):
def run_git(self, cmd, str_errors='strict'): def run_git(self, cmd, str_errors='strict'):
""" """
:type cmd: list[str] :type cmd: list[str]
:type str_errors: 'strict' | 'replace' :type str_errors: str
:rtype: str :rtype: str
""" """
return run_command(self.args, [self.git] + cmd, capture=True, always=True, str_errors=str_errors)[0] return run_command(self.args, [self.git] + cmd, capture=True, always=True, str_errors=str_errors)[0]

@ -312,7 +312,7 @@ def walk_test_targets(path=None, module_path=None, extensions=None, prefix=None)
def analyze_integration_target_dependencies(integration_targets): def analyze_integration_target_dependencies(integration_targets):
""" """
:type: list[IntegrationTarget] :type integration_targets: list[IntegrationTarget]
:rtype: dict[str,set[str]] :rtype: dict[str,set[str]]
""" """
hidden_role_target_names = set(t.name for t in integration_targets if t.type == 'role' and 'hidden/' in t.aliases) hidden_role_target_names = set(t.name for t in integration_targets if t.type == 'role' and 'hidden/' in t.aliases)

@ -93,7 +93,7 @@ def run_command(args, cmd, capture=False, env=None, data=None, cwd=None, always=
:type stdin: file | None :type stdin: file | None
:type stdout: file | None :type stdout: file | None
:type cmd_verbosity: int :type cmd_verbosity: int
:type str_errors: 'strict' | 'replace' :type str_errors: str
:rtype: str | None, str | None :rtype: str | None, str | None
""" """
explain = args.explain and not always explain = args.explain and not always
@ -113,7 +113,7 @@ def raw_command(cmd, capture=False, env=None, data=None, cwd=None, explain=False
:type stdin: file | None :type stdin: file | None
:type stdout: file | None :type stdout: file | None
:type cmd_verbosity: int :type cmd_verbosity: int
:type str_errors: 'strict' | 'replace' :type str_errors: str
:rtype: str | None, str | None :rtype: str | None, str | None
""" """
if not cwd: if not cwd:

Loading…
Cancel
Save