From 3a04a73b0cd129e944a148b0eadd465c6353a74f Mon Sep 17 00:00:00 2001 From: ReadRoberts Date: Tue, 11 Dec 2018 17:07:51 -0800 Subject: [PATCH] [cff2 varlib subset] Clean up syntax x != None -> x is not None. --- Lib/fontTools/misc/psCharStrings.py | 2 +- Lib/fontTools/subset/cff.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Lib/fontTools/misc/psCharStrings.py b/Lib/fontTools/misc/psCharStrings.py index b6e1b1077..e0f8503cc 100644 --- a/Lib/fontTools/misc/psCharStrings.py +++ b/Lib/fontTools/misc/psCharStrings.py @@ -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: diff --git a/Lib/fontTools/subset/cff.py b/Lib/fontTools/subset/cff.py index ba5c504f3..c2c1facec 100644 --- a/Lib/fontTools/subset/cff.py +++ b/Lib/fontTools/subset/cff.py @@ -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: