diff options
author | Mike Sinkovsky <msink@permonline.ru> | 2017-01-06 17:36:51 +0500 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2017-01-11 12:33:27 -0500 |
commit | bf14cec81b15294c7835128200e0ed82532b85c5 (patch) | |
tree | 70c655ff84df6858e10762d2493cbb7c8ccaa540 /mesonbuild/interpreterbase.py | |
parent | c8981bdd1b116f379bcba9b6555d02f0b21e3471 (diff) | |
download | meson-bf14cec81b15294c7835128200e0ed82532b85c5.zip meson-bf14cec81b15294c7835128200e0ed82532b85c5.tar.gz meson-bf14cec81b15294c7835128200e0ed82532b85c5.tar.bz2 |
style: [E712] comparison to True should be 'if cond is True:' or 'if cond:'
Diffstat (limited to 'mesonbuild/interpreterbase.py')
-rw-r--r-- | mesonbuild/interpreterbase.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mesonbuild/interpreterbase.py b/mesonbuild/interpreterbase.py index db694c0..1881534 100644 --- a/mesonbuild/interpreterbase.py +++ b/mesonbuild/interpreterbase.py @@ -403,19 +403,19 @@ class InterpreterBase: (posargs, _) = self.reduce_arguments(args) if method_name == 'to_string': if len(posargs) == 0: - if obj == True: + if obj: return 'true' else: return 'false' elif len(posargs) == 2 and isinstance(posargs[0], str) and isinstance(posargs[1], str): - if obj == True: + if obj: return posargs[0] else: return posargs[1] else: raise InterpreterException('bool.to_string() must have either no arguments or exactly two string arguments that signify what values to return for true and false.') elif method_name == 'to_int': - if obj == True: + if obj: return 1 else: return 0 |