From 3f23d26a4fe42e204ea3c337e2ccb69602cd5365 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs=20Legan=C3=A9s=20Combarro=20=22Piranna=22?= Date: Wed, 18 Apr 2012 22:28:57 +0200 Subject: Added email --- AUTHORS | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/AUTHORS b/AUTHORS index 10b68b8..6f41cbc 100644 --- a/AUTHORS +++ b/AUTHORS @@ -4,6 +4,4 @@ This module contains code (namely the lexer and filter mechanism) from the pygments project that was written by Georg Brandl. Alphabetical list of contributors: -* Jesús Leganés Combarro - - +* Jesús Leganés Combarro \ No newline at end of file -- cgit v1.2.1 From 85ce0e5990930f0baa8ba37c6523d873824394e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs=20Legan=C3=A9s=20Combarro=20=22Piranna=22?= Date: Mon, 23 Apr 2012 01:41:31 +0200 Subject: Added Quest to authors and little convention fixed --- AUTHORS | 3 ++- sqlparse/filters.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/AUTHORS b/AUTHORS index 6f41cbc..dd60070 100644 --- a/AUTHORS +++ b/AUTHORS @@ -4,4 +4,5 @@ This module contains code (namely the lexer and filter mechanism) from the pygments project that was written by Georg Brandl. Alphabetical list of contributors: -* Jesús Leganés Combarro \ No newline at end of file +* Jesús Leganés Combarro "Piranna" +* quest \ No newline at end of file diff --git a/sqlparse/filters.py b/sqlparse/filters.py index bfa757d..99ef80c 100644 --- a/sqlparse/filters.py +++ b/sqlparse/filters.py @@ -219,7 +219,7 @@ class StripWhitespaceFilter(Filter): self._stripws_default(tlist) def process(self, stack, stmt, depth=0): - [self.process(stack, sgroup, depth+1) + [self.process(stack, sgroup, depth + 1) for sgroup in stmt.get_sublists()] self._stripws(stmt) if depth == 0 and stmt.tokens[-1].is_whitespace(): @@ -493,6 +493,7 @@ class SerializerUnicode(Filter): res += '\n' return res + def Tokens2Unicode(stream): result = "" -- cgit v1.2.1 From 28f9c777545bb18fd3141568e2a25de685c3c30f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs=20Legan=C3=A9s=20Combarro?= Date: Fri, 27 Apr 2012 10:52:31 +0300 Subject: Re-use of parsestream() for parse() (they are almost equal) --- sqlparse/__init__.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sqlparse/__init__.py b/sqlparse/__init__.py index 58a560c..a380e33 100644 --- a/sqlparse/__init__.py +++ b/sqlparse/__init__.py @@ -26,13 +26,11 @@ def parse(sql): Returns a tuple of :class:`~sqlparse.sql.Statement` instances. """ - stack = engine.FilterStack() - stack.full_analyze() - return tuple(stack.run(sql)) + return tuple(parsestream(sql)) def parsestream(stream): - """Pares sql statements from file-like object. + """Parse sql statements from file-like object. Returns a generator of Statement instances. """ -- cgit v1.2.1