Remove unnecessary seek commands
parent
02a223c220
commit
a473ee3f4c
|
@ -265,8 +265,6 @@ class Document:
|
|||
"""
|
||||
# wrap string into StringIO object
|
||||
svg_file_obj = StringIO(svg_string)
|
||||
# reset cursor to the beginning of the buffer
|
||||
svg_file_obj.seek(0)
|
||||
# create document from file object
|
||||
return Document(svg_file_obj)
|
||||
|
||||
|
|
|
@ -271,8 +271,6 @@ def svg_string2paths(svg_string,
|
|||
info."""
|
||||
# wrap string into StringIO object
|
||||
svg_file_obj = StringIO(svg_string)
|
||||
# reset cursor to the beginning of the buffer
|
||||
svg_file_obj.seek(0)
|
||||
return svg2paths(svg_file_name_or_file=svg_file_obj,
|
||||
return_svg_attributes=return_svg_attributes,
|
||||
convert_circles_to_paths=convert_circles_to_paths,
|
||||
|
|
|
@ -26,11 +26,7 @@ class TestDocument(unittest.TestCase):
|
|||
# read entire file into string
|
||||
file_content = file.read()
|
||||
# prepare stringio object
|
||||
file_as_stringio = StringIO()
|
||||
# paste file content into it
|
||||
file_as_stringio.write(file_content)
|
||||
# reset curser to its beginning
|
||||
file_as_stringio.seek(0)
|
||||
file_as_stringio = StringIO(file_content)
|
||||
|
||||
doc = Document(file_as_stringio)
|
||||
|
||||
|
|
|
@ -81,11 +81,7 @@ class TestSVG2Paths(unittest.TestCase):
|
|||
# read entire file into string
|
||||
file_content = file.read()
|
||||
# prepare stringio object
|
||||
file_as_stringio = StringIO()
|
||||
# paste file content into it
|
||||
file_as_stringio.write(file_content)
|
||||
# reset curser to its beginning
|
||||
file_as_stringio.seek(0)
|
||||
file_as_stringio = StringIO(file_content)
|
||||
|
||||
paths, _ = svg2paths(file_as_stringio)
|
||||
|
||||
|
|
Loading…
Reference in New Issue