Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
snoyer committed May 18, 2024
1 parent aebbf0f commit dd03414
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions ocpsvg/svg.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,7 @@ def import_svg_document(
flip_y: bool = True,
ignore_visibility: bool = False,
metadata: Optional[Callable[[ShapeElement, Sequence[ParentElement]], M]],
) -> ItemsFromDocument[tuple[FaceOrWire, M]]:
...
) -> ItemsFromDocument[tuple[FaceOrWire, M]]: ...


@overload
Expand All @@ -129,8 +128,7 @@ def import_svg_document(
*,
flip_y: bool = True,
ignore_visibility: bool = False,
) -> ItemsFromDocument[FaceOrWire]:
...
) -> ItemsFromDocument[FaceOrWire]: ...


def import_svg_document(
Expand Down Expand Up @@ -662,8 +660,7 @@ def wires_from_svg_document(
metadata_factory: Callable[[ShapeElement, Sequence[ParentElement]], M],
*,
ignore_visibility: bool = False,
) -> ItemsFromDocument[tuple[list[TopoDS_Wire], bool, M]]:
...
) -> ItemsFromDocument[tuple[list[TopoDS_Wire], bool, M]]: ...


@overload
Expand All @@ -672,8 +669,7 @@ def wires_from_svg_document(
metadata_factory: None,
*,
ignore_visibility: bool = False,
) -> ItemsFromDocument[tuple[list[TopoDS_Wire], bool, None]]:
...
) -> ItemsFromDocument[tuple[list[TopoDS_Wire], bool, None]]: ...


def wires_from_svg_document(
Expand Down Expand Up @@ -731,9 +727,11 @@ def walk_svg_element(
yield from walk_svg_element(child, new_parents) # type: ignore

parsed_svg = svgelements.SVG.parse( # type: ignore
resolve_path(svg_file)
if isinstance(svg_file, (str, pathlib.Path))
else svg_file,
(
resolve_path(svg_file)
if isinstance(svg_file, (str, pathlib.Path))
else svg_file
),
parse_display_none=ignore_visibility,
ppi=25.4, # inches to millimiters
)
Expand Down

0 comments on commit dd03414

Please sign in to comment.