mirror of https://github.com/zulip/zulip.git
mypy: Amend mention.py to ensure return of Set[Text].
This commit is contained in:
parent
e6daee441b
commit
4be2ada055
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue