Skip to content

armgit / zulip

Public Imported from GitHub
0

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__.py
index cf605191fb2..45f82929246 100644
--- a/zerver/lib/markdown/__init__.py
+++ b/zerver/lib/markdown/__init__.py
@@ -11,19 +11,7 @@ import urllib.parse
from collections import defaultdict, deque
from dataclasses import dataclass
from 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, Union
from typing.re import Match, Pattern
from urllib.parse import urlencode, urlsplit
from xml.etree import ElementTree as etree
@@ -1817,7 +1805,7 @@ class AlertWordNotificationProcessor(markdown.preprocessors.Preprocessor):
return True
return False
- def run(self, lines: Iterable[str]) -> Iterable[str]:
+ def run(self, lines: List[str]) -> List[str]:
db_data = self.md.zulip_db_data
if self.md.zulip_message and db_data is not None:
# We check for alert words here, the set of which are