mirror of
https://github.com/Derpy-Leggies/OnlyLegs.git
synced 2025-01-27 08:41:41 +00:00
refactor: refactor if
expression
The `if` expression used here can be simplified to increase the code readability. Example:
This commit is contained in:
parent
c89ec7af11
commit
a0e381a34d
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue