Rollup merge of #64208 - guanqun:py-is-not-none, r=matklad

it's more pythonic to use 'is not None' in python files
This commit is contained in:
Mazdak Farrokhzad 2019-09-06 19:00:52 +02:00 committed by GitHub
commit ee54499be4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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):