Fix PEP 8 issues.

This commit is contained in:
Matt Clay 2017-04-04 12:22:47 -07:00
parent 5a0b2fe3be
commit a6ca849643
2 changed files with 2 additions and 2 deletions

View file

@ -291,8 +291,7 @@ def ports_expand(ports):
if not isinstance(port, str): if not isinstance(port, str):
ports_expanded.append((port,) * 2) ports_expanded.append((port,) * 2)
elif '-' in port: elif '-' in port:
ports_expanded.append(tuple(p.strip() for p in ports_expanded.append(tuple(p.strip() for p in port.split('-', 1)))
port.split('-', 1)))
else: else:
ports_expanded.append((port.strip(),) * 2) ports_expanded.append((port.strip(),) * 2)

View file

@ -10,6 +10,7 @@ REPLACEMENTS = [
('thismoduledoesnotexist', 'thismoduledoesnotexist_module'), # the default ('thismoduledoesnotexist', 'thismoduledoesnotexist_module'), # the default
] ]
@pytest.mark.parametrize("replacement", REPLACEMENTS, ids=lambda x: x[0]) @pytest.mark.parametrize("replacement", REPLACEMENTS, ids=lambda x: x[0])
def test_apache_identifier(replacement): def test_apache_identifier(replacement):
"test the correct replacement of an a2enmod name with an apache2ctl name" "test the correct replacement of an a2enmod name with an apache2ctl name"