gyp: use "is" when comparing to None

PR-URL: https://github.com/nodejs/node-gyp/pull/1860
Reviewed-By: Christian Clauss <cclauss@me.com>
Reviewed-By: Rod Vagg <r@va.gg>
This commit is contained in:
Vladyslav Burzakovskyy 2019-08-19 12:16:16 +02:00 committed by Rod Vagg
parent af876e10f0
commit a301abcde1
No known key found for this signature in database
GPG key ID: C273792F7D83545D
3 changed files with 6 additions and 6 deletions

View file

@ -726,7 +726,7 @@ class NinjaWriter(object):
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':

View file

@ -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()

View file

@ -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:
@ -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)
@ -1603,7 +1603,7 @@ class DependencyGraphNode(object):
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:
@ -1631,7 +1631,7 @@ class DependencyGraphNode(object):
public entry point.
"""
if dependencies == None:
if dependencies is None:
dependencies = []
index = 0