Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

it's more pythonic to use 'is not None' in python files #64208

Merged
merged 1 commit into from
Sep 6, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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