mirror of
https://github.com/python/cpython.git
synced 2025-12-08 06:10:17 +00:00
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:
parent
424e2ab95a
commit
0d1f4e1639
16 changed files with 250 additions and 236 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue