bndr / bndr/pycycle

does not handle lines broken with "\" well

Aperta
#4 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub
bug
Lingua principale
Python
Stelle
363
Fork
24
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

I get parse errors on python code with lines broken with a backslash character like:
```python
assert True, \
"This is valid python, right?"
```

It gives output:
```python
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 "", line 2

^
SyntaxError: invalid syntax
```

#### Expected:
Also python code with backslash ending lines is parsed correctly.

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.