aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/build.py
diff options
context:
space:
mode:
authorIgor Gnatenko <i.gnatenko.brain@gmail.com>2016-12-19 21:48:35 +0100
committerIgor Gnatenko <i.gnatenko.brain@gmail.com>2016-12-19 21:48:35 +0100
commit139e020ede8a954a276e69d5c1921884ef9725ce (patch)
tree2934fa9d848640eb057b1672e947217836aab47a /mesonbuild/build.py
parent9ffc0d2f894c78d6d0acab9001d9e8a0db05d9b0 (diff)
downloadmeson-139e020ede8a954a276e69d5c1921884ef9725ce.zip
meson-139e020ede8a954a276e69d5c1921884ef9725ce.tar.gz
meson-139e020ede8a954a276e69d5c1921884ef9725ce.tar.bz2
tree-wide: use proper 'not in' notation
Let's be more pythonic and 'not is' seems really weird. Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
Diffstat (limited to 'mesonbuild/build.py')
-rw-r--r--mesonbuild/build.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/mesonbuild/build.py b/mesonbuild/build.py
index 47d589d..136bcf5 100644
--- a/mesonbuild/build.py
+++ b/mesonbuild/build.py
@@ -315,7 +315,7 @@ class BuildTarget():
def check_unknown_kwargs_int(self, kwargs, known_kwargs):
unknowns = []
for k in kwargs:
- if not k in known_kwargs:
+ if k not in known_kwargs:
unknowns.append(k)
if len(unknowns) > 0:
mlog.warning('Unknown keyword argument(s) in target %s: %s.' %
@@ -347,7 +347,7 @@ class BuildTarget():
if hasattr(s, 'held_object'):
s = s.held_object
if isinstance(s, File):
- if not s in added_sources:
+ if s not in added_sources:
self.sources.append(s)
added_sources[s] = True
elif isinstance(s, (GeneratedList, CustomTarget)):
@@ -874,7 +874,7 @@ class Generator():
for rule in outputs:
if not isinstance(rule, str):
raise InvalidArguments('"output" may only contain strings.')
- if not '@BASENAME@' in rule and not '@PLAINNAME@' in rule:
+ if '@BASENAME@' not in rule and '@PLAINNAME@' not in rule:
raise InvalidArguments('Every element of "output" must contain @BASENAME@ or @PLAINNAME@.')
if '/' in rule or '\\' in rule:
raise InvalidArguments('"outputs" must not contain a directory separator.')