Force use of keyword args on most constructors
This commit is contained in:
parent
2a8e43cbcd
commit
0e04633f61
@ -40,6 +40,7 @@ class Label(PositionableImpl, LayerableImpl, LockableImpl, RepeatableImpl, Annot
|
|||||||
|
|
||||||
def __init__(self,
|
def __init__(self,
|
||||||
string: str,
|
string: str,
|
||||||
|
*,
|
||||||
offset: vector2 = (0.0, 0.0),
|
offset: vector2 = (0.0, 0.0),
|
||||||
layer: layer_t = 0,
|
layer: layer_t = 0,
|
||||||
repetition: Optional[Repetition] = None,
|
repetition: Optional[Repetition] = None,
|
||||||
|
@ -50,6 +50,7 @@ class Pattern(LockableImpl, AnnotatableImpl, metaclass=AutoSlots):
|
|||||||
|
|
||||||
def __init__(self,
|
def __init__(self,
|
||||||
name: str = '',
|
name: str = '',
|
||||||
|
*,
|
||||||
shapes: Sequence[Shape] = (),
|
shapes: Sequence[Shape] = (),
|
||||||
labels: Sequence[Label] = (),
|
labels: Sequence[Label] = (),
|
||||||
subpatterns: Sequence[SubPattern] = (),
|
subpatterns: Sequence[SubPattern] = (),
|
||||||
|
@ -154,6 +154,7 @@ class Arc(Shape, metaclass=AutoSlots):
|
|||||||
radii: vector2,
|
radii: vector2,
|
||||||
angles: vector2,
|
angles: vector2,
|
||||||
width: float,
|
width: float,
|
||||||
|
*,
|
||||||
poly_num_points: Optional[int] = DEFAULT_POLY_NUM_POINTS,
|
poly_num_points: Optional[int] = DEFAULT_POLY_NUM_POINTS,
|
||||||
poly_max_arclen: Optional[float] = None,
|
poly_max_arclen: Optional[float] = None,
|
||||||
offset: vector2 = (0.0, 0.0),
|
offset: vector2 = (0.0, 0.0),
|
||||||
|
@ -44,6 +44,7 @@ class Circle(Shape, metaclass=AutoSlots):
|
|||||||
|
|
||||||
def __init__(self,
|
def __init__(self,
|
||||||
radius: float,
|
radius: float,
|
||||||
|
*,
|
||||||
poly_num_points: Optional[int] = DEFAULT_POLY_NUM_POINTS,
|
poly_num_points: Optional[int] = DEFAULT_POLY_NUM_POINTS,
|
||||||
poly_max_arclen: Optional[float] = None,
|
poly_max_arclen: Optional[float] = None,
|
||||||
offset: vector2 = (0.0, 0.0),
|
offset: vector2 = (0.0, 0.0),
|
||||||
|
@ -89,6 +89,7 @@ class Ellipse(Shape, metaclass=AutoSlots):
|
|||||||
|
|
||||||
def __init__(self,
|
def __init__(self,
|
||||||
radii: vector2,
|
radii: vector2,
|
||||||
|
*,
|
||||||
poly_num_points: Optional[int] = DEFAULT_POLY_NUM_POINTS,
|
poly_num_points: Optional[int] = DEFAULT_POLY_NUM_POINTS,
|
||||||
poly_max_arclen: Optional[float] = None,
|
poly_max_arclen: Optional[float] = None,
|
||||||
offset: vector2 = (0.0, 0.0),
|
offset: vector2 = (0.0, 0.0),
|
||||||
|
@ -143,6 +143,7 @@ class Path(Shape, metaclass=AutoSlots):
|
|||||||
def __init__(self,
|
def __init__(self,
|
||||||
vertices: numpy.ndarray,
|
vertices: numpy.ndarray,
|
||||||
width: float = 0.0,
|
width: float = 0.0,
|
||||||
|
*,
|
||||||
cap: PathCap = PathCap.Flush,
|
cap: PathCap = PathCap.Flush,
|
||||||
cap_extensions: numpy.ndarray = None,
|
cap_extensions: numpy.ndarray = None,
|
||||||
offset: vector2 = (0.0, 0.0),
|
offset: vector2 = (0.0, 0.0),
|
||||||
|
@ -73,6 +73,7 @@ class Polygon(Shape, metaclass=AutoSlots):
|
|||||||
|
|
||||||
def __init__(self,
|
def __init__(self,
|
||||||
vertices: numpy.ndarray,
|
vertices: numpy.ndarray,
|
||||||
|
*,
|
||||||
offset: vector2 = (0.0, 0.0),
|
offset: vector2 = (0.0, 0.0),
|
||||||
rotation: float = 0.0,
|
rotation: float = 0.0,
|
||||||
mirrored: Sequence[bool] = (False, False),
|
mirrored: Sequence[bool] = (False, False),
|
||||||
|
@ -64,6 +64,7 @@ class Text(RotatableImpl, Shape, metaclass=AutoSlots):
|
|||||||
string: str,
|
string: str,
|
||||||
height: float,
|
height: float,
|
||||||
font_path: str,
|
font_path: str,
|
||||||
|
*,
|
||||||
offset: vector2 = (0.0, 0.0),
|
offset: vector2 = (0.0, 0.0),
|
||||||
rotation: float = 0.0,
|
rotation: float = 0.0,
|
||||||
mirrored: Tuple[bool, bool] = (False, False),
|
mirrored: Tuple[bool, bool] = (False, False),
|
||||||
|
@ -45,6 +45,7 @@ class SubPattern(PositionableImpl, DoseableImpl, RotatableImpl, ScalableImpl, Mi
|
|||||||
|
|
||||||
def __init__(self,
|
def __init__(self,
|
||||||
pattern: Optional['Pattern'],
|
pattern: Optional['Pattern'],
|
||||||
|
*,
|
||||||
offset: vector2 = (0.0, 0.0),
|
offset: vector2 = (0.0, 0.0),
|
||||||
rotation: float = 0.0,
|
rotation: float = 0.0,
|
||||||
mirrored: Optional[Sequence[bool]] = None,
|
mirrored: Optional[Sequence[bool]] = None,
|
||||||
|
Loading…
Reference in New Issue
Block a user