Skip to content

Commit 5a0f305

Browse files
committed
Address review
1 parent 1c488b0 commit 5a0f305

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

mypy/config_parser.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,10 @@ def try_split(v: str | Sequence[str], split_regex: str = "[,]") -> list[str]:
5656
"""Split and trim a str or list of str into a list of str"""
5757
if isinstance(v, str):
5858
items = [p.strip() for p in re.split(split_regex, v)]
59-
else:
60-
items = [p.strip() for p in v]
61-
if items and items[-1] == "":
62-
items.pop(-1)
63-
return items
59+
if items and items[-1] == "":
60+
items.pop(-1)
61+
return items
62+
return [p.strip() for p in v]
6463

6564

6665
def validate_codes(codes: list[str]) -> list[str]:

0 commit comments

Comments
 (0)