From 7b964541375f1ad927d3b2e6b94dbf8ddb349dfc Mon Sep 17 00:00:00 2001 From: Maxime Ripard Date: Mon, 15 Jul 2024 11:49:27 +0200 Subject: [PATCH] public_inbox: Make returning None explicit The PublicInbox.__fetch_thread_root method returns None implicitly at the end of the function. Let's use an explicit return statement to make it more obvious. Signed-off-by: Maxime Ripard --- did/plugins/public_inbox.py | 1 + 1 file changed, 1 insertion(+) diff --git a/did/plugins/public_inbox.py b/did/plugins/public_inbox.py index da006f8e..3279c61f 100644 --- a/did/plugins/public_inbox.py +++ b/did/plugins/public_inbox.py @@ -143,6 +143,7 @@ def __fetch_thread_root(self, msg: Message) -> typing.Optional[Message]: return msg log.warn("Couldn't find message root") + return None def __get_thread_root(self, msg: Message) -> typing.Optional[Message]: log.debug("Looking for thread root of message %s" % msg.id())