Fix an issue with continue error detection.

This commit is contained in:
Dave Halter
2017-08-25 21:02:56 +02:00
parent f3db064d7d
commit 09b05422a6

View File

@@ -434,7 +434,7 @@ class _ContinueChecks(SyntaxRule):
def is_issue(self, leaf):
in_loop = False
for block in self._normalizer.context.blocks:
if block.type == 'for_stmt':
if block.type in ('for_stmt', 'while_stmt'):
in_loop = True
if block.type == 'try_stmt':
last_block = block.children[-3]