gh-138281: Run ruff on Tools/peg_generator (#138282)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
This commit is contained in:
sobolevn 2025-09-03 20:45:29 +03:00 committed by GitHub
parent 424e2ab95a
commit 0d1f4e1639
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
16 changed files with 250 additions and 236 deletions

View file

@ -1,6 +1,7 @@
import argparse
import sys
from typing import Any, Callable, Iterator
from collections.abc import Callable, Iterator
from typing import Any
from pegen.build import build_parser
from pegen.grammar import Grammar, Rule
@ -52,7 +53,7 @@ def main() -> None:
try:
grammar, parser, tokenizer = build_parser(args.filename)
except Exception as err:
print("ERROR: Failed to parse grammar file", file=sys.stderr)
print("ERROR: Failed to parse grammar file", err, file=sys.stderr)
sys.exit(1)
visitor = ASTGrammarPrinter()