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

Use "is" when comparing to None #1860

Closed
wants to merge 1 commit into from
Closed
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 gyp/pylib/gyp/generator/ninja.py
Original file line number Diff line number Diff line change
Expand Up @@ -726,7 +726,7 @@ def cygwin_munge(path):
elif var == 'name':
extra_bindings.append(('name', cygwin_munge(basename)))
else:
assert var == None, repr(var)
assert var is None, repr(var)

outputs = [self.GypPathToNinja(o, env) for o in outputs]
if self.flavor == 'win':
Expand Down
2 changes: 1 addition & 1 deletion gyp/pylib/gyp/generator/xcode.py
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,7 @@ def ExpandXcodeVariables(string, expansions):
"""

matches = _xcode_variable_re.findall(string)
if matches == None:
if matches is None:
return string

matches.reverse()
Expand Down
8 changes: 4 additions & 4 deletions gyp/pylib/gyp/input.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ def GetIncludedBuildFiles(build_file_path, aux_data, included=None):
in the list will be relative to the current directory.
"""

if included == None:
if included is None:
included = []

if build_file_path in included:
Expand Down Expand Up @@ -1062,7 +1062,7 @@ def EvalCondition(condition, conditions_key, phase, variables, build_file):
else:
false_dict = None
i = i + 2
if result == None:
if result is None:
result = EvalSingleCondition(
cond_expr, true_dict, false_dict, phase, variables, build_file)

Expand Down Expand Up @@ -1603,7 +1603,7 @@ def Visit(node, path):

def DirectDependencies(self, dependencies=None):
"""Returns a list of just direct dependencies."""
if dependencies == None:
if dependencies is None:
dependencies = []

for dependency in self.dependencies:
Expand Down Expand Up @@ -1631,7 +1631,7 @@ def _AddImportedDependencies(self, targets, dependencies=None):
public entry point.
"""

if dependencies == None:
if dependencies is None:
dependencies = []

index = 0
Expand Down