diff --git a/gdsfactory/component.py b/gdsfactory/component.py index 852aba2a18..2988abee2d 100644 --- a/gdsfactory/component.py +++ b/gdsfactory/component.py @@ -261,7 +261,7 @@ def __iter__(self): """You can iterate over polygons, paths, labels and references.""" return itertools.chain(self.polygons, self.paths, self.labels, self.references) - def get_polygon_enclosure(self): + def get_polygon_enclosure(self) -> Polygon: """Returns shapely Polygon with enclosure.""" import shapely @@ -274,7 +274,7 @@ def get_polygon_bbox( bottom: float | None = None, right: float | None = None, left: float | None = None, - ): + ) -> Polygon: """Returns shapely Polygon with bounding box. Args: diff --git a/gdsfactory/functions.py b/gdsfactory/functions.py index c03e7bcf23..ce0df437e0 100644 --- a/gdsfactory/functions.py +++ b/gdsfactory/functions.py @@ -265,19 +265,16 @@ def add_marker_layer( *, marker_label: str | None = None, flatten: bool = False, - **kwargs, ) -> Component: """Adds a marker layer from the convex hull of the input component. Used as a decorator for `@gf.cell(decorator=partial(add_marker_layer, marker_layer=...)))` + or as a decorator `c = gf.components.straight(decorator=partial(add_marker_layer, marker_layer=...))` Args: marker_layer: The marker layer. marker_label: An optional text label to add to the marker layer. flatten: Whether to flatten the component. Should be done only for elementary components. - Keyword Args: - **kwargs: Keyword arguments provided to ``component``. - Returns: Same component with marker layer applied. """