Show More
@@ -674,8 +674,8 b' class TransformerManager:' | |||||
674 | while tokens_by_line[-1] and tokens_by_line[-1][-1].type in newline_types: |
|
674 | while tokens_by_line[-1] and tokens_by_line[-1][-1].type in newline_types: | |
675 | tokens_by_line[-1].pop() |
|
675 | tokens_by_line[-1].pop() | |
676 |
|
676 | |||
677 |
if |
|
677 | if not tokens_by_line[-1]: | |
678 |
return 'incomplete', |
|
678 | return 'incomplete', find_last_indent(lines) | |
679 |
|
679 | |||
680 | if tokens_by_line[-1][-1].string == ':': |
|
680 | if tokens_by_line[-1][-1].string == ':': | |
681 | # The last line starts a block (e.g. 'if foo:') |
|
681 | # The last line starts a block (e.g. 'if foo:') |
@@ -265,6 +265,8 b' def test_check_complete():' | |||||
265 | for k in short: |
|
265 | for k in short: | |
266 | cc(c+k) |
|
266 | cc(c+k) | |
267 |
|
267 | |||
|
268 | nt.assert_equal(cc("def f():\n x=0\n \\\n "), ('incomplete', 2)) | |||
|
269 | ||||
268 | def test_check_complete_II(): |
|
270 | def test_check_complete_II(): | |
269 | """ |
|
271 | """ | |
270 | Test that multiple line strings are properly handled. |
|
272 | Test that multiple line strings are properly handled. |
General Comments 0
You need to be logged in to leave comments.
Login now