From 90ee91652992bb114f3cf075f276702e9db5d2eb Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Wed, 27 May 2026 13:23:38 +0100 Subject: [PATCH] Comment on type ignore --- tests/rest/client/test_third_party_rules.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/rest/client/test_third_party_rules.py b/tests/rest/client/test_third_party_rules.py index b2f9ee6321..5eaa6f9fb2 100644 --- a/tests/rest/client/test_third_party_rules.py +++ b/tests/rest/client/test_third_party_rules.py @@ -236,6 +236,9 @@ class ThirdPartyRulesTestCase(unittest.FederatingHomeserverTestCase): async def check( ev: EventBase, state: StateMap[EventBase] ) -> tuple[bool, JsonDict | None]: + # Try and modify the content, this will fail because the event is + # immutable. (We therefore need the type ignore linter, as the + # linter will pick this bug up) ev.content = {"x": "y"} # type: ignore[misc] return True, None