Skip to content

Commit

Permalink
gyp: use "is" when comparing to None
Browse files Browse the repository at this point in the history
PR-URL: #1860
Reviewed-By: Christian Clauss <cclauss@me.com>
Reviewed-By: Rod Vagg <r@va.gg>
  • Loading branch information
MrMebelMan authored and rvagg committed Sep 26, 2019
1 parent 1cb4708 commit 3f4972c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
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

0 comments on commit 3f4972c

Please sign in to comment.