Repository navigation
Closed
Labels
bugmypy got something wrongmypy got something wrong
Description
This causes a parser crash (Python 3 mode):
x u''
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 250, in parse_defs
self.expect_break()
File "/home/jukka/project/mypy/mypy/parse.py", line 1535, in expect_break
return self.expect_type(Break)
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 1674, in token_repr
raise ValueError('Unknown token {}'.format(repr(tok)))
ValueError: Unknown token UnicodeLit( u'')
Metadata
Metadata
Assignees
Labels
bugmypy got something wrongmypy got something wrong
Activity