diff options
author | 2023-05-16 20:40:01 +0100 | |
---|---|---|
committer | 2023-05-24 12:31:49 +0100 | |
commit | a909bb00732a6e8a0a795f67f582ecd2557aeed6 (patch) | |
tree | 925b523a15a58d714ac0791d1ea4169e583dc622 | |
parent | Bump ruff from 0.0.265 to 0.0.267 (diff) |
Use f-string conversions over functions
-rw-r--r-- | bot/exts/recruitment/talentpool/_cog.py | 4 | ||||
-rw-r--r-- | bot/pagination.py | 2 | ||||
-rw-r--r-- | tests/bot/utils/test_services.py | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/bot/exts/recruitment/talentpool/_cog.py b/bot/exts/recruitment/talentpool/_cog.py index 452ae595d..74d28dc77 100644 --- a/bot/exts/recruitment/talentpool/_cog.py +++ b/bot/exts/recruitment/talentpool/_cog.py @@ -476,7 +476,7 @@ class TalentPool(Cog, name="Talentpool"): await ctx.send(f":x: {target.mention} doesn't have an active nomination.") return - log.trace(f"Changing reason for nomination with id {nomination_id} of actor {actor} to {repr(reason)}") + log.trace(f"Changing reason for nomination with id {nomination_id} of actor {actor} to {reason!r}") try: nomination = await self.api.edit_nomination_entry(nomination_id, actor_id=actor.id, reason=reason) @@ -500,7 +500,7 @@ class TalentPool(Cog, name="Talentpool"): await ctx.send(f":x: The reason's length must not exceed {REASON_MAX_CHARS} characters.") return - log.trace(f"Changing end reason for nomination with id {nomination_id} to {repr(reason)}") + log.trace(f"Changing end reason for nomination with id {nomination_id} to {reason!r}") try: nomination = await self.api.edit_nomination(nomination_id, end_reason=reason) except ResponseCodeError as e: diff --git a/bot/pagination.py b/bot/pagination.py index d96e1369d..e0f40add8 100644 --- a/bot/pagination.py +++ b/bot/pagination.py @@ -292,7 +292,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) check = partial( diff --git a/tests/bot/utils/test_services.py b/tests/bot/utils/test_services.py index d0e801299..3c9e037ce 100644 --- a/tests/bot/utils/test_services.py +++ b/tests/bot/utils/test_services.py @@ -42,7 +42,7 @@ class PasteTests(unittest.IsolatedAsyncioTestCase): self.bot.http_session.post.return_value.__aenter__.return_value = response for expected_output, extension in test_cases: - with self.subTest(msg=f"Send contents with extension {repr(extension)}"): + with self.subTest(msg=f"Send contents with extension {extension!r}"): self.assertEqual( await send_to_paste_service("", extension=extension), expected_output |