mirror of
https://github.com/PyCQA/flake8.git
synced 2026-04-06 13:06:53 +00:00
utils: Tighten parse_comma_separated_list() contract further
Now that callers are ensuring that `value` is not `None`, we can further tighten the contract and remove the conditional to account when `None` is passed-in for `value`. Additionally, add a new test vector to account for when an empty string is passed in, which would fail `if no value`.
This commit is contained in:
parent
f01011a403
commit
1757bce321
2 changed files with 2 additions and 4 deletions
|
|
@ -22,6 +22,7 @@ RELATIVE_PATHS = ["flake8", "pep8", "pyflakes", "mccabe"]
|
|||
("E123,W234,,E206,,", ["E123", "W234", "E206"]),
|
||||
("E123, W234,, E206,,", ["E123", "W234", "E206"]),
|
||||
("E123,,W234,,E206,,", ["E123", "W234", "E206"]),
|
||||
("", []),
|
||||
])
|
||||
def test_parse_comma_separated_list(value, expected):
|
||||
"""Verify that similar inputs produce identical outputs."""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue