mypy: Add note re mypy supporting only global type aliases.

https://github.com/python/mypy/issues/3145
This commit is contained in:
neiljp (Neil Pilgrim) 2017-08-03 17:23:09 -07:00 committed by Tim Abbott
parent 6bed9da353
commit 6ac6d6ff5d
1 changed files with 3 additions and 1 deletions

View File

@ -11,7 +11,9 @@ from .printer import print_err, colors
from typing import cast, Any, Callable, Dict, List, Optional, Tuple 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): def build_custom_checkers(by_lang):
# type: (Dict[str, List[str]]) -> Tuple[Callable[[], bool], Callable[[], bool]] # type: (Dict[str, List[str]]) -> Tuple[Callable[[], bool], Callable[[], bool]]