From b3eb4d63396fa67d059041c5a9eefb9ce64ef30b Mon Sep 17 00:00:00 2001 From: Ryan Leckey Date: Wed, 23 Oct 2013 00:02:07 -0700 Subject: [PATCH] Minor clean up according to flake8. --- sqlalchemy_utils/__init__.py | 4 ++++ sqlalchemy_utils/functions/__init__.py | 3 +-- tests/test_utility_functions.py | 1 - 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/sqlalchemy_utils/__init__.py b/sqlalchemy_utils/__init__.py index 3bb620e..f4425f9 100644 --- a/sqlalchemy_utils/__init__.py +++ b/sqlalchemy_utils/__init__.py @@ -6,6 +6,7 @@ from .functions import ( primary_keys, render_statement, render_expression, + create_mock_engine, mock_engine, sort_query, table_name, @@ -53,6 +54,9 @@ __all__ = ( primary_keys, proxy_dict, render_statement, + render_expression, + create_mock_engine, + mock_engine, sort_query, table_name, with_backrefs, diff --git a/sqlalchemy_utils/functions/__init__.py b/sqlalchemy_utils/functions/__init__.py index ee234de..98c34d3 100644 --- a/sqlalchemy_utils/functions/__init__.py +++ b/sqlalchemy_utils/functions/__init__.py @@ -7,7 +7,6 @@ import inspect import sqlalchemy as sa from sqlalchemy.orm.query import Query from sqlalchemy.schema import MetaData, Table, ForeignKeyConstraint -from sqlalchemy.engine import url from six.moves import cStringIO from .batch_fetch import batch_fetch, with_backrefs, CompositePath from .defer_except import defer_except @@ -323,7 +322,7 @@ def mock_engine(engine, stream=None): # Evaluate the expression and get the target engine. - frame.f_locals['__mock'] = mock = create_mock_engine(target, stream) + frame.f_locals['__mock'] = create_mock_engine(target, stream) # Replace the target with our mock. diff --git a/tests/test_utility_functions.py b/tests/test_utility_functions.py index 2cc9a39..b0242b1 100644 --- a/tests/test_utility_functions.py +++ b/tests/test_utility_functions.py @@ -2,7 +2,6 @@ import sqlalchemy as sa from sqlalchemy_utils import escape_like from sqlalchemy_utils.functions import naturally_equivalent from tests import TestCase -from six.moves import cStringIO from sqlalchemy_utils.functions import ( non_indexed_foreign_keys, render_statement,