Skip to content

Commit ba7d1b8

Browse files
author
Guanqun Lu
committed
it's more pythonic to use 'is not None' in python files
1 parent 6187684 commit ba7d1b8

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/bootstrap/bootstrap.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -668,7 +668,7 @@ def check_submodule(self, module, slow_submodules):
668668
def update_submodule(self, module, checked_out, recorded_submodules):
669669
module_path = os.path.join(self.rust_root, module)
670670

671-
if checked_out != None:
671+
if checked_out is not None:
672672
default_encoding = sys.getdefaultencoding()
673673
checked_out = checked_out.communicate()[0].decode(default_encoding).strip()
674674
if recorded_submodules[module] == checked_out:

src/libcore/unicode/printable.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ def get_codepoints(f):
6060
yield Codepoint(codepoint, class_)
6161
prev_codepoint = codepoint
6262

63-
if class_first != None:
63+
if class_first is not None:
6464
raise ValueError("Missing Last after First")
6565

6666
for c in range(prev_codepoint + 1, NUM_CODEPOINTS):

0 commit comments

Comments
 (0)