From 8db811e5eed37e5609177549893e7abeda0f34d5 Mon Sep 17 00:00:00 2001 From: Christoph Stahl Date: Wed, 11 Dec 2024 13:31:57 +0100 Subject: [PATCH] Changed requirement for literal repos from Sequence to Iterable --- clsp/fcl.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/clsp/fcl.py b/clsp/fcl.py index 7ffa31e..214c7aa 100644 --- a/clsp/fcl.py +++ b/clsp/fcl.py @@ -46,10 +46,10 @@ class Contains(Protocol): def __contains__(self, value: object) -> bool: ... -LiteralRepo = Mapping[str, Sequence[Any] | Contains] +LiteralRepo = Mapping[str, Iterable[Any] | Contains] -def isiterable(literal_group: Sequence[C] | Contains) -> TypeGuard[Sequence[C]]: +def isiterable(literal_group: Iterable[C] | Contains) -> TypeGuard[Iterable[C]]: return hasattr(literal_group, "__iter__") @@ -264,7 +264,7 @@ def _instantiate( ) ) else: - group: Sequence[Any] | Contains = literals[literal_parameter.group] + group: Iterable[Any] | Contains = literals[literal_parameter.group] if isiterable(group): substitutions = deque( filter(