Skip to content
This repository was archived by the owner on Jan 13, 2026. It is now read-only.

Commit 1f858f6

Browse files
committed
Polish test code
1 parent 845b419 commit 1f858f6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

rewrite/tests/python/all/templating/template_test.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def f():
4848
),
4949
spec=RecipeSpec()
5050
.with_recipe(from_visitor(
51-
AddLastTemplatingVisitor(
51+
GenericTemplatingVisitor(
5252
lambda j: isinstance(j, MethodDeclaration) and len(j.body.statements) == 1,
5353
'return',
5454
coordinate_provider=lambda m: cast(MethodDeclaration, m).body.statements[0].get_coordinates().after())
@@ -72,7 +72,7 @@ def f():
7272
),
7373
spec=RecipeSpec()
7474
.with_recipe(from_visitor(
75-
AddLastTemplatingVisitor(
75+
GenericTemplatingVisitor(
7676
lambda j: isinstance(j, MethodDeclaration) and len(j.body.statements) == 1,
7777
'pass',
7878
coordinate_provider=lambda m: cast(MethodDeclaration, m).body.statements[0].get_coordinates().before())
@@ -125,7 +125,7 @@ def visit_statement(self, stmt: Statement, p: P) -> J:
125125

126126

127127
@dataclass
128-
class AddLastTemplatingVisitor(PythonVisitor[P]):
128+
class GenericTemplatingVisitor(PythonVisitor[P]):
129129
match: Callable[[J], bool]
130130
code: str
131131
coordinate_provider: Callable[[Union[Expression, Statement]], JavaCoordinates] = lambda j: j.get_coordinates().after()

0 commit comments

Comments
 (0)