Merge pull request #1697 from fonttools/fix-minor-type-errors
Fix minor type errors found with pytype
This commit is contained in:
commit
afdb967a28
@ -61,15 +61,16 @@ def lib_convertCFFToCFF2(cff, otFont):
|
|||||||
fdArray.append(fontDict)
|
fdArray.append(fontDict)
|
||||||
fontDict.Private = privateDict
|
fontDict.Private = privateDict
|
||||||
privateOpOrder = buildOrder(privateDictOperators2)
|
privateOpOrder = buildOrder(privateDictOperators2)
|
||||||
for entry in privateDictOperators:
|
if privateDict is not None:
|
||||||
key = entry[1]
|
for entry in privateDictOperators:
|
||||||
if key not in privateOpOrder:
|
key = entry[1]
|
||||||
if key in privateDict.rawDict:
|
if key not in privateOpOrder:
|
||||||
# print "Removing private dict", key
|
if key in privateDict.rawDict:
|
||||||
del privateDict.rawDict[key]
|
# print "Removing private dict", key
|
||||||
if hasattr(privateDict, key):
|
del privateDict.rawDict[key]
|
||||||
delattr(privateDict, key)
|
if hasattr(privateDict, key):
|
||||||
# print "Removing privateDict attr", key
|
delattr(privateDict, key)
|
||||||
|
# print "Removing privateDict attr", key
|
||||||
else:
|
else:
|
||||||
# clean up the PrivateDicts in the fdArray
|
# clean up the PrivateDicts in the fdArray
|
||||||
fdArray = topDict.FDArray
|
fdArray = topDict.FDArray
|
||||||
|
@ -987,7 +987,7 @@ def parseArgs(args):
|
|||||||
try:
|
try:
|
||||||
axisLimits = parseLimits(options.locargs)
|
axisLimits = parseLimits(options.locargs)
|
||||||
except ValueError as e:
|
except ValueError as e:
|
||||||
parser.error(e)
|
parser.error(str(e))
|
||||||
|
|
||||||
if len(axisLimits) != len(options.locargs):
|
if len(axisLimits) != len(options.locargs):
|
||||||
parser.error("Specified multiple limits for the same axis")
|
parser.error("Specified multiple limits for the same axis")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user