From a0e381a34dd6e16f7a35a2ded15896266f7b7349 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Mon, 25 Sep 2023 08:49:13 +0000 Subject: [PATCH] refactor: refactor `if` expression The `if` expression used here can be simplified to increase the code readability. Example: --- onlylegs/utils/colour.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/onlylegs/utils/colour.py b/onlylegs/utils/colour.py index 4c9c8b0..491d4cc 100644 --- a/onlylegs/utils/colour.py +++ b/onlylegs/utils/colour.py @@ -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