Skip to content

Commit

Permalink
Fix annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
sobolevn committed Aug 25, 2023
1 parent 0687918 commit 7442ff3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Tools/peg_generator/pegen/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def logger(method: F) -> F:
"""
method_name = method.__name__

def logger_wrapper(self: Parser, *args: object) -> Any:
def logger_wrapper(self: "Parser", *args: object) -> Any:
if not self._verbose:
return method(self, *args)
argsr = ",".join(repr(arg) for arg in args)
Expand All @@ -40,7 +40,7 @@ def memoize(method: F) -> F:
"""Memoize a symbol method."""
method_name = method.__name__

def memoize_wrapper(self: Parser, *args: object) -> Any:
def memoize_wrapper(self: "Parser", *args: object) -> Any:
mark = self._mark()
key = mark, method_name, args
# Fast path: cache hit, and not verbose.
Expand Down Expand Up @@ -79,7 +79,7 @@ def memoize_left_rec(
"""Memoize a left-recursive symbol method."""
method_name = method.__name__

def memoize_left_rec_wrapper(self: Parser) -> Optional[T]:
def memoize_left_rec_wrapper(self: "Parser") -> Optional[T]:
mark = self._mark()
key = mark, method_name, ()
# Fast path: cache hit, and not verbose.
Expand Down

0 comments on commit 7442ff3

Please sign in to comment.