]> git.lizzy.rs Git - rust.git/commitdiff
it's more pythonic to use 'is not None' in python files
authorGuanqun Lu <guanqun.lu@gmail.com>
Fri, 6 Sep 2019 07:14:25 +0000 (15:14 +0800)
committerGuanqun Lu <guanqun.lu@gmail.com>
Fri, 6 Sep 2019 07:14:25 +0000 (15:14 +0800)
src/bootstrap/bootstrap.py
src/libcore/unicode/printable.py

index 4162fe1df5086841b6c0953e041b4c8fd3deccef..179cd488be732ffcd5609e88680f7110c735d1df 100644 (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:
index 748917f1d342087493ef73e2aea00fddc2b0ede4..4e8b4ecad0200c9a7afcf2dadbacbc57286f5b40 100644 (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):