aboutsummaryrefslogtreecommitdiffstats
path: root/bot
diff options
context:
space:
mode:
authorGravatar dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>2023-05-15 19:55:12 +0000
committerGravatar GitHub <[email protected]>2023-05-15 19:55:12 +0000
commit6115936161ce67fd87747600c0b43068624da42a (patch)
tree1a29ff4eb28477639e2862e027dfdc16714af4bb /bot
parentBump sentry-sdk from 1.21.1 to 1.22.2 (#1274) (diff)
Bump ruff from 0.0.265 to 0.0.267 (#1276)
* Bump ruff from 0.0.265 to 0.0.267 Bumps [ruff](https://github.com/charliermarsh/ruff) from 0.0.265 to 0.0.267. - [Release notes](https://github.com/charliermarsh/ruff/releases) - [Changelog](https://github.com/charliermarsh/ruff/blob/main/BREAKING_CHANGES.md) - [Commits](https://github.com/charliermarsh/ruff/compare/v0.0.265...v0.0.267) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> * Fix linting errors from new ruff rules --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Chris Lovering <[email protected]>
Diffstat (limited to 'bot')
-rw-r--r--bot/exts/core/error_handler.py4
-rw-r--r--bot/exts/events/trivianight/trivianight.py2
-rw-r--r--bot/exts/fun/duck_game.py2
-rw-r--r--bot/exts/fun/snakes/_utils.py2
-rw-r--r--bot/utils/pagination.py2
5 files changed, 6 insertions, 6 deletions
diff --git a/bot/exts/core/error_handler.py b/bot/exts/core/error_handler.py
index 62dee53c..81b923fd 100644
--- a/bot/exts/core/error_handler.py
+++ b/bot/exts/core/error_handler.py
@@ -59,7 +59,7 @@ class CommandErrorHandler(commands.Cog):
error = getattr(error, "original", error)
logging.debug(
- f"Error Encountered: {type(error).__name__} - {str(error)}, "
+ f"Error Encountered: {type(error).__name__} - {error!s}, "
f"Command: {ctx.command}, "
f"Author: {ctx.author}, "
f"Channel: {ctx.channel}"
@@ -156,7 +156,7 @@ class CommandErrorHandler(commands.Cog):
if ctx.guild is not None:
scope.set_extra("jump_to", ctx.message.jump_url)
- log.exception(f"Unhandled command error: {str(error)}", exc_info=error)
+ log.exception(f"Unhandled command error: {error!s}", exc_info=error)
async def send_command_suggestion(self, ctx: commands.Context, command_name: str) -> None:
"""Sends user similar commands if any can be found."""
diff --git a/bot/exts/events/trivianight/trivianight.py b/bot/exts/events/trivianight/trivianight.py
index f90d32e0..e0db45d8 100644
--- a/bot/exts/events/trivianight/trivianight.py
+++ b/bot/exts/events/trivianight/trivianight.py
@@ -90,7 +90,7 @@ class TriviaNightCog(commands.Cog):
try:
serialized_json = loads(json_text)
except JSONDecodeError as error:
- raise commands.BadArgument(f"Looks like something went wrong:\n{str(error)}")
+ raise commands.BadArgument(f"Looks like something went wrong:\n{error!s}")
self.game = TriviaNightGame(serialized_json)
self.question_closed = asyncio.Event()
diff --git a/bot/exts/fun/duck_game.py b/bot/exts/fun/duck_game.py
index 3f34ece7..fbdc9ea2 100644
--- a/bot/exts/fun/duck_game.py
+++ b/bot/exts/fun/duck_game.py
@@ -248,7 +248,7 @@ class DuckGamesDirector(commands.Cog):
if answer in game.solutions:
game.claimed_answers[answer] = msg.author
game.scores[msg.author] += CORRECT_SOLN
- await self.append_to_found_embed(game, f"{str(answer):12s} - {msg.author.display_name}")
+ await self.append_to_found_embed(game, f"{answer!s:12s} - {msg.author.display_name}")
else:
await msg.add_reaction(EMOJI_WRONG)
game.scores[msg.author] += INCORRECT_SOLN
diff --git a/bot/exts/fun/snakes/_utils.py b/bot/exts/fun/snakes/_utils.py
index 5332cde2..ffffcd34 100644
--- a/bot/exts/fun/snakes/_utils.py
+++ b/bot/exts/fun/snakes/_utils.py
@@ -489,7 +489,7 @@ class SnakeAndLaddersGame:
await self.channel.send(
f"**Snakes and Ladders**: {user.mention} has joined the game.\n"
- f"There are now {str(len(self.players))} players in the game.",
+ f"There are now {len(self.players)!s} players in the game.",
delete_after=10
)
diff --git a/bot/utils/pagination.py b/bot/utils/pagination.py
index df0eb942..ef3186d0 100644
--- a/bot/utils/pagination.py
+++ b/bot/utils/pagination.py
@@ -190,7 +190,7 @@ class LinePaginator(Paginator):
for emoji in PAGINATION_EMOJI:
# Add all the applicable emoji to the message
- log.trace(f"Adding reaction: {repr(emoji)}")
+ log.trace(f"Adding reaction: {emoji!r}")
await message.add_reaction(emoji)
while True: