[cff2 varlib subset] Clean up syntax

x != None -> x is not None.
This commit is contained in:
ReadRoberts 2018-12-11 17:07:51 -08:00
parent ebc1b0b779
commit 3a04a73b0c
2 changed files with 2 additions and 2 deletions

View File

@ -461,7 +461,7 @@ class T2WidthExtractor(SimpleT2Decompiler):
if not self.gotWidth:
if evenOdd ^ (len(args) % 2):
# For CFF2 charstrings, this should never happen
assert self.defaultWidthX != None, "CFF2 CharStrings must not have an initial width value"
assert self.defaultWidthX is not None, "CFF2 CharStrings must not have an initial width value"
self.width = self.nominalWidthX + args[0]
args = args[1:]
else:

View File

@ -169,7 +169,7 @@ def drop_hints(self):
# Insert width back if needed
if self.width != self.private.defaultWidthX:
# For CFF2 charstrings, this should never happen
assert self.private.defaultWidthX != None, "CFF2 CharStrings must not have an initial width value"
assert self.private.defaultWidthX is not None, "CFF2 CharStrings must not have an initial width value"
self.program.insert(0, self.width - self.private.nominalWidthX)
if hints.has_hintmask: