if
expression used can be simplified PYL-R1719160if __name__ == "__main__":
161 args = ["--disable" "all"]
162 for i in range(len(args)):
163 has_truthy = True if args[i] else False164 if has_truthy:
165 break
The if
expression used here can be simplified to increase the code readability.
Example:
value = True if arg else False
This can be simplified into:
value = bool(arg)