mirror of https://github.com/zulip/zulip.git
zerver/lib/bugdown/codehilite.py: Add type annotation.
Mypy incorrectly infers a dict's type as `Dict[str, List[object]]`. Change that to `Dict[str, List[Any]]`.
This commit is contained in:
parent
a485d63975
commit
48c5b299b6
|
@ -18,6 +18,8 @@ Dependencies:
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
from typing import Any, Dict, List
|
||||||
|
|
||||||
import markdown
|
import markdown
|
||||||
try:
|
try:
|
||||||
from pygments import highlight
|
from pygments import highlight
|
||||||
|
@ -202,7 +204,7 @@ class CodeHiliteExtension(markdown.Extension):
|
||||||
"Set class name for wrapper <div> - Default: codehilite"],
|
"Set class name for wrapper <div> - Default: codehilite"],
|
||||||
'pygments_style' : ['default', 'Pygments HTML Formatter Style (Colorscheme) - Default: default'],
|
'pygments_style' : ['default', 'Pygments HTML Formatter Style (Colorscheme) - Default: default'],
|
||||||
'noclasses': [False, 'Use inline styles instead of CSS classes - Default false']
|
'noclasses': [False, 'Use inline styles instead of CSS classes - Default false']
|
||||||
}
|
} # type: Dict[str, List[Any]]
|
||||||
|
|
||||||
# Override defaults with user settings
|
# Override defaults with user settings
|
||||||
for key, value in configs:
|
for key, value in configs:
|
||||||
|
|
Loading…
Reference in New Issue