From 53e888d397ede68d5121270e8c4576a5242bba26 Mon Sep 17 00:00:00 2001 From: Joel Flores Date: Mon, 23 Jun 2025 10:56:15 -0500 Subject: [PATCH] format --- .../control_flow_reconstruction/templates/Generator.py | 2 ++ pylingual/control_flow_reconstruction/templates/With.py | 7 ++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/pylingual/control_flow_reconstruction/templates/Generator.py b/pylingual/control_flow_reconstruction/templates/Generator.py index c7d21fe..87be641 100644 --- a/pylingual/control_flow_reconstruction/templates/Generator.py +++ b/pylingual/control_flow_reconstruction/templates/Generator.py @@ -19,6 +19,7 @@ class Await3_12(ControlFlowTemplate): to_indented_source = defer_source_to("awaited") + @register_template(0, 0) class AwaitWith3_12(ControlFlowTemplate): template = T( @@ -33,6 +34,7 @@ class AwaitWith3_12(ControlFlowTemplate): to_indented_source = defer_source_to("awaited") + @register_template(0, 0) class Generator3_12(ControlFlowTemplate): template = T( diff --git a/pylingual/control_flow_reconstruction/templates/With.py b/pylingual/control_flow_reconstruction/templates/With.py index 091327a..55904b5 100644 --- a/pylingual/control_flow_reconstruction/templates/With.py +++ b/pylingual/control_flow_reconstruction/templates/With.py @@ -2,6 +2,7 @@ from typing import override from ..cft import ControlFlowTemplate, EdgeKind, register_template from ..utils import T, N, exact_instructions, starting_instructions, to_indented_source, make_try_match, versions_from + class WithCleanup3_11(ControlFlowTemplate): template = T( start=N("reraise", "poptop", "exc").with_cond( @@ -22,6 +23,7 @@ class WithCleanup3_11(ControlFlowTemplate): {pop_exc} """ + @register_template(0, 10, (3, 11), (3, 12), (3, 13)) class With3_11(ControlFlowTemplate): template = T( @@ -42,6 +44,7 @@ class With3_11(ControlFlowTemplate): {exc_cleanup} """ + class WithCleanup3_9(ControlFlowTemplate): template = T( start=~N("reraise", "poptop").with_cond( @@ -60,6 +63,7 @@ class WithCleanup3_9(ControlFlowTemplate): {poptop} """ + @register_template(0, 10, (3, 9), (3, 10)) class With3_9(ControlFlowTemplate): template = T( @@ -79,6 +83,7 @@ class With3_9(ControlFlowTemplate): {exc_cleanup} """ + @register_template(0, 10, (3, 6), (3, 7), (3, 8)) class With3_6(ControlFlowTemplate): template = T( @@ -95,4 +100,4 @@ class With3_6(ControlFlowTemplate): """ {setup_with} {with_body} - """ \ No newline at end of file + """