diff options
author | Igor Gnatenko <i.gnatenko.brain@gmail.com> | 2016-12-19 21:48:35 +0100 |
---|---|---|
committer | Igor Gnatenko <i.gnatenko.brain@gmail.com> | 2016-12-19 21:48:35 +0100 |
commit | 139e020ede8a954a276e69d5c1921884ef9725ce (patch) | |
tree | 2934fa9d848640eb057b1672e947217836aab47a /mesonbuild/modules | |
parent | 9ffc0d2f894c78d6d0acab9001d9e8a0db05d9b0 (diff) | |
download | meson-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/modules')
-rw-r--r-- | mesonbuild/modules/gnome.py | 4 | ||||
-rw-r--r-- | mesonbuild/modules/i18n.py | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py index 3a991e9..b093dd5 100644 --- a/mesonbuild/modules/gnome.py +++ b/mesonbuild/modules/gnome.py @@ -639,7 +639,7 @@ can not be used with the current version of glib-compiled-resources, due to modulename = args[0] if not isinstance(modulename, str): raise MesonException('Gtkdoc arg must be string.') - if not 'src_dir' in kwargs: + if 'src_dir' not in kwargs: raise MesonException('Keyword argument src_dir missing.') main_file = kwargs.get('main_sgml', '') if not isinstance(main_file, str): @@ -657,7 +657,7 @@ can not be used with the current version of glib-compiled-resources, due to namespace = kwargs.get('namespace', '') mode = kwargs.get('mode', 'auto') VALID_MODES = ('xml', 'sgml', 'none', 'auto') - if not mode in VALID_MODES: + if mode not in VALID_MODES: raise MesonException('gtkdoc: Mode {} is not a valid mode: {}'.format(mode, VALID_MODES)) src_dirs = kwargs['src_dir'] diff --git a/mesonbuild/modules/i18n.py b/mesonbuild/modules/i18n.py index eaeb0a3..a161545 100644 --- a/mesonbuild/modules/i18n.py +++ b/mesonbuild/modules/i18n.py @@ -53,7 +53,7 @@ class I18nModule: file_type = kwargs.pop('type', 'xml') VALID_TYPES = ('xml', 'desktop') - if not file_type in VALID_TYPES: + if file_type not in VALID_TYPES: raise MesonException('i18n: "{}" is not a valid type {}'.format(file_type, VALID_TYPES)) kwargs['command'] = ['msgfmt', '--' + file_type, |