From b87ae89e8610f76c9902c46644bdca6fd4e83607 Mon Sep 17 00:00:00 2001 From: Andi Albrecht Date: Tue, 25 Oct 2016 11:13:57 +0200 Subject: Make reindent more robust regarding max recursion errors. --- sqlparse/filters/reindent.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sqlparse') diff --git a/sqlparse/filters/reindent.py b/sqlparse/filters/reindent.py index bf1f139..a7f78be 100644 --- a/sqlparse/filters/reindent.py +++ b/sqlparse/filters/reindent.py @@ -168,7 +168,8 @@ class ReindentFilter(object): def _process_default(self, tlist, stmts=True): self._split_statements(tlist) if stmts else None self._split_kwds(tlist) - [self._process(sgroup) for sgroup in tlist.get_sublists()] + for sgroup in tlist.get_sublists(): + self._process(sgroup) def process(self, stmt): self._curr_stmt = stmt -- cgit v1.2.1