aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/compilers/compilers.py
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2019-03-19 19:33:30 -0400
committerNirbheek Chauhan <nirbheek.chauhan@gmail.com>2019-03-27 14:45:42 +0000
commitc67ea5cd4d9ece70ab19456f588aff44cb1f7e3c (patch)
treebcda3018380e0879d7e14126ad1790efe5161176 /mesonbuild/compilers/compilers.py
parentd361da991bbcf8b6a97205615ac5489112be79ff (diff)
downloadmeson-c67ea5cd4d9ece70ab19456f588aff44cb1f7e3c.zip
meson-c67ea5cd4d9ece70ab19456f588aff44cb1f7e3c.tar.gz
meson-c67ea5cd4d9ece70ab19456f588aff44cb1f7e3c.tar.bz2
Small cleanup to use_preproc_flags:
- Add type signature - Use set not tuple for homongenous membership test.
Diffstat (limited to 'mesonbuild/compilers/compilers.py')
-rw-r--r--mesonbuild/compilers/compilers.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/mesonbuild/compilers/compilers.py b/mesonbuild/compilers/compilers.py
index d93a542..40f0251 100644
--- a/mesonbuild/compilers/compilers.py
+++ b/mesonbuild/compilers/compilers.py
@@ -970,11 +970,11 @@ class Compiler:
"""
return []
- def use_preproc_flags(self):
+ def use_preproc_flags(self) -> bool:
"""
Whether the compiler (or processes it spawns) cares about CPPFLAGS
"""
- return self.get_language() in ('c', 'cpp', 'objc', 'objcpp')
+ return self.get_language() in {'c', 'cpp', 'objc', 'objcpp'}
def get_args_from_envvars(self):
"""