aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorGravatar Joe Banks <[email protected]>2025-10-30 21:26:14 +0000
committerGravatar Joe Banks <[email protected]>2025-11-10 18:41:30 +0000
commit3d17675d2a06db60f4a1ce14f9afe4b1301cccaa (patch)
treeec5cbe05437a03b4911702a233e1cf8801ba9aff /tests
parentUpdate Ruff to latest version 0.14.2 (diff)
Ruff fixes for Python 3.14 and Ruff 0.14.2
Diffstat (limited to 'tests')
-rw-r--r--tests/bot/exts/moderation/test_incidents.py8
-rw-r--r--tests/bot/utils/test_messages.py3
2 files changed, 6 insertions, 5 deletions
diff --git a/tests/bot/exts/moderation/test_incidents.py b/tests/bot/exts/moderation/test_incidents.py
index 444bb1142..239240251 100644
--- a/tests/bot/exts/moderation/test_incidents.py
+++ b/tests/bot/exts/moderation/test_incidents.py
@@ -112,7 +112,7 @@ class TestMakeEmbed(unittest.IsolatedAsyncioTestCase):
async def test_make_embed_actioned(self):
"""Embed is coloured green and footer contains 'Actioned' when `outcome=Signal.ACTIONED`."""
- embed, file = await incidents.make_embed(
+ embed, _file = await incidents.make_embed(
incident=MockMessage(created_at=CURRENT_TIME),
outcome=incidents.Signal.ACTIONED,
actioned_by=MockMember()
@@ -123,7 +123,7 @@ class TestMakeEmbed(unittest.IsolatedAsyncioTestCase):
async def test_make_embed_not_actioned(self):
"""Embed is coloured red and footer contains 'Rejected' when `outcome=Signal.NOT_ACTIONED`."""
- embed, file = await incidents.make_embed(
+ embed, _file = await incidents.make_embed(
incident=MockMessage(created_at=CURRENT_TIME),
outcome=incidents.Signal.NOT_ACTIONED,
actioned_by=MockMember()
@@ -139,7 +139,7 @@ class TestMakeEmbed(unittest.IsolatedAsyncioTestCase):
reported_timestamp = discord_timestamp(CURRENT_TIME)
relative_timestamp = discord_timestamp(CURRENT_TIME, TimestampFormats.RELATIVE)
- embed, file = await incidents.make_embed(incident, incidents.Signal.ACTIONED, MockMember())
+ embed, _file = await incidents.make_embed(incident, incidents.Signal.ACTIONED, MockMember())
self.assertEqual(
f"{incident.content}\n\n*Reported {reported_timestamp} ({relative_timestamp}).*",
@@ -808,7 +808,7 @@ class TestMessageLinkEmbeds(TestIncidents):
tests = {
"thisisasingleword"*10: "thisisasinglewordthisisasinglewordthisisasinglewor...",
- "\n".join("Lets make a new line test".split()): "Lets\nmake\na...",
+ "\n".join(["Lets", "make", "a", "new", "line", "test"]): "Lets\nmake\na...",
"Hello, World!" * 300: (
"Hello, World!Hello, World!Hello, World!Hello, World!Hello, World!Hello, World!Hello, World!"
diff --git a/tests/bot/utils/test_messages.py b/tests/bot/utils/test_messages.py
index 9c22c9751..48a62ed1c 100644
--- a/tests/bot/utils/test_messages.py
+++ b/tests/bot/utils/test_messages.py
@@ -9,7 +9,8 @@ class TestMessages(unittest.TestCase):
def test_sub_clyde(self):
"""Uppercase E's and lowercase e's are substituted with their cyrillic counterparts."""
sub_e = "\u0435"
- sub_E = "\u0415" # noqa: N806: Uppercase E in variable name
+ # N806 fires for upper-case E in variable name.
+ sub_E = "\u0415" # noqa: N806
test_cases = (
(None, None),