Fixed for mypy 0.501.
The List and Dict types are no longer implicitly available. They must be imported from typing. Type annotations must appear before the doc comment in a function. Also fix type errors in these functions that weren't detected before.
This commit is contained in:
@@ -5,7 +5,7 @@ from __future__ import absolute_import
|
||||
from .ast import Def, Var, Apply
|
||||
|
||||
try:
|
||||
from typing import Union, Iterator, Sequence, Iterable # noqa
|
||||
from typing import Union, Iterator, Sequence, Iterable, List, Dict # noqa
|
||||
from .ast import Expr # noqa
|
||||
DefApply = Union[Def, Apply]
|
||||
except ImportError:
|
||||
|
||||
Reference in New Issue
Block a user