aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/backend
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2022-09-02 13:25:04 -0700
committerEli Schwartz <eschwartz93@gmail.com>2022-09-19 20:57:52 -0400
commit4da14918cd7ad6566f2a986d2dd1aaa87bf66198 (patch)
tree0bfbad0067d9ac015bfe8adb833bfd9cb5a96ce1 /mesonbuild/backend
parent6f7ea0cc28c9e777c57c74b4d7c2d13604e48ba6 (diff)
downloadmeson-4da14918cd7ad6566f2a986d2dd1aaa87bf66198.zip
meson-4da14918cd7ad6566f2a986d2dd1aaa87bf66198.tar.gz
meson-4da14918cd7ad6566f2a986d2dd1aaa87bf66198.tar.bz2
pylint: enable consider-using-in
Diffstat (limited to 'mesonbuild/backend')
-rw-r--r--mesonbuild/backend/backends.py2
-rw-r--r--mesonbuild/backend/ninjabackend.py2
-rw-r--r--mesonbuild/backend/vs2010backend.py8
3 files changed, 6 insertions, 6 deletions
diff --git a/mesonbuild/backend/backends.py b/mesonbuild/backend/backends.py
index 64c8fa1..53e3530 100644
--- a/mesonbuild/backend/backends.py
+++ b/mesonbuild/backend/backends.py
@@ -1550,7 +1550,7 @@ class Backend:
outdirs, install_dir_names, custom_install_dir = t.get_install_dir()
# Sanity-check the outputs and install_dirs
num_outdirs, num_out = len(outdirs), len(t.get_outputs())
- if num_outdirs != 1 and num_outdirs != num_out:
+ if num_outdirs not in {1, num_out}:
m = 'Target {!r} has {} outputs: {!r}, but only {} "install_dir"s were found.\n' \
"Pass 'false' for outputs that should not be installed and 'true' for\n" \
'using the default installation directory for an output.'
diff --git a/mesonbuild/backend/ninjabackend.py b/mesonbuild/backend/ninjabackend.py
index 91ecc20..9733465 100644
--- a/mesonbuild/backend/ninjabackend.py
+++ b/mesonbuild/backend/ninjabackend.py
@@ -2331,7 +2331,7 @@ https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47485'''))
deps=deps, depfile=depfile))
def generate_pch_rule_for(self, langname, compiler):
- if langname != 'c' and langname != 'cpp':
+ if langname not in {'c', 'cpp'}:
return
rule = self.compiler_to_pch_rule_name(compiler)
depargs = compiler.get_dependency_gen_args('$out', '$DEPFILE')
diff --git a/mesonbuild/backend/vs2010backend.py b/mesonbuild/backend/vs2010backend.py
index 0440c3e..fa97720 100644
--- a/mesonbuild/backend/vs2010backend.py
+++ b/mesonbuild/backend/vs2010backend.py
@@ -180,13 +180,13 @@ class Vs2010Backend(backends.Backend):
def generate(self):
target_machine = self.interpreter.builtin['target_machine'].cpu_family_method(None, None)
- if target_machine == '64' or target_machine == 'x86_64':
+ if target_machine in {'64', 'x86_64'}:
# amd64 or x86_64
self.platform = 'x64'
elif target_machine == 'x86':
# x86
self.platform = 'Win32'
- elif target_machine == 'aarch64' or target_machine == 'arm64':
+ elif target_machine in {'aarch64', 'arm64'}:
target_cpu = self.interpreter.builtin['target_machine'].cpu_method(None, None)
if target_cpu == 'arm64ec':
self.platform = 'arm64ec'
@@ -198,13 +198,13 @@ class Vs2010Backend(backends.Backend):
raise MesonException('Unsupported Visual Studio platform: ' + target_machine)
build_machine = self.interpreter.builtin['build_machine'].cpu_family_method(None, None)
- if build_machine == '64' or build_machine == 'x86_64':
+ if build_machine in {'64', 'x86_64'}:
# amd64 or x86_64
self.build_platform = 'x64'
elif build_machine == 'x86':
# x86
self.build_platform = 'Win32'
- elif build_machine == 'aarch64' or build_machine == 'arm64':
+ elif build_machine in {'aarch64', 'arm64'}:
target_cpu = self.interpreter.builtin['build_machine'].cpu_method(None, None)
if target_cpu == 'arm64ec':
self.build_platform = 'arm64ec'