refactor: refactor if expression

The `if` expression used here can be simplified to increase the code readability. Example:
This commit is contained in:
deepsource-autofix[bot] 2023-09-25 08:49:13 +00:00 committed by GitHub
parent c89ec7af11
commit a0e381a34d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -24,7 +24,7 @@ class Colour:
]
lightness = (0.2126 * cont[0]) + (0.7152 * cont[1]) + (0.0722 * cont[2])
return True if lightness > threshold else False
return lightness > threshold
def to_hsv(self):
r, g, b = self.rgb