mirror of
https://github.com/PyCQA/flake8.git
synced 2026-04-05 04:36:52 +00:00
utils: Change parse_comma_separated_list() contract
This is the initial incision point to only accept `str` (or `None`) for parsing out comma/whitespace/regexp separated values.
This commit is contained in:
parent
9fbaf2d2ea
commit
9283f2f03f
3 changed files with 6 additions and 18 deletions
|
|
@ -22,11 +22,6 @@ RELATIVE_PATHS = ["flake8", "pep8", "pyflakes", "mccabe"]
|
|||
("E123,W234,,E206,,", ["E123", "W234", "E206"]),
|
||||
("E123, W234,, E206,,", ["E123", "W234", "E206"]),
|
||||
("E123,,W234,,E206,,", ["E123", "W234", "E206"]),
|
||||
(["E123", "W234", "E206"], ["E123", "W234", "E206"]),
|
||||
(["E123", "\n\tW234", "\n E206"], ["E123", "W234", "E206"]),
|
||||
(["E123", "\n\tW234", "\n E206", "\n"], ["E123", "W234", "E206"]),
|
||||
(["E123", "\n\tW234", "", "\n E206", "\n"], ["E123", "W234", "E206"]),
|
||||
(["E123", "\n\tW234", "", "\n 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