wow I'm so tired I just changed the method name without changing what it actually does...

This commit is contained in:
Jouramie
2024-03-06 00:30:01 -05:00
committed by jouramie
parent 961ac03ad9
commit 38f9ee5673
+1 -4
View File
@@ -973,7 +973,4 @@ def is_iterable_but_str(obj: object) -> TypeGuard[typing.Iterable[typing.Any]]:
""" but not a `str` (because technically, `str` is `Iterable[str]`) """
if isinstance(obj, str):
return False
if not isinstance(obj, typing.Iterable):
return False
obj_it: typing.Iterable[object] = obj
return all(isinstance(v, str) for v in obj_it)
return isinstance(obj, typing.Iterable)