mirror of
https://github.com/electron/node-gyp.git
synced 2025-08-15 12:58:19 +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':
|
||||
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':
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue