Skip to content

Commit d66b924

Browse files
jdufresnevmuriart
authored andcommitted
Fix _flatten_up_to_token() to be PEP 479 compatible
Fixes warning during tests: PendingDeprecationWarning: generator 'ReindentFilter._flatten_up_to_token' raised StopIteration PEP 479 documentation: https://www.python.org/dev/peps/pep-0479/
1 parent b9f01ac commit d66b924

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

sqlparse/filters/reindent.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def _flatten_up_to_token(self, token):
3030

3131
for t in self._curr_stmt.flatten():
3232
if t == token:
33-
raise StopIteration
33+
break
3434
yield t
3535

3636
@property

0 commit comments

Comments
 (0)