Skip to content

Commit 10cbd94

Browse files
committed
[EN-1328] redundant var removed
1 parent 935be03 commit 10cbd94

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

dxfeed/wrappers/class_utils.py

+4-7
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,11 @@ def to_iterable(value: Union[str, Iterable[str]]) -> Iterable[str]:
1818
-------
1919
: iterable
2020
"""
21-
if isinstance(value, collections.abc.Iterable):
22-
if isinstance(value, str):
23-
res = [value]
24-
else:
25-
res = value
26-
else:
21+
if isinstance(value, str):
22+
value = [value]
23+
if not isinstance(value, collections.abc.Iterable):
2724
raise TypeError(f'Expected string or iterable type, got {type(value)}')
28-
return res
25+
return value
2926

3027

3128
def handle_datetime(date_time: Union[str, datetime], fmt: str = '%Y-%m-%d %H:%M:%S.%f'):

0 commit comments

Comments
 (0)