From 41bbfee80b3f695d955374e714df93388f0643bb Mon Sep 17 00:00:00 2001 From: Jan Petykiewicz Date: Wed, 12 Nov 2025 23:34:11 -0800 Subject: [PATCH] fixup! [AutoTool] Use more dataclasses to clarify internal code --- masque/builder/tools.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/masque/builder/tools.py b/masque/builder/tools.py index 7d8b181..9b0b3c8 100644 --- a/masque/builder/tools.py +++ b/masque/builder/tools.py @@ -473,8 +473,8 @@ class AutoTool(Tool, metaclass=ABCMeta): class Transition: """ Description of a pre-rendered transition """ abstract: Abstract - our_port_name: str their_port_name: str + our_port_name: str @property def our_port(self) -> Port: @@ -511,7 +511,7 @@ class AutoTool(Tool, metaclass=ABCMeta): """ Default value for out_ptype """ def add_complementary_transitions(self) -> Self: - for iioo in self.transitions: + for iioo in list(self.transitions.keys()): ooii = (iioo[1], iioo[0]) self.transitions.setdefault(ooii, self.transitions[iioo].reversed()) return self @@ -535,6 +535,8 @@ class AutoTool(Tool, metaclass=ABCMeta): tree, pat = Library.mktree(SINGLE_USE_PREFIX + 'path') pat.add_port_pair(names=port_names, ptype='unk' if in_ptype is None else in_ptype) + if data.in_transition: + pat.plug(data.in_transition.abstract, {port_names[1]: data.in_transition.their_port_name}) if not numpy.isclose(data.straight_length, 0): straight_pat_or_tree = data.straight.fn(data.straight_length, **kwargs) if isinstance(straight_pat_or_tree, Pattern):