masque/masque/builder/tools.py

25 lines
626 B
Python
Raw Normal View History

"""
Tools are objects which dynamically generate simple single-use devices (e.g. wires or waveguides)
"""
2023-02-23 13:15:32 -08:00
from typing import TYPE_CHECKING, Sequence
2023-01-25 23:19:25 -08:00
from ..utils import SupportsBool
if TYPE_CHECKING:
2023-01-21 23:38:53 -08:00
from ..pattern import Pattern
class Tool:
def path(
self,
2023-02-23 13:15:32 -08:00
ccw: SupportsBool | None,
length: float,
*,
2023-02-23 13:15:32 -08:00
in_ptype: str | None = None,
out_ptype: str | None = None,
port_names: Sequence[str] = ('A', 'B'),
**kwargs,
2023-01-21 23:38:53 -08:00
) -> 'Pattern':
raise NotImplementedError(f'path() not implemented for {type(self)}')