aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/modules
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/modules
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/modules')
-rw-r--r--mesonbuild/modules/gnome.py4
-rw-r--r--mesonbuild/modules/i18n.py2
-rw-r--r--mesonbuild/modules/pkgconfig.py2
-rw-r--r--mesonbuild/modules/qt5.py2
4 files changed, 5 insertions, 5 deletions
diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py
index f72ddfa..62f4415 100644
--- a/mesonbuild/modules/gnome.py
+++ b/mesonbuild/modules/gnome.py
@@ -640,7 +640,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):
@@ -658,7 +658,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 4df62f2..c4e4814 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,
diff --git a/mesonbuild/modules/pkgconfig.py b/mesonbuild/modules/pkgconfig.py
index f74f9e9..6c59f52 100644
--- a/mesonbuild/modules/pkgconfig.py
+++ b/mesonbuild/modules/pkgconfig.py
@@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-from .. import coredata, build
+from .. import build
from .. import mesonlib
from .. import mlog
import os
diff --git a/mesonbuild/modules/qt5.py b/mesonbuild/modules/qt5.py
index da1ac83..35a475a 100644
--- a/mesonbuild/modules/qt5.py
+++ b/mesonbuild/modules/qt5.py
@@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-import os, subprocess
+import os
from .. import mlog
from .. import build
from ..mesonlib import MesonException, Popen_safe