From 961ac03ad9e11944cefea1b725135fa3578b490d Mon Sep 17 00:00:00 2001 From: Jouramie Date: Wed, 6 Mar 2024 00:12:52 -0500 Subject: [PATCH] typegard for iterable of any --- Utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Utils.py b/Utils.py index d47e6f8ff4..01cf2058fa 100644 --- a/Utils.py +++ b/Utils.py @@ -969,7 +969,7 @@ class RepeatableChain: return sum(len(iterable) for iterable in self.iterable) -def is_iterable_but_str(obj: object) -> TypeGuard[typing.Iterable[str]]: +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