diff --git a/mypy/fastparse.py b/mypy/fastparse.py index 18a844a75b9a..5f1d6ab67ca0 100644 --- a/mypy/fastparse.py +++ b/mypy/fastparse.py @@ -23,7 +23,6 @@ from mypy import defaults from mypy import experiments from mypy import hooks -from mypy.parsetype import parse_str_as_type from mypy.errors import Errors try: @@ -100,7 +99,7 @@ def pop_and_convert(name): if t is None: return AnyType() else: - return parse_str_as_type(t, line) + return parse_type_comment(t, line=line) if hooks.docstring_parser is not None: type_map = hooks.docstring_parser(docstring)