Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
markdown: Fix AlertWordNotificationProcessor.run type.
Anders Kaseorgb48bdc65b953
diff --git a/zerver/lib/markdown/__init__.py b/zerver/lib/markdown/__init__.pyindex cf605191fb2..45f82929246 100644--- a/zerver/lib/markdown/__init__.py+++ b/zerver/lib/markdown/__init__.py@@ -11,19 +11,7 @@ import urllib.parsefrom collections import defaultdict, dequefrom dataclasses import dataclassfrom io import StringIO-from typing import (- Any,- Callable,- Dict,- Generic,- Iterable,- List,- Optional,- Set,- Tuple,- TypeVar,- Union,-)+from typing import Any, Callable, Dict, Generic, List, Optional, Set, Tuple, TypeVar, Unionfrom typing.re import Match, Patternfrom urllib.parse import urlencode, urlsplitfrom xml.etree import ElementTree as etree@@ -1817,7 +1805,7 @@ class AlertWordNotificationProcessor(markdown.preprocessors.Preprocessor):return Truereturn False- def run(self, lines: Iterable[str]) -> Iterable[str]:+ def run(self, lines: List[str]) -> List[str]:db_data = self.md.zulip_db_dataif self.md.zulip_message and db_data is not None:# We check for alert words here, the set of which are