Filter shapes in the slide by type. Args: shape_type (type): The type of shapes to filter. shapes (list[ShapeElement]): The shapes to filter. Yields: ShapeElement: The filtered shapes.
(self, shape_type: type, shapes: list[ShapeElement] = None)
| 1067 | return slide |
| 1068 | |
| 1069 | def shape_filter(self, shape_type: type, shapes: list[ShapeElement] = None): |
| 1070 | """ |
| 1071 | Filter shapes in the slide by type. |
| 1072 | |
| 1073 | Args: |
| 1074 | shape_type (type): The type of shapes to filter. |
| 1075 | shapes (list[ShapeElement]): The shapes to filter. |
| 1076 | |
| 1077 | Yields: |
| 1078 | ShapeElement: The filtered shapes. |
| 1079 | """ |
| 1080 | if shapes is None: |
| 1081 | shapes = self.shapes |
| 1082 | for shape in shapes: |
| 1083 | if isinstance(shape, shape_type): |
| 1084 | yield shape |
| 1085 | elif isinstance(shape, GroupShape): |
| 1086 | yield from self.shape_filter(shape_type, shape.data) |
| 1087 | |
| 1088 | def get_content_type(self): |
| 1089 | """ |
no outgoing calls
no test coverage detected