fix: split_strip() arg must be str

This commit is contained in:
relikd
2022-08-06 17:45:38 +02:00
parent e67489ab0b
commit 5387256b93
2 changed files with 4 additions and 2 deletions

View File

@@ -32,7 +32,7 @@ def most_used_key(keys: List[str]) -> str:
def split_strip(data: str, delimiter: str = ',') -> List[str]:
''' Split by delimiter and strip each str separately. Omit if empty. '''
ret = []
for x in (data or '').split(delimiter):
for x in data.split(delimiter):
x = x.strip()
if x:
ret.append(x)