fixup! [Pather / RenderPather] move common functionality into PatherMixin; redo hierarchy

This commit is contained in:
Jan Petykiewicz 2025-11-11 20:52:33 -08:00
parent 701c297152
commit 69e6b1bff1

View File

@ -203,7 +203,6 @@ class PatherMixin(metaclass=ABCMeta):
portspec_src: str, portspec_src: str,
portspec_dst: str, portspec_dst: str,
*, *,
tool_port_names: tuple[str, str] = ('A', 'B'),
out_ptype: str | None = None, out_ptype: str | None = None,
plug_destination: bool = True, plug_destination: bool = True,
**kwargs, **kwargs,
@ -226,9 +225,6 @@ class PatherMixin(metaclass=ABCMeta):
Args: Args:
portspec_src: The name of the starting port into which the wire will be plugged. portspec_src: The name of the starting port into which the wire will be plugged.
portspec_dst: The name of the destination port. portspec_dst: The name of the destination port.
tool_port_names: The names of the ports on the generated pattern. It is unlikely
that you will need to change these. The first port is the input (to be
connected to `portspec`).
out_ptype: Passed to the pathing tool in order to specify the desired port type out_ptype: Passed to the pathing tool in order to specify the desired port type
to be generated at the destination end. If `None` (default), the destination to be generated at the destination end. If `None` (default), the destination
port's `ptype` will be used. port's `ptype` will be used.
@ -284,7 +280,7 @@ class PatherMixin(metaclass=ABCMeta):
if plug_destination: if plug_destination:
dst_extra_args['plug_into'] = portspec_dst dst_extra_args['plug_into'] = portspec_dst
src_args = {**kwargs, 'tool_port_names': tool_port_names} src_args = {**kwargs}
dst_args = {**src_args, **dst_extra_args} dst_args = {**src_args, **dst_extra_args}
if src_is_horizontal and not dst_is_horizontal: if src_is_horizontal and not dst_is_horizontal:
# single bend should suffice # single bend should suffice