aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/build.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2016-12-21 00:09:44 +0200
committerGitHub <noreply@github.com>2016-12-21 00:09:44 +0200
commita2528a881640913dfc71fab7f15225d7e7d9a567 (patch)
treed4c90f6ae3a87624a4a7d7e90e48e2e700ee1d3f /mesonbuild/build.py
parent39ab311019aed50c6baf3dcb2e1c1bfe0bbe15e8 (diff)
parent139e020ede8a954a276e69d5c1921884ef9725ce (diff)
downloadmeson-a2528a881640913dfc71fab7f15225d7e7d9a567.zip
meson-a2528a881640913dfc71fab7f15225d7e7d9a567.tar.gz
meson-a2528a881640913dfc71fab7f15225d7e7d9a567.tar.bz2
Merge pull request #1233 from mesonbuild/wip/ignatenko/code-style
Trivial cleanups in code
Diffstat (limited to 'mesonbuild/build.py')
-rw-r--r--mesonbuild/build.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/mesonbuild/build.py b/mesonbuild/build.py
index 87797e1..cc8f179 100644
--- a/mesonbuild/build.py
+++ b/mesonbuild/build.py
@@ -12,7 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-from . import coredata
from . import environment
from . import dependencies
from . import mlog
@@ -317,7 +316,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.' %
@@ -349,7 +348,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)):
@@ -880,7 +879,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.')