Fix all issues detected by pyflakes
This commit is contained in:
parent
82df0d2327
commit
99363c9089
4 changed files with 245 additions and 246 deletions
|
|
@ -645,7 +645,6 @@ def removeUnusedDefs(doc, defElem, elemsToRemove=None):
|
||||||
if elemsToRemove is None:
|
if elemsToRemove is None:
|
||||||
elemsToRemove = []
|
elemsToRemove = []
|
||||||
|
|
||||||
identifiedElements = findElementsWithId(doc.documentElement)
|
|
||||||
referencedIDs = findReferencedElements(doc.documentElement)
|
referencedIDs = findReferencedElements(doc.documentElement)
|
||||||
|
|
||||||
keepTags = ['font', 'style', 'metadata', 'script', 'title', 'desc']
|
keepTags = ['font', 'style', 'metadata', 'script', 'title', 'desc']
|
||||||
|
|
@ -2072,6 +2071,7 @@ def cleanPath(element, options):
|
||||||
# convert absolute coordinates into relative ones.
|
# convert absolute coordinates into relative ones.
|
||||||
# Reuse the data structure 'path', since we're not adding or removing subcommands.
|
# Reuse the data structure 'path', since we're not adding or removing subcommands.
|
||||||
# Also reuse the coordinate lists since we're not adding or removing any.
|
# Also reuse the coordinate lists since we're not adding or removing any.
|
||||||
|
x = y = 0
|
||||||
for pathIndex in range(0, len(path)):
|
for pathIndex in range(0, len(path)):
|
||||||
cmd, data = path[pathIndex] # Changes to cmd don't get through to the data structure
|
cmd, data = path[pathIndex] # Changes to cmd don't get through to the data structure
|
||||||
i = 0
|
i = 0
|
||||||
|
|
|
||||||
|
|
@ -44,7 +44,7 @@ Out[5]: [('M', [(100.0, -200.0)])]
|
||||||
from __future__ import absolute_import
|
from __future__ import absolute_import
|
||||||
|
|
||||||
import re
|
import re
|
||||||
from decimal import *
|
from decimal import Decimal, getcontext
|
||||||
from functools import partial
|
from functools import partial
|
||||||
|
|
||||||
# Sentinel.
|
# Sentinel.
|
||||||
|
|
|
||||||
|
|
@ -59,7 +59,7 @@ Out[12]: [('translate', [30.0, -30.0]), ('rotate', [36.0])]
|
||||||
from __future__ import absolute_import
|
from __future__ import absolute_import
|
||||||
|
|
||||||
import re
|
import re
|
||||||
from decimal import *
|
from decimal import Decimal
|
||||||
from six.moves import range
|
from six.moves import range
|
||||||
from functools import partial
|
from functools import partial
|
||||||
|
|
||||||
|
|
|
||||||
485
testscour.py
485
testscour.py
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue