From 45c1f595ea61dee891b6f4b5b6c4692df6423bb4 Mon Sep 17 00:00:00 2001 From: Andi Albrecht Date: Thu, 11 Jun 2009 21:01:22 +0200 Subject: Cleaned up some unused imports. --- sqlparse/engine/__init__.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'sqlparse/engine/__init__.py') diff --git a/sqlparse/engine/__init__.py b/sqlparse/engine/__init__.py index 6852f7d..055025e 100644 --- a/sqlparse/engine/__init__.py +++ b/sqlparse/engine/__init__.py @@ -5,9 +5,7 @@ """filter""" -import re - -from sqlparse import lexer, SQLParseError +from sqlparse import lexer from sqlparse.engine import grouping from sqlparse.engine.filter import StatementFilter @@ -58,23 +56,23 @@ class FilterStack(object): stream = _group(stream) if self.stmtprocess: - def _run(stream): + def _run1(stream): ret = [] for stmt in stream: for filter_ in self.stmtprocess: filter_.process(self, stmt) ret.append(stmt) return ret - stream = _run(stream) + stream = _run1(stream) if self.postprocess: - def _run(stream): + def _run2(stream): for stmt in stream: stmt.tokens = list(self._flatten(stmt.tokens)) for filter_ in self.postprocess: stmt = filter_.process(self, stmt) yield stmt - stream = _run(stream) + stream = _run2(stream) return stream -- cgit v1.2.1