From bf14cec81b15294c7835128200e0ed82532b85c5 Mon Sep 17 00:00:00 2001 From: Mike Sinkovsky Date: Fri, 6 Jan 2017 17:36:51 +0500 Subject: style: [E712] comparison to True should be 'if cond is True:' or 'if cond:' --- mesonbuild/interpreterbase.py | 6 +++--- 1 file 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 -- cgit v1.1