Force keyword args in more cases

This commit is contained in:
Jan Petykiewicz 2021-06-18 18:46:05 -07:00
parent 21ef4207df
commit 65466a5986

View File

@ -115,6 +115,7 @@ class Polygon(Shape, metaclass=AutoSlots):
@staticmethod @staticmethod
def square(side_length: float, def square(side_length: float,
*,
rotation: float = 0.0, rotation: float = 0.0,
offset: vector2 = (0.0, 0.0), offset: vector2 = (0.0, 0.0),
layer: layer_t = 0, layer: layer_t = 0,
@ -148,6 +149,7 @@ class Polygon(Shape, metaclass=AutoSlots):
@staticmethod @staticmethod
def rectangle(lx: float, def rectangle(lx: float,
ly: float, ly: float,
*,
rotation: float = 0, rotation: float = 0,
offset: vector2 = (0.0, 0.0), offset: vector2 = (0.0, 0.0),
layer: layer_t = 0, layer: layer_t = 0,
@ -179,7 +181,8 @@ class Polygon(Shape, metaclass=AutoSlots):
return poly return poly
@staticmethod @staticmethod
def rect(xmin: Optional[float] = None, def rect(*,
xmin: Optional[float] = None,
xctr: Optional[float] = None, xctr: Optional[float] = None,
xmax: Optional[float] = None, xmax: Optional[float] = None,
lx: Optional[float] = None, lx: Optional[float] = None,