Skip to content

Commit 4ac73a1

Browse files
authored
Rollup merge of #64208 - guanqun:py-is-not-none, r=matklad
it's more pythonic to use 'is not None' in python files
2 parents f9aa5d6 + ba7d1b8 commit 4ac73a1

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Diff for: src/bootstrap/bootstrap.py

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

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

Diff for: 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)