diff options
| author | 2023-11-09 10:09:20 +0000 | |
|---|---|---|
| committer | 2023-11-13 14:42:19 +0000 | |
| commit | a6a8f8ed9b4f6daa454703286250b1d2b72e85a6 (patch) | |
| tree | d30020e77e59a891cb36f6f2ce922eef16535c28 /bot | |
| parent | Bump ruff from 0.1.4 to 0.1.5 (diff) | |
Lint repo with new ruff rules
Diffstat (limited to 'bot')
| -rw-r--r-- | bot/exts/core/internal_eval/_internal_eval.py | 2 | ||||
| -rw-r--r-- | bot/exts/fun/snakes/_snakes_cog.py | 4 | ||||
| -rw-r--r-- | bot/exts/fun/tic_tac_toe.py | 2 | ||||
| -rw-r--r-- | bot/exts/utilities/colour.py | 4 | ||||
| -rw-r--r-- | bot/utils/halloween/spookifications.py | 6 | 
5 files changed, 9 insertions, 9 deletions
diff --git a/bot/exts/core/internal_eval/_internal_eval.py b/bot/exts/core/internal_eval/_internal_eval.py index f5188c1f..1ae3c043 100644 --- a/bot/exts/core/internal_eval/_internal_eval.py +++ b/bot/exts/core/internal_eval/_internal_eval.py @@ -165,7 +165,7 @@ class InternalEval(commands.Cog):                  code = "\n".join(block.group("code") for block in blocks)              else:                  match = match[0] if len(blocks) == 0 else blocks[0] -                code, block, lang, delim = match.group("code", "block", "lang", "delim") +                code, _, _, _ = match.group("code", "block", "lang", "delim")          else:              code = RAW_CODE_REGEX.fullmatch(code).group("code") diff --git a/bot/exts/fun/snakes/_snakes_cog.py b/bot/exts/fun/snakes/_snakes_cog.py index 6f359928..dfe2903a 100644 --- a/bot/exts/fun/snakes/_snakes_cog.py +++ b/bot/exts/fun/snakes/_snakes_cog.py @@ -375,7 +375,7 @@ class Snakes(Cog):              for image in snake_info["images"]:                  # Images come in the format of `File:filename.extension` -                file, sep, filename = image["title"].partition(":") +                _, _, filename = image["title"].partition(":")                  filename = filename.replace(" ", "%20")  # Wikipedia returns good data!                  if not filename.startswith("Map"): @@ -421,7 +421,7 @@ class Snakes(Cog):          # Validate the answer          try: -            reaction, user = await ctx.bot.wait_for("reaction_add", timeout=45.0, check=predicate) +            reaction, _ = await ctx.bot.wait_for("reaction_add", timeout=45.0, check=predicate)          except TimeoutError:              await ctx.send(f"You took too long. The correct answer was **{options[answer]}**.")              await message.clear_reactions() diff --git a/bot/exts/fun/tic_tac_toe.py b/bot/exts/fun/tic_tac_toe.py index f6ee6293..f249c072 100644 --- a/bot/exts/fun/tic_tac_toe.py +++ b/bot/exts/fun/tic_tac_toe.py @@ -156,7 +156,7 @@ class Game:              )          try: -            reaction, user = await self.ctx.bot.wait_for( +            reaction, _ = await self.ctx.bot.wait_for(                  "reaction_add",                  timeout=60.0,                  check=confirm_check diff --git a/bot/exts/utilities/colour.py b/bot/exts/utilities/colour.py index b0ff8747..0380779d 100644 --- a/bot/exts/utilities/colour.py +++ b/bot/exts/utilities/colour.py @@ -236,7 +236,7 @@ class Colour(commands.Cog):          """Convert RGB values to a fuzzy matched name."""          input_hex_colour = self._rgb_to_hex(rgb)          try: -            match, certainty, _ = rapidfuzz.process.extractOne( +            match, _, _ = rapidfuzz.process.extractOne(                  query=input_hex_colour,                  choices=self.colour_mapping.values(),                  score_cutoff=80 @@ -249,7 +249,7 @@ class Colour(commands.Cog):      def match_colour_name(self, ctx: commands.Context, input_colour_name: str) -> str | None:          """Convert a colour name to HEX code."""          try: -            match, certainty, _ = rapidfuzz.process.extractOne( +            match, _, _ = rapidfuzz.process.extractOne(                  query=input_colour_name,                  choices=self.colour_mapping.keys(),                  score_cutoff=80 diff --git a/bot/utils/halloween/spookifications.py b/bot/utils/halloween/spookifications.py index b0c139e6..2f8c1448 100644 --- a/bot/utils/halloween/spookifications.py +++ b/bot/utils/halloween/spookifications.py @@ -29,13 +29,13 @@ def pentagram(im: Image.Image) -> Image.Image:  def bat(im: Image.Image) -> Image.Image:      """ -    Adds a bat silhoutte to the image. +    Adds a bat silhouette to the image. -    The bat silhoutte is of a size at least one-fifths that of the original image and may be rotated +    The bat silhouette is of a size at least one-fifths that of the original image and may be rotated      up to 90 degrees anti-clockwise.      """      im = im.convert("RGB") -    wt, ht = im.size +    wt, _ = im.size      bat = Image.open("bot/resources/holidays/halloween/bat-clipart.png")      bat_size = randint(wt//10, wt//7)      rot = randint(0, 90)  |