From 48c5b299b62c9e63e614dc3e98c9b2b3e1018bff Mon Sep 17 00:00:00 2001 From: Eklavya Sharma Date: Thu, 16 Jun 2016 16:41:34 +0530 Subject: [PATCH] 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]]`. --- zerver/lib/bugdown/codehilite.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/zerver/lib/bugdown/codehilite.py b/zerver/lib/bugdown/codehilite.py index 2416e79ed0..c445025a34 100644 --- a/zerver/lib/bugdown/codehilite.py +++ b/zerver/lib/bugdown/codehilite.py @@ -18,6 +18,8 @@ Dependencies: """ +from typing import Any, Dict, List + import markdown try: from pygments import highlight @@ -202,7 +204,7 @@ class CodeHiliteExtension(markdown.Extension): "Set class name for wrapper
- Default: codehilite"], 'pygments_style' : ['default', 'Pygments HTML Formatter Style (Colorscheme) - Default: default'], 'noclasses': [False, 'Use inline styles instead of CSS classes - Default false'] - } + } # type: Dict[str, List[Any]] # Override defaults with user settings for key, value in configs: