Force use of keyword args on most constructors

Jan Petykiewicz 4 years ago
parent cb02a7839e
commit 89f758fdf9

@ -40,6 +40,7 @@ class Label(PositionableImpl, LayerableImpl, LockableImpl, RepeatableImpl, Annot
def __init__(self,
string: str,
*,
offset: vector2 = (0.0, 0.0),
layer: layer_t = 0,
repetition: Optional[Repetition] = None,

@ -50,6 +50,7 @@ class Pattern(LockableImpl, AnnotatableImpl, metaclass=AutoSlots):
def __init__(self,
name: str = '',
*,
shapes: Sequence[Shape] = (),
labels: Sequence[Label] = (),
subpatterns: Sequence[SubPattern] = (),

@ -154,6 +154,7 @@ class Arc(Shape, metaclass=AutoSlots):
radii: vector2,
angles: vector2,
width: float,
*,
poly_num_points: Optional[int] = DEFAULT_POLY_NUM_POINTS,
poly_max_arclen: Optional[float] = None,
offset: vector2 = (0.0, 0.0),

@ -44,6 +44,7 @@ class Circle(Shape, metaclass=AutoSlots):
def __init__(self,
radius: float,
*,
poly_num_points: Optional[int] = DEFAULT_POLY_NUM_POINTS,
poly_max_arclen: Optional[float] = None,
offset: vector2 = (0.0, 0.0),

@ -89,6 +89,7 @@ class Ellipse(Shape, metaclass=AutoSlots):
def __init__(self,
radii: vector2,
*,
poly_num_points: Optional[int] = DEFAULT_POLY_NUM_POINTS,
poly_max_arclen: Optional[float] = None,
offset: vector2 = (0.0, 0.0),

@ -143,6 +143,7 @@ class Path(Shape, metaclass=AutoSlots):
def __init__(self,
vertices: numpy.ndarray,
width: float = 0.0,
*,
cap: PathCap = PathCap.Flush,
cap_extensions: numpy.ndarray = None,
offset: vector2 = (0.0, 0.0),

@ -73,6 +73,7 @@ class Polygon(Shape, metaclass=AutoSlots):
def __init__(self,
vertices: numpy.ndarray,
*,
offset: vector2 = (0.0, 0.0),
rotation: float = 0.0,
mirrored: Sequence[bool] = (False, False),

@ -64,6 +64,7 @@ class Text(RotatableImpl, Shape, metaclass=AutoSlots):
string: str,
height: float,
font_path: str,
*,
offset: vector2 = (0.0, 0.0),
rotation: float = 0.0,
mirrored: Tuple[bool, bool] = (False, False),

@ -45,6 +45,7 @@ class SubPattern(PositionableImpl, DoseableImpl, RotatableImpl, ScalableImpl, Mi
def __init__(self,
pattern: Optional['Pattern'],
*,
offset: vector2 = (0.0, 0.0),
rotation: float = 0.0,
mirrored: Optional[Sequence[bool]] = None,

Loading…
Cancel
Save