adjust code to python 3.13
This commit is contained in:
parent
a91726e1e1
commit
5b86e4aef1
|
|
@ -10,7 +10,7 @@ COMMANDS = set('MmZzLlHhVvCcSsQqTtAa')
|
|||
UPPERCASE = set('MZLHVCSQTA')
|
||||
|
||||
COMMAND_RE = re.compile("([MmZzLlHhVvCcSsQqTtAa])")
|
||||
FLOAT_RE = re.compile("[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?")
|
||||
FLOAT_RE = re.compile("[-+]?[0-9]*\\.?[0-9]+(?:[eE][-+]?[0-9]+)?")
|
||||
|
||||
SVG_COLORS = {
|
||||
"aliceblue": (0.941176,0.972549,1),
|
||||
|
|
@ -592,7 +592,7 @@ def getPathsFromSVG(svg):
|
|||
if tag.strip().lower().endswith("}href"):
|
||||
link = tree.attrib[tag]
|
||||
break
|
||||
if link is None or link[0] is not '#':
|
||||
if link is None or link[0] != '#':
|
||||
raise KeyError
|
||||
source = savedElements[link[1:]]
|
||||
x = 0
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
from __future__ import division
|
||||
from math import sqrt, cos, sin, acos, degrees, radians, log
|
||||
from collections import MutableSequence
|
||||
from collections.abc import MutableSequence
|
||||
|
||||
# This file contains classes for the different types of SVG path segments as
|
||||
# well as a Path object that contains a sequence of path segments.
|
||||
|
|
|
|||
Loading…
Reference in New Issue