From 4be2ada05563ef8143afc1b65f15375045161060 Mon Sep 17 00:00:00 2001 From: "neiljp (Neil Pilgrim)" Date: Sun, 24 Sep 2017 16:16:07 -0700 Subject: [PATCH] mypy: Amend mention.py to ensure return of Set[Text]. --- zerver/lib/mention.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zerver/lib/mention.py b/zerver/lib/mention.py index ec74df33f7..90c48a9368 100644 --- a/zerver/lib/mention.py +++ b/zerver/lib/mention.py @@ -28,6 +28,6 @@ def extract_name(s): def possible_mentions(content): # type: (Text) -> Set[Text] matches = re.findall(find_mentions, content) - names = {extract_name(match) for match in matches} - names = {name for name in names if name} + names_with_none = {extract_name(match) for match in matches} + names = {name for name in names_with_none if name} return names