From 38f9ee5673a813e678144578ac3332e2b2bb1432 Mon Sep 17 00:00:00 2001 From: Jouramie Date: Wed, 6 Mar 2024 00:30:01 -0500 Subject: [PATCH] wow I'm so tired I just changed the method name without changing what it actually does... --- Utils.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Utils.py b/Utils.py index 01cf2058fa..0a294e7c7a 100644 --- a/Utils.py +++ b/Utils.py @@ -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)