Show More
@@ -142,7 +142,7 b' def find_next_indent(code):' | |||||
142 | tokens.pop() |
|
142 | tokens.pop() | |
143 | if not tokens: |
|
143 | if not tokens: | |
144 | return 0 |
|
144 | return 0 | |
145 |
|
|
145 | while (tokens[-1].type in {tokenize.DEDENT, tokenize.NEWLINE, tokenize.COMMENT}): | |
146 | tokens.pop() |
|
146 | tokens.pop() | |
147 |
|
147 | |||
148 | if tokens[-1].type == INCOMPLETE_STRING: |
|
148 | if tokens[-1].type == INCOMPLETE_STRING: |
@@ -629,6 +629,9 b' indentation_samples = [' | |||||
629 | ' 1,', 5), |
|
629 | ' 1,', 5), | |
630 | ('b = """123', 0), |
|
630 | ('b = """123', 0), | |
631 | ('', 0), |
|
631 | ('', 0), | |
|
632 | ('def f():\n pass', 0), | |||
|
633 | ('class Bar:\n def f():\n pass', 4), | |||
|
634 | ('class Bar:\n def f():\n raise', 4), | |||
632 | ] |
|
635 | ] | |
633 |
|
636 | |||
634 | def test_find_next_indent(): |
|
637 | def test_find_next_indent(): |
General Comments 0
You need to be logged in to leave comments.
Login now