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:
Eklavya Sharma 2016-06-16 16:41:34 +05:30 committed by Tim Abbott
parent a485d63975
commit 48c5b299b6
1 changed files with 3 additions and 1 deletions

View File

@ -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: