From ecab104977c50becbed099f6932ce35c1c0ea814 Mon Sep 17 00:00:00 2001 From: Eric Eastwood Date: Tue, 28 Jul 2026 18:11:26 -0500 Subject: [PATCH] Fix `builtins.TypeError: unsupported operand type(s) for |: 'str' and 'NoneType'` --- synapse/events/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/synapse/events/__init__.py b/synapse/events/__init__.py index 802bda2139..cab2fe1a46 100644 --- a/synapse/events/__init__.py +++ b/synapse/events/__init__.py @@ -213,7 +213,7 @@ class StrippedStateEvent: } @staticmethod - def from_json_dict(raw_stripped_event: JsonDict) -> "StrippedStateEvent" | None: + def from_json_dict(raw_stripped_event: JsonDict) -> "StrippedStateEvent | None": """ Given a raw value from an event's `unsigned` field, attempt to parse it into a `StrippedStateEvent`.