Skip to content

Commit 775f575

Browse files
committed
Use new parser to parse strings into types
1 parent 6b0c77b commit 775f575

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

mypy/fastparse.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
from mypy import defaults
2424
from mypy import experiments
2525
from mypy import hooks
26-
from mypy.parsetype import parse_str_as_type
2726
from mypy.errors import Errors
2827

2928
try:
@@ -100,7 +99,7 @@ def pop_and_convert(name):
10099
if t is None:
101100
return AnyType()
102101
else:
103-
return parse_str_as_type(t, line)
102+
return parse_type_comment(t, line=line)
104103

105104
if hooks.docstring_parser is not None:
106105
type_map = hooks.docstring_parser(docstring)

0 commit comments

Comments
 (0)