From 6ac6d6ff5d3b230a7cfcb479a2967662bcdf7973 Mon Sep 17 00:00:00 2001 From: "neiljp (Neil Pilgrim)" Date: Thu, 3 Aug 2017 17:23:09 -0700 Subject: [PATCH] mypy: Add note re mypy supporting only global type aliases. https://github.com/python/mypy/issues/3145 --- tools/linter_lib/custom_check.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/linter_lib/custom_check.py b/tools/linter_lib/custom_check.py index ad9eb0a563..ca9378c705 100644 --- a/tools/linter_lib/custom_check.py +++ b/tools/linter_lib/custom_check.py @@ -11,7 +11,9 @@ from .printer import print_err, colors from typing import cast, Any, Callable, Dict, List, Optional, Tuple -RuleList = List[Dict[str, Any]] +RuleList = List[Dict[str, Any]] # mypy currently requires Aliases at global scope +# https://github.com/python/mypy/issues/3145 + def build_custom_checkers(by_lang): # type: (Dict[str, List[str]]) -> Tuple[Callable[[], bool], Callable[[], bool]]