Skip to content

Commit 4efe64a

Browse files
gh-125811: Remove DeprecationWarnings in test_peg_generator (#125812)
1 parent 03f9264 commit 4efe64a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Lib/test/test_peg_generator/test_pegen.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,7 @@ def test_left_recursive(self) -> None:
484484

485485
def test_python_expr(self) -> None:
486486
grammar = """
487-
start: expr NEWLINE? $ { ast.Expression(expr, lineno=1, col_offset=0) }
487+
start: expr NEWLINE? $ { ast.Expression(expr) }
488488
expr: ( expr '+' term { ast.BinOp(expr, ast.Add(), term, lineno=expr.lineno, col_offset=expr.col_offset, end_lineno=term.end_lineno, end_col_offset=term.end_col_offset) }
489489
| expr '-' term { ast.BinOp(expr, ast.Sub(), term, lineno=expr.lineno, col_offset=expr.col_offset, end_lineno=term.end_lineno, end_col_offset=term.end_col_offset) }
490490
| term { term }
@@ -893,7 +893,7 @@ def test_unreachable_implicit3(self) -> None:
893893

894894
def test_locations_in_alt_action_and_group(self) -> None:
895895
grammar = """
896-
start: t=term NEWLINE? $ { ast.Expression(t, LOCATIONS) }
896+
start: t=term NEWLINE? $ { ast.Expression(t) }
897897
term:
898898
| l=term '*' r=factor { ast.BinOp(l, ast.Mult(), r, LOCATIONS) }
899899
| l=term '/' r=factor { ast.BinOp(l, ast.Div(), r, LOCATIONS) }

0 commit comments

Comments
 (0)