mirror of
https://gitlab.com/ita1024/waf.git
synced 2024-12-24 02:05:12 +01:00
Simplify boolean comparisons
This commit is contained in:
parent
e7ba84b8dd
commit
a768c3114d
@ -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:
|
||||
|
@ -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:
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user