Skip to content

Commit

Permalink
public_inbox: Make returning None explicit
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
mripard committed Jul 15, 2024
1 parent 14fedc2 commit 7b96454
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions did/plugins/public_inbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down

0 comments on commit 7b96454

Please sign in to comment.