From 1ca39d4c015db9607008cdc2eb7bba5b4921d501 Mon Sep 17 00:00:00 2001 From: Erez Shinan Date: Sun, 30 Jun 2024 15:47:23 +0200 Subject: [PATCH] Fix types --- lark/parsers/grammar_analysis.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lark/parsers/grammar_analysis.py b/lark/parsers/grammar_analysis.py index 4386588c..28d3cb63 100644 --- a/lark/parsers/grammar_analysis.py +++ b/lark/parsers/grammar_analysis.py @@ -177,13 +177,13 @@ def __init__(self, parser_conf: ParserConf, debug: bool=False, strict: bool=Fals self.FIRST, self.FOLLOW, self.NULLABLE = calculate_sets(rules) - def expand_rule(self, source_rule: NonTerminal, rules_by_origin=None) -> State: + def expand_rule(self, source_rule: NonTerminal, rules_by_origin=None) -> OrderedSet[RulePtr]: "Returns all init_ptrs accessible by rule (recursive)" if rules_by_origin is None: rules_by_origin = self.rules_by_origin - init_ptrs = OrderedSet() + init_ptrs = OrderedSet[RulePtr]() def _expand_rule(rule: NonTerminal) -> Iterator[NonTerminal]: assert not rule.is_term, rule