From e7bf7b4619928da69d486f36fcb456fb201ff53e Mon Sep 17 00:00:00 2001 From: GiGaGon <107241144+MeGaGiGaGon@users.noreply.github.com> Date: Thu, 29 May 2025 14:10:29 -0700 Subject: [PATCH] Fix CI mypyc 1.16 failure (#4671) --- src/blib2to3/pgen2/parse.py | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/blib2to3/pgen2/parse.py b/src/blib2to3/pgen2/parse.py index 10202ab..36e865c 100644 --- a/src/blib2to3/pgen2/parse.py +++ b/src/blib2to3/pgen2/parse.py @@ -89,18 +89,12 @@ def backtrack(self) -> Iterator[None]: self.parser.is_backtracking = is_backtracking def add_token(self, tok_type: int, tok_val: str, raw: bool = False) -> None: - func: Callable[..., Any] - if raw: - func = self.parser._addtoken - else: - func = self.parser.addtoken - for ilabel in self.ilabels: with self.switch_to(ilabel): - args = [tok_type, tok_val, self.context] if raw: - args.insert(0, ilabel) - func(*args) + self.parser._addtoken(ilabel, tok_type, tok_val, self.context) + else: + self.parser.addtoken(tok_type, tok_val, self.context) def determine_route( self, value: Optional[str] = None, force: bool = False