aboutsummaryrefslogtreecommitdiffstats
path: root/bot/exts/utilities/colour.py
diff options
context:
space:
mode:
authorGravatar dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>2023-08-10 06:04:31 +0000
committerGravatar GitHub <[email protected]>2023-08-10 06:04:31 +0000
commitf897f6c576d7dca764c9c0515b2c576e7fb0daea (patch)
tree4609c804db7ad9e0c4f415fc0e8a8353f2dfc6e1 /bot/exts/utilities/colour.py
parentBump rapidfuzz from 3.1.2 to 3.2.0 (#1341) (diff)
Bump ruff from 0.0.272 to 0.0.280 (#1333)
Co-authored-by: wookie184 <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Chris Lovering <[email protected]> Co-authored-by: ChrisJL <[email protected]>
Diffstat (limited to 'bot/exts/utilities/colour.py')
-rw-r--r--bot/exts/utilities/colour.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/bot/exts/utilities/colour.py b/bot/exts/utilities/colour.py
index 95f9ac22..b0ff8747 100644
--- a/bot/exts/utilities/colour.py
+++ b/bot/exts/utilities/colour.py
@@ -241,7 +241,7 @@ class Colour(commands.Cog):
choices=self.colour_mapping.values(),
score_cutoff=80
)
- colour_name = [name for name, hex_code in self.colour_mapping.items() if hex_code == match][0]
+ colour_name = next(name for name, hex_code in self.colour_mapping.items() if hex_code == match)
except TypeError:
colour_name = None
return colour_name