Merge pull request #28 from Derpy-Leggies/deepsource-autofix-d3b417dc

refactor: refactor `if` expression
This commit is contained in:
Michał 2023-09-25 09:49:32 +01:00 committed by GitHub
commit 0b640bf93c
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