Simplify boolean comparisons

This commit is contained in:
Thomas Nagy 2017-04-22 22:08:00 +02:00
parent e7ba84b8dd
commit a768c3114d
No known key found for this signature in database
GPG Key ID: 49B4C67C05277AAA
4 changed files with 7 additions and 7 deletions

View File

@ -1428,9 +1428,9 @@ class StepContext(BuildContext):
pattern = re.compile(pat)
def match(node, output):
if output == True and not out:
if output and not out:
return False
if output == False and not inn:
if not output and not inn:
return False
if anode:

View File

@ -585,9 +585,9 @@ class Context(ctx):
result = kw.get('result') or k[0]
defcolor = 'GREEN'
if result == True:
if result is True:
msg = 'ok'
elif result == False:
elif not result:
msg = 'not found'
defcolor = 'YELLOW'
else:

View File

@ -668,7 +668,7 @@ def libname_msvc(self, libname, is_static=False):
(lt_path, lt_libname, lt_static) = self.find_lt_names_msvc(lib, is_static)
if lt_path != None and lt_libname != None:
if lt_static == True:
if lt_static:
# file existence check has been made by find_lt_names
return os.path.join(lt_path,lt_libname)

View File

@ -129,9 +129,9 @@ class MakeContext(BuildContext):
pattern = re.compile(pat)
def match(node, output):
if output == True and not out:
if output and not out:
return False
if output == False and not inn:
if not output and not inn:
return False
if anode: