Skip to content

Commit

Permalink
Changed requirement for literal repos from Sequence to Iterable
Browse files Browse the repository at this point in the history
  • Loading branch information
christofsteel committed Dec 11, 2024
1 parent a81c062 commit 8db811e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions clsp/fcl.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__")


Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit 8db811e

Please sign in to comment.