mirror of
https://github.com/PyCQA/flake8.git
synced 2026-03-30 10:46:54 +00:00
utils: Assert desired contract for parse_comma_separated_list()
This is a separate commit so it can be dropped during a rebase or reverted independently.
This commit is contained in:
parent
862b17d229
commit
9fbaf2d2ea
1 changed files with 4 additions and 0 deletions
|
|
@ -39,6 +39,10 @@ def parse_comma_separated_list(value, regexp=COMMA_SEPARATED_LIST_RE):
|
|||
:rtype:
|
||||
list
|
||||
"""
|
||||
assert isinstance( # nosec (for bandit)
|
||||
value, (string_types, type(None))
|
||||
), value
|
||||
|
||||
if not value:
|
||||
return []
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue