X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/0f26a0369efc7305a1a0120355f78d85b3030e56..a07871b9cd1b5a1469271be6aaac5766f5a0e0fc:/src/blib2to3/pgen2/parse.py diff --git a/src/blib2to3/pgen2/parse.py b/src/blib2to3/pgen2/parse.py index 4a23d53..c462f63 100644 --- a/src/blib2to3/pgen2/parse.py +++ b/src/blib2to3/pgen2/parse.py @@ -32,7 +32,7 @@ from blib2to3.pgen2.grammar import Grammar from blib2to3.pytree import convert, NL, Context, RawNode, Leaf, Node if TYPE_CHECKING: - from blib2to3.driver import TokenProxy + from blib2to3.pgen2.driver import TokenProxy Results = Dict[Text, NL] @@ -54,7 +54,7 @@ def stack_copy( stack: List[Tuple[DFAS, int, RawNode]] ) -> List[Tuple[DFAS, int, RawNode]]: """Nodeless stack copy.""" - return [(copy.deepcopy(dfa), label, DUMMY_NODE) for dfa, label, _ in stack] + return [(dfa, label, DUMMY_NODE) for dfa, label, _ in stack] class Recorder: @@ -114,7 +114,7 @@ class Recorder: args.insert(0, ilabel) func(*args) - def determine_route(self, value: Text = None, force: bool = False) -> Optional[int]: + def determine_route(self, value: Optional[Text] = None, force: bool = False) -> Optional[int]: alive_ilabels = self.ilabels if len(alive_ilabels) == 0: *_, most_successful_ilabel = self._dead_ilabels