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.

fenced_code: Use immutable type for codehilite_conf.

Anders Kaseorge7e1fde6ec96
diff --git a/zerver/lib/markdown/fenced_code.py b/zerver/lib/markdown/fenced_code.py
index d321a2b2cad..fa962d7eb75 100644
--- a/zerver/lib/markdown/fenced_code.py
+++ b/zerver/lib/markdown/fenced_code.py
@@ -76,7 +76,7 @@ Dependencies:
"""
import re
-from typing import Any, Dict, Iterable, List, Mapping, MutableSequence, Optional
+from typing import Any, Iterable, List, Mapping, MutableSequence, Optional, Sequence
import lxml.html
from django.utils.html import escape
@@ -329,7 +329,7 @@ class FencedBlockPreprocessor(Preprocessor):
self.checked_for_codehilite = False
self.run_content_validators = run_content_validators
- self.codehilite_conf: Dict[str, List[Any]] = {}
+ self.codehilite_conf: Mapping[str, Sequence[Any]] = {}
def push(self, handler: BaseHandler) -> None:
self.handlers.append(handler)