Skip to content

Commit

Permalink
Rollup merge of rust-lang#64208 - guanqun:py-is-not-none, r=matklad
Browse files Browse the repository at this point in the history
it's more pythonic to use 'is not None' in python files
  • Loading branch information
Centril authored Sep 6, 2019
2 parents 8111cca + ba7d1b8 commit ee54499
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/bootstrap/bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -668,7 +668,7 @@ def check_submodule(self, module, slow_submodules):
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:
Expand Down
2 changes: 1 addition & 1 deletion src/libcore/unicode/printable.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit ee54499

Please sign in to comment.