We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7670262 commit c0b2a7fCopy full SHA for c0b2a7f
pandas/core/common.py
@@ -9,7 +9,7 @@
9
from datetime import datetime, timedelta
10
from functools import partial
11
import inspect
12
-from typing import Any, Iterable, Union
+from typing import Any, Iterable, TypeVar, Union
13
14
import numpy as np
15
@@ -270,7 +270,10 @@ def maybe_make_list(obj):
270
return obj
271
272
273
-def maybe_iterable_to_list(obj: Union[Iterable, Any]) -> Union[list, Any]:
+_T = TypeVar("_T")
274
+
275
276
+def maybe_iterable_to_list(obj: Union[Iterable[_T], _T]) -> Union[Iterable[_T], _T]:
277
"""
278
If obj is Iterable but not list-like, consume into list.
279
0 commit comments