From 09b05422a687f0d3e1fb309aacf7c6d58309b2fc Mon Sep 17 00:00:00 2001 From: Dave Halter Date: Fri, 25 Aug 2017 21:02:56 +0200 Subject: [PATCH] Fix an issue with continue error detection. --- parso/python/errors.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parso/python/errors.py b/parso/python/errors.py index c76425e..a39b678 100644 --- a/parso/python/errors.py +++ b/parso/python/errors.py @@ -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]