We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I get parse errors on python code with lines broken with a backslash character like:
assert True, \ "This is valid python, right?"
It gives output:
Parsing of file failed: valid.py Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/pycycle/utils.py", line 70, in read_project tree = ast.parse('\n'.join(lines)) File "/usr/lib/python2.7/ast.py", line 37, in parse return compile(source, filename, mode, PyCF_ONLY_AST) File "<unknown>", line 2 ^ SyntaxError: invalid syntax
Also python code with backslash ending lines is parsed correctly.
The text was updated successfully, but these errors were encountered:
Thanks for reporting! I'll look into it
Sorry, something went wrong.
This seems to fix it (utils.py):
- lines = f.readlines() - tree = ast.parse('\n'.join(lines)) + file_data = f.read() + lines = file_data.splitlines() + tree = ast.parse(file_data)
can you submit a pull request, so I can directly merge it?
fix for #4 with lines broken with a backslash character
71ce063
No branches or pull requests
I get parse errors on python code with lines broken with a backslash character like:
It gives output:
Expected:
Also python code with backslash ending lines is parsed correctly.
The text was updated successfully, but these errors were encountered: