mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-06-10 18:29:11 -07:00
Consider module_utils deps when running tests. (#21382)
* Skip pep8 analysis when --explain is used. * Fix return type annotations. * Match line length requirement of PEP 8 config. * Consider module_utils deps when running tests.
This commit is contained in:
parent
f2729f11c3
commit
d54bc09fae
6 changed files with 229 additions and 37 deletions
|
@ -165,7 +165,7 @@ def generate_egg_info(args):
|
|||
def generate_pip_install(command):
|
||||
"""
|
||||
:type command: str
|
||||
:return: list[str] | None
|
||||
:rtype: list[str] | None
|
||||
"""
|
||||
constraints = 'test/runner/requirements/constraints.txt'
|
||||
requirements = 'test/runner/requirements/%s.txt' % command
|
||||
|
@ -861,6 +861,9 @@ def command_sanity_pep8(args, targets):
|
|||
if stderr:
|
||||
raise SubprocessError(cmd=cmd, status=status, stderr=stderr)
|
||||
|
||||
if args.explain:
|
||||
return
|
||||
|
||||
pattern = '^(?P<path>[^:]*):(?P<line>[0-9]+):(?P<column>[0-9]+): (?P<code>[A-Z0-9]{4}) (?P<message>.*)$'
|
||||
|
||||
results = [re.search(pattern, line).groupdict() for line in stdout.splitlines()]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue