You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you have ... in a relative import, the parser crashes:
from ... import a
Here's the stack trace:
Traceback (most recent call last):
File "scripts/mypy", line 169, in <module>
main()
File "scripts/mypy", line 34, in main
type_check_only(path, module, bin_dir, options)
File "scripts/mypy", line 78, in type_check_only
python_path=options.python_path)
File "/home/jukka/project/mypy/mypy/build.py", line 164, in build
result = manager.process(UnprocessedFile(info, program_text))
File "/home/jukka/project/mypy/mypy/build.py", line 342, in process
next.process()
File "/home/jukka/project/mypy/mypy/build.py", line 660, in process
tree = self.parse(self.program_text, self.path)
File "/home/jukka/project/mypy/mypy/build.py", line 739, in parse
custom_typing_module=self.manager.custom_typing_module)
File "/home/jukka/project/mypy/mypy/parse.py", line 80, in parse
tree = parser.parse(s)
File "/home/jukka/project/mypy/mypy/parse.py", line 117, in parse
file = self.parse_file()
File "/home/jukka/project/mypy/mypy/parse.py", line 125, in parse_file
defs = self.parse_defs()
File "/home/jukka/project/mypy/mypy/parse.py", line 248, in parse_defs
defn, is_simple = self.parse_statement()
File "/home/jukka/project/mypy/mypy/parse.py", line 668, in parse_statement
stmt = self.parse_import_from()
File "/home/jukka/project/mypy/mypy/parse.py", line 176, in parse_import_from
name = self.parse_qualified_name()
File "/home/jukka/project/mypy/mypy/parse.py", line 234, in parse_qualified_name
tok = self.expect_type(Name)
File "/home/jukka/project/mypy/mypy/parse.py", line 1529, in expect_type
self.parse_error()
File "/home/jukka/project/mypy/mypy/parse.py", line 1547, in parse_error
self.parse_error_at(self.current())
File "/home/jukka/project/mypy/mypy/parse.py", line 1558, in parse_error_at
msg = 'Parse error before {}'.format(token_repr(tok))
File "/home/jukka/project/mypy/mypy/parse.py", line 1672, in token_repr
raise ValueError('Unknown token {}'.format(repr(tok)))
ValueError: Unknown token EllipsisToken( ...)
The text was updated successfully, but these errors were encountered:
If you have
...
in a relative import, the parser crashes:Here's the stack trace:
The text was updated successfully, but these errors were encountered: