it's more pythonic to use 'is not None' in python files

This commit is contained in:
Guanqun Lu 2019-09-06 15:14:25 +08:00
parent 618768492f
commit ba7d1b80d0
2 changed files with 2 additions and 2 deletions

View File

@ -668,7 +668,7 @@ class RustBuild(object):
def update_submodule(self, module, checked_out, recorded_submodules):
module_path = os.path.join(self.rust_root, module)
if checked_out != None:
if checked_out is not None:
default_encoding = sys.getdefaultencoding()
checked_out = checked_out.communicate()[0].decode(default_encoding).strip()
if recorded_submodules[module] == checked_out:

View File

@ -60,7 +60,7 @@ def get_codepoints(f):
yield Codepoint(codepoint, class_)
prev_codepoint = codepoint
if class_first != None:
if class_first is not None:
raise ValueError("Missing Last after First")
for c in range(prev_codepoint + 1, NUM_CODEPOINTS):