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
{{ message }}
Repository navigation
Stugben: Handling files with file encoding comment #3726
This is probably happening because ast27_parse_impl converts source from bytes to string and tries to parse it without caring about source code encoding comment.
PEP 263 says:
If a Unicode string with a coding declaration is passed to compile() , a SyntaxError will be raised.
Activity
gvanrossum commentedon Jul 18, 2017
IMO stubgen should be made to understand encoding declarations the same way mypy does.