Skip to content

Commit

Permalink
fixed typing bug
Browse files Browse the repository at this point in the history
  • Loading branch information
mrhaandi committed Aug 26, 2024
1 parent c5dd4dc commit 3451f3f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions clsp/enumeration.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def enumerate_term_vectors(
non_terminals: tuple[S] | list[S],
existing_terms: dict[S, set[Tree[T]]],
nt_term: Optional[tuple[S, Tree[T]]] = None,
) -> Iterable[Tree[T]]:
) -> Iterable[tuple[Tree[T], ...]]:
"""Enumerate possible term vectors for a given list of non-terminals and existing terms. Use nt_term at least once (if given)."""
if nt_term is None:
yield from itertools.product(*(existing_terms[n] for n in non_terminals))
Expand Down Expand Up @@ -142,7 +142,7 @@ def generate_new_terms(

if nt_old_term is None:
all_args = list(enumerate_term_vectors(rule.args, existing_terms, None))
all_params = [
all_params: list[tuple[Tree[T], ...]] = [
interleave(substitution)
for param_terms in enumerate_term_vectors(param_nts, existing_terms, None)
for substitution in (dict(zip(names, param_terms)),)
Expand Down

0 comments on commit 3451f3f

Please sign in to comment.