File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -51,6 +51,7 @@ class ShapeFactory:
5151 'up_parab' : points .UpParabola ,
5252 'diamond' : polygons .Diamond ,
5353 'rectangle' : polygons .Rectangle ,
54+ 'rings' : circles .Rings ,
5455 'star' : polygons .Star ,
5556 }
5657
@@ -61,22 +62,25 @@ class ShapeFactory:
6162 def __init__ (self , dataset : Dataset ) -> None :
6263 self ._dataset : Dataset = dataset
6364
64- def generate_shape (self , shape : str ) -> Shape :
65+ def generate_shape (self , shape : str , ** kwargs ) -> Shape :
6566 """
6667 Generate the shape object based on the dataset.
6768
6869 Parameters
6970 ----------
7071 shape : str
7172 The desired shape. See :attr:`.AVAILABLE_SHAPES`.
73+ **kwargs
74+ Additional keyword arguments to pass down when creating
75+ the shape.
7276
7377 Returns
7478 -------
7579 Shape
7680 An shape object of the requested type.
7781 """
7882 try :
79- return self ._SHAPE_MAPPING [shape ](self ._dataset )
83+ return self ._SHAPE_MAPPING [shape ](self ._dataset , ** kwargs )
8084 except KeyError as err :
8185 raise ValueError (f'No such shape as { shape } .' ) from err
8286
You can’t perform that action at this time.
0 commit comments