mirror of
https://github.com/electron/node-gyp.git
synced 2025-09-16 22:13:39 +02:00
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:
parent
af876e10f0
commit
a301abcde1
3 changed files with 6 additions and 6 deletions
|
@ -726,7 +726,7 @@ class NinjaWriter(object):
|
||||||
elif var == 'name':
|
elif var == 'name':
|
||||||
extra_bindings.append(('name', cygwin_munge(basename)))
|
extra_bindings.append(('name', cygwin_munge(basename)))
|
||||||
else:
|
else:
|
||||||
assert var == None, repr(var)
|
assert var is None, repr(var)
|
||||||
|
|
||||||
outputs = [self.GypPathToNinja(o, env) for o in outputs]
|
outputs = [self.GypPathToNinja(o, env) for o in outputs]
|
||||||
if self.flavor == 'win':
|
if self.flavor == 'win':
|
||||||
|
|
|
@ -539,7 +539,7 @@ def ExpandXcodeVariables(string, expansions):
|
||||||
"""
|
"""
|
||||||
|
|
||||||
matches = _xcode_variable_re.findall(string)
|
matches = _xcode_variable_re.findall(string)
|
||||||
if matches == None:
|
if matches is None:
|
||||||
return string
|
return string
|
||||||
|
|
||||||
matches.reverse()
|
matches.reverse()
|
||||||
|
|
|
@ -155,7 +155,7 @@ def GetIncludedBuildFiles(build_file_path, aux_data, included=None):
|
||||||
in the list will be relative to the current directory.
|
in the list will be relative to the current directory.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
if included == None:
|
if included is None:
|
||||||
included = []
|
included = []
|
||||||
|
|
||||||
if build_file_path in included:
|
if build_file_path in included:
|
||||||
|
@ -1062,7 +1062,7 @@ def EvalCondition(condition, conditions_key, phase, variables, build_file):
|
||||||
else:
|
else:
|
||||||
false_dict = None
|
false_dict = None
|
||||||
i = i + 2
|
i = i + 2
|
||||||
if result == None:
|
if result is None:
|
||||||
result = EvalSingleCondition(
|
result = EvalSingleCondition(
|
||||||
cond_expr, true_dict, false_dict, phase, variables, build_file)
|
cond_expr, true_dict, false_dict, phase, variables, build_file)
|
||||||
|
|
||||||
|
@ -1603,7 +1603,7 @@ class DependencyGraphNode(object):
|
||||||
|
|
||||||
def DirectDependencies(self, dependencies=None):
|
def DirectDependencies(self, dependencies=None):
|
||||||
"""Returns a list of just direct dependencies."""
|
"""Returns a list of just direct dependencies."""
|
||||||
if dependencies == None:
|
if dependencies is None:
|
||||||
dependencies = []
|
dependencies = []
|
||||||
|
|
||||||
for dependency in self.dependencies:
|
for dependency in self.dependencies:
|
||||||
|
@ -1631,7 +1631,7 @@ class DependencyGraphNode(object):
|
||||||
public entry point.
|
public entry point.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
if dependencies == None:
|
if dependencies is None:
|
||||||
dependencies = []
|
dependencies = []
|
||||||
|
|
||||||
index = 0
|
index = 0
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue