From 07f46d41f865b2bcc1c054cce35814dc8ffd32c4 Mon Sep 17 00:00:00 2001 From: FlyingSamson Date: Wed, 25 May 2022 19:24:50 +0200 Subject: [PATCH] Rename svg_string2paths to svgstr2paths --- svgpathtools/__init__.py | 2 +- svgpathtools/svg_to_paths.py | 2 +- test/test_svg2paths.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/svgpathtools/__init__.py b/svgpathtools/__init__.py index 91f1afb..7e5da65 100644 --- a/svgpathtools/__init__.py +++ b/svgpathtools/__init__.py @@ -17,6 +17,6 @@ from .document import (Document, CONVERSIONS, CONVERT_ONLY_PATHS, from .svg_io_sax import SaxDocument try: - from .svg_to_paths import svg2paths, svg2paths2, svg_string2paths, svg_string2paths2 + from .svg_to_paths import svg2paths, svg2paths2, svgstr2paths except ImportError: pass diff --git a/svgpathtools/svg_to_paths.py b/svgpathtools/svg_to_paths.py index d8c9a4b..dec0e44 100644 --- a/svgpathtools/svg_to_paths.py +++ b/svgpathtools/svg_to_paths.py @@ -258,7 +258,7 @@ def svg2paths2(svg_file_location, convert_rectangles_to_paths=convert_rectangles_to_paths) -def svg_string2paths(svg_string, +def svgstr2paths(svg_string, return_svg_attributes=False, convert_circles_to_paths=True, convert_ellipses_to_paths=True, diff --git a/test/test_svg2paths.py b/test/test_svg2paths.py index faeccc1..67a5751 100644 --- a/test/test_svg2paths.py +++ b/test/test_svg2paths.py @@ -94,6 +94,6 @@ class TestSVG2Paths(unittest.TestCase): # read entire file into string file_content = file.read() - paths, _ = svg_string2paths(file_content) + paths, _ = svgstr2paths(file_content) self.assertEqual(len(paths), 2)