]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
juts a 'expected 2 blank lines' pep8 pass
authorDiana Clarke <diana.joan.clarke@gmail.com>
Tue, 20 Nov 2012 04:29:08 +0000 (23:29 -0500)
committerDiana Clarke <diana.joan.clarke@gmail.com>
Tue, 20 Nov 2012 04:29:08 +0000 (23:29 -0500)
24 files changed:
lib/sqlalchemy/dialects/__init__.py
lib/sqlalchemy/dialects/firebird/base.py
lib/sqlalchemy/dialects/firebird/fdb.py
lib/sqlalchemy/dialects/firebird/kinterbasdb.py
lib/sqlalchemy/dialects/informix/base.py
lib/sqlalchemy/dialects/informix/informixdb.py
lib/sqlalchemy/dialects/mssql/adodbapi.py
lib/sqlalchemy/dialects/mssql/base.py
lib/sqlalchemy/dialects/mssql/information_schema.py
lib/sqlalchemy/dialects/mssql/mxodbc.py
lib/sqlalchemy/dialects/mssql/pymssql.py
lib/sqlalchemy/dialects/mssql/pyodbc.py
lib/sqlalchemy/dialects/mssql/zxjdbc.py
lib/sqlalchemy/dialects/mysql/base.py
lib/sqlalchemy/dialects/mysql/mysqlconnector.py
lib/sqlalchemy/dialects/mysql/mysqldb.py
lib/sqlalchemy/dialects/mysql/oursql.py
lib/sqlalchemy/dialects/mysql/pymysql.py
lib/sqlalchemy/dialects/mysql/pyodbc.py
lib/sqlalchemy/dialects/mysql/zxjdbc.py
lib/sqlalchemy/dialects/oracle/base.py
lib/sqlalchemy/dialects/oracle/cx_oracle.py
lib/sqlalchemy/dialects/oracle/zxjdbc.py
lib/sqlalchemy/testing/plugin/noseplugin.py

index 2d400aa60d0d6bec67c3f2c749f166d615c2729f..af0dc37eab8870b4831ddf9a154debe401614a40 100644 (file)
@@ -18,6 +18,7 @@ __all__ = (
 
 from .. import util
 
+
 def _auto_fn(name):
     """default dialect importer.
 
index df20060e58276d8d3f3242d71aa34bcca531889b..d40ca30dff4c692facc84587d2d6d07b49c4e15e 100644 (file)
@@ -130,6 +130,7 @@ class _StringType(sqltypes.String):
         self.charset = charset
         super(_StringType, self).__init__(**kw)
 
+
 class VARCHAR(_StringType, sqltypes.VARCHAR):
     """Firebird VARCHAR type"""
     __visit_name__ = 'VARCHAR'
@@ -137,6 +138,7 @@ class VARCHAR(_StringType, sqltypes.VARCHAR):
     def __init__(self, length=None, **kwargs):
         super(VARCHAR, self).__init__(length=length, **kwargs)
 
+
 class CHAR(_StringType, sqltypes.CHAR):
     """Firebird CHAR type"""
     __visit_name__ = 'CHAR'
index aac3579d6f1c6fae94a2f1776b37c595ebee9cea..ce872d562313f52ec4469b8626fdb0ab45b8b80a 100644 (file)
@@ -26,6 +26,7 @@ The fdb dialect is new and not yet tested (can't get fdb to build).
 from .kinterbasdb import FBDialect_kinterbasdb
 from ... import util
 
+
 class FBDialect_fdb(FBDialect_kinterbasdb):
 
     @classmethod
index 90fadde50b76a1fc246c50730c4c426508ce673f..cae9f4e3e8da4e6243b76ca7b67d2bb57baa8a44 100644 (file)
@@ -63,6 +63,7 @@ class _FBNumeric_kinterbasdb(sqltypes.Numeric):
                 return value
         return process
 
+
 class FBExecutionContext_kinterbasdb(FBExecutionContext):
     @property
     def rowcount(self):
@@ -72,6 +73,7 @@ class FBExecutionContext_kinterbasdb(FBExecutionContext):
         else:
             return -1
 
+
 class FBDialect_kinterbasdb(FBDialect):
     driver = 'kinterbasdb'
     supports_sane_rowcount = False
index f54bf6d37b991432aa883cac792af7970c77f24a..ee0d3a8312705d51c3228836eb68f0f2a7f6c51b 100644 (file)
@@ -144,7 +144,9 @@ RESERVED_WORDS = set(
     "xadatasource", "xid", "xload", "xunload", "year"
     ])
 
+
 class InfoDateTime(sqltypes.DateTime):
+
     def bind_processor(self, dialect):
         def process(value):
             if value is not None:
@@ -153,7 +155,9 @@ class InfoDateTime(sqltypes.DateTime):
             return value
         return process
 
+
 class InfoTime(sqltypes.Time):
+
     def bind_processor(self, dialect):
         def process(value):
             if value is not None:
@@ -217,7 +221,9 @@ class InfoTypeCompiler(compiler.GenericTypeCompiler):
     def visit_boolean(self, type_):
         return "SMALLINT"
 
+
 class InfoSQLCompiler(compiler.SQLCompiler):
+
     def default_from(self):
         return " from systables where tabname = 'systables' "
 
@@ -337,6 +343,7 @@ class InfoDDLCompiler(compiler.DDLCompiler):
             text += "CONSTRAINT %s " % self.preparer.format_constraint(constraint)
         return text
 
+
 class InformixIdentifierPreparer(compiler.IdentifierPreparer):
 
     reserved_words = RESERVED_WORDS
index 474bc5f11b2710b8b308ac47cf256f4966d3fbf6..2fdccfdc212b8a707ed40ae6cbfec5791f203608 100644 (file)
@@ -21,7 +21,9 @@ from sqlalchemy.engine import default
 
 VERSION_RE = re.compile(r'(\d+)\.(\d+)(.+\d+)')
 
+
 class InformixExecutionContext_informixdb(default.DefaultExecutionContext):
+
     def post_exec(self):
         if self.isinsert:
             self._lastrowid = self.cursor.sqlerrd[1]
index 747ea17db7420c5f87433d64a99a05558ff78ae5..247c1ce8fee2b232b3284eb25a2712062a8b36fd 100644 (file)
@@ -22,6 +22,7 @@ from sqlalchemy import types as sqltypes, util
 from sqlalchemy.dialects.mssql.base import MSDateTime, MSDialect
 import sys
 
+
 class MSDateTime_adodbapi(MSDateTime):
     def result_processor(self, dialect, coltype):
         def process(value):
index 09db05e1fe1ffef2f28b12bde94a9399037810c2..8292d08f16d0968a43ed08f422071401b5ec4bde 100644 (file)
@@ -216,6 +216,7 @@ RESERVED_WORDS = set(
      'writetext',
     ])
 
+
 class REAL(sqltypes.REAL):
     __visit_name__ = 'REAL'
 
@@ -224,6 +225,7 @@ class REAL(sqltypes.REAL):
         kw['precision'] = 24
         super(REAL, self).__init__(**kw)
 
+
 class TINYINT(sqltypes.Integer):
     __visit_name__ = 'TINYINT'
 
@@ -256,6 +258,7 @@ class _MSDate(sqltypes.Date):
                 return value
         return process
 
+
 class TIME(sqltypes.TIME):
     def __init__(self, precision=None, **kwargs):
         self.precision = precision
@@ -287,6 +290,7 @@ class TIME(sqltypes.TIME):
         return process
 _MSTime = TIME
 
+
 class _DateTimeBase(object):
     def bind_processor(self, dialect):
         def process(value):
@@ -296,12 +300,15 @@ class _DateTimeBase(object):
                 return value
         return process
 
+
 class _MSDateTime(_DateTimeBase, sqltypes.DateTime):
     pass
 
+
 class SMALLDATETIME(_DateTimeBase, sqltypes.DateTime):
     __visit_name__ = 'SMALLDATETIME'
 
+
 class DATETIME2(_DateTimeBase, sqltypes.DateTime):
     __visit_name__ = 'DATETIME2'
 
@@ -317,12 +324,14 @@ class DATETIMEOFFSET(sqltypes.TypeEngine):
     def __init__(self, precision=None, **kwargs):
         self.precision = precision
 
+
 class _StringType(object):
     """Base for MSSQL string types."""
 
     def __init__(self, collation=None):
         self.collation = collation
 
+
 class TEXT(_StringType, sqltypes.TEXT):
     """MSSQL TEXT type, for variable-length text up to 2^31 characters."""
 
@@ -336,6 +345,7 @@ class TEXT(_StringType, sqltypes.TEXT):
         _StringType.__init__(self, collation)
         sqltypes.Text.__init__(self, length, **kw)
 
+
 class NTEXT(_StringType, sqltypes.UnicodeText):
     """MSSQL NTEXT type, for variable-length unicode text up to 2^30
     characters."""
@@ -381,6 +391,7 @@ class VARCHAR(_StringType, sqltypes.VARCHAR):
         _StringType.__init__(self, collation)
         sqltypes.VARCHAR.__init__(self, length, **kw)
 
+
 class NVARCHAR(_StringType, sqltypes.NVARCHAR):
     """MSSQL NVARCHAR type.
 
@@ -398,6 +409,7 @@ class NVARCHAR(_StringType, sqltypes.NVARCHAR):
         _StringType.__init__(self, collation)
         sqltypes.NVARCHAR.__init__(self, length, **kw)
 
+
 class CHAR(_StringType, sqltypes.CHAR):
     """MSSQL CHAR type, for fixed-length non-Unicode data with a maximum
     of 8,000 characters."""
@@ -426,6 +438,7 @@ class CHAR(_StringType, sqltypes.CHAR):
         _StringType.__init__(self, collation)
         sqltypes.CHAR.__init__(self, length, **kw)
 
+
 class NCHAR(_StringType, sqltypes.NCHAR):
     """MSSQL NCHAR type.
 
@@ -443,9 +456,11 @@ class NCHAR(_StringType, sqltypes.NCHAR):
         _StringType.__init__(self, collation)
         sqltypes.NCHAR.__init__(self, length, **kw)
 
+
 class IMAGE(sqltypes.LargeBinary):
     __visit_name__ = 'IMAGE'
 
+
 class BIT(sqltypes.TypeEngine):
     __visit_name__ = 'BIT'
 
@@ -453,12 +468,15 @@ class BIT(sqltypes.TypeEngine):
 class MONEY(sqltypes.TypeEngine):
     __visit_name__ = 'MONEY'
 
+
 class SMALLMONEY(sqltypes.TypeEngine):
     __visit_name__ = 'SMALLMONEY'
 
+
 class UNIQUEIDENTIFIER(sqltypes.TypeEngine):
     __visit_name__ = "UNIQUEIDENTIFIER"
 
+
 class SQL_VARIANT(sqltypes.TypeEngine):
     __visit_name__ = 'SQL_VARIANT'
 
@@ -641,6 +659,7 @@ class MSTypeCompiler(compiler.GenericTypeCompiler):
     def visit_SQL_VARIANT(self, type_):
         return 'SQL_VARIANT'
 
+
 class MSExecutionContext(default.DefaultExecutionContext):
     _enable_identity_insert = False
     _select_lastrowid = False
@@ -718,6 +737,7 @@ class MSExecutionContext(default.DefaultExecutionContext):
         else:
             return engine.ResultProxy(self)
 
+
 class MSSQLCompiler(compiler.SQLCompiler):
     returning_precedes_values = True
 
@@ -947,6 +967,7 @@ class MSSQLCompiler(compiler.SQLCompiler):
                                     fromhints=from_hints, **kw)
                     for t in [from_table] + extra_froms)
 
+
 class MSSQLStrictCompiler(MSSQLCompiler):
     """A subclass of MSSQLCompiler which disables the usage of bind
     parameters where not allowed natively by MS-SQL.
@@ -990,6 +1011,7 @@ class MSSQLStrictCompiler(MSSQLCompiler):
             return super(MSSQLStrictCompiler, self).\
                                 render_literal_value(value, type_)
 
+
 class MSDDLCompiler(compiler.DDLCompiler):
     def get_column_specification(self, column, **kwargs):
         colspec = (self.preparer.format_column(column) + " "
@@ -1049,6 +1071,7 @@ class MSIdentifierPreparer(compiler.IdentifierPreparer):
         result = '.'.join([self.quote(x, force) for x in schema.split('.')])
         return result
 
+
 def _db_plus_owner_listing(fn):
     def wrap(dialect, connection, schema=None, **kw):
         dbname, owner = _owner_plus_db(dialect, schema)
@@ -1056,6 +1079,7 @@ def _db_plus_owner_listing(fn):
                             dbname, owner, schema, **kw)
     return update_wrapper(wrap, fn)
 
+
 def _db_plus_owner(fn):
     def wrap(dialect, connection, tablename, schema=None, **kw):
         dbname, owner = _owner_plus_db(dialect, schema)
@@ -1063,6 +1087,7 @@ def _db_plus_owner(fn):
                             tablename, dbname, owner, schema, **kw)
     return update_wrapper(wrap, fn)
 
+
 def _switch_db(dbname, connection, fn, *arg, **kw):
     if dbname:
         current_db = connection.scalar("select db_name()")
@@ -1073,6 +1098,7 @@ def _switch_db(dbname, connection, fn, *arg, **kw):
         if dbname:
             connection.execute("use %s" % current_db)
 
+
 def _owner_plus_db(dialect, schema):
     if not schema:
         return None, dialect.default_schema_name
@@ -1081,6 +1107,7 @@ def _owner_plus_db(dialect, schema):
     else:
         return None, schema
 
+
 class MSDialect(default.DefaultDialect):
     name = 'mssql'
     supports_default_values = True
index 30849e0efa6099c96f004d93a5c89cfea5e47307..bd88a67d897cf91ad2a90149f874ace59208c3ca 100644 (file)
@@ -11,6 +11,7 @@ from ...types import String, Unicode, Integer, TypeDecorator
 
 ischema = MetaData()
 
+
 class CoerceUnicode(TypeDecorator):
     impl = Unicode
 
index 91922a442a931a1bf9c2d7498cbd26d466dc93d4..ccafe0efe081fadabefe8ab8b4a7bde5f30579cf 100644 (file)
@@ -54,6 +54,7 @@ class _MSNumeric_mxodbc(_MSNumeric_pyodbc):
     """Include pyodbc's numeric processor.
     """
 
+
 class _MSDate_mxodbc(_MSDate):
     def bind_processor(self, dialect):
         def process(value):
@@ -63,6 +64,7 @@ class _MSDate_mxodbc(_MSDate):
                 return None
         return process
 
+
 class _MSTime_mxodbc(_MSTime):
     def bind_processor(self, dialect):
         def process(value):
@@ -72,6 +74,7 @@ class _MSTime_mxodbc(_MSTime):
                 return None
         return process
 
+
 class MSExecutionContext_mxodbc(MSExecutionContext_pyodbc):
     """
     The pyodbc execution context is useful for enabling
@@ -82,6 +85,7 @@ class MSExecutionContext_mxodbc(MSExecutionContext_pyodbc):
     #       is really only being used in cases where OUTPUT
     #       won't work.
 
+
 class MSDialect_mxodbc(MxODBCConnector, MSDialect):
 
     # this is only needed if "native ODBC" mode is used,
index 881893422bfeed5d7aac4f3c05c16de40e8ba719..b51e88e36b95a813429ab70c520e2c04bf98c96c 100644 (file)
@@ -28,6 +28,7 @@ from .base import MSDialect
 from ... import types as sqltypes, util, processors
 import re
 
+
 class _MSNumeric_pymssql(sqltypes.Numeric):
     def result_processor(self, dialect, type_):
         if not self.asdecimal:
@@ -35,6 +36,7 @@ class _MSNumeric_pymssql(sqltypes.Numeric):
         else:
             return sqltypes.Numeric.result_processor(self, dialect, type_)
 
+
 class MSDialect_pymssql(MSDialect):
     supports_sane_rowcount = False
     driver = 'pymssql'
index 47a4851b009399deef05fad318e63bb10a024f88..8264347dff09a743ed6910c2fbac4b2884cad1c5 100644 (file)
@@ -116,6 +116,7 @@ from ...connectors.pyodbc import PyODBCConnector
 from ... import types as sqltypes, util
 from ...util.compat import decimal
 
+
 class _MSNumeric_pyodbc(sqltypes.Numeric):
     """Turns Decimals with adjusted() < 0 or > 7 into strings.
 
index 1b36075b07bd957216b4e51b5181dbd0057a1f8d..751af6efe18b22a9d528b0b8bbe950de50e967bb 100644 (file)
@@ -17,6 +17,7 @@ from ...connectors.zxJDBC import ZxJDBCConnector
 from .base import MSDialect, MSExecutionContext
 from ... import engine
 
+
 class MSExecutionContext_zxjdbc(MSExecutionContext):
 
     _embedded_scope_identity = False
index 92c6f58a0aec473dd1af0d95c4b229b361ffb42a..fa874ac5b31ee2377db0d4a27c3871062af2dee0 100644 (file)
@@ -361,6 +361,7 @@ class _NumericType(object):
         self.zerofill = zerofill
         super(_NumericType, self).__init__(**kw)
 
+
 class _FloatType(_NumericType, sqltypes.Float):
     def __init__(self, precision=None, scale=None, asdecimal=True, **kw):
         if isinstance(self, (REAL, DOUBLE)) and \
@@ -375,11 +376,13 @@ class _FloatType(_NumericType, sqltypes.Float):
         super(_FloatType, self).__init__(precision=precision, asdecimal=asdecimal, **kw)
         self.scale = scale
 
+
 class _IntegerType(_NumericType, sqltypes.Integer):
     def __init__(self, display_width=None, **kw):
         self.display_width = display_width
         super(_IntegerType, self).__init__(**kw)
 
+
 class _StringType(sqltypes.String):
     """Base for MySQL string types."""
 
@@ -476,6 +479,7 @@ class DOUBLE(_FloatType):
         super(DOUBLE, self).__init__(precision=precision, scale=scale,
                                      asdecimal=asdecimal, **kw)
 
+
 class REAL(_FloatType, sqltypes.REAL):
     """MySQL REAL type."""
 
@@ -500,6 +504,7 @@ class REAL(_FloatType, sqltypes.REAL):
         super(REAL, self).__init__(precision=precision, scale=scale,
                                    asdecimal=asdecimal, **kw)
 
+
 class FLOAT(_FloatType, sqltypes.FLOAT):
     """MySQL FLOAT type."""
 
@@ -527,6 +532,7 @@ class FLOAT(_FloatType, sqltypes.FLOAT):
     def bind_processor(self, dialect):
         return None
 
+
 class INTEGER(_IntegerType, sqltypes.INTEGER):
     """MySQL INTEGER type."""
 
@@ -547,6 +553,7 @@ class INTEGER(_IntegerType, sqltypes.INTEGER):
         """
         super(INTEGER, self).__init__(display_width=display_width, **kw)
 
+
 class BIGINT(_IntegerType, sqltypes.BIGINT):
     """MySQL BIGINTEGER type."""
 
@@ -567,6 +574,7 @@ class BIGINT(_IntegerType, sqltypes.BIGINT):
         """
         super(BIGINT, self).__init__(display_width=display_width, **kw)
 
+
 class MEDIUMINT(_IntegerType):
     """MySQL MEDIUMINTEGER type."""
 
@@ -587,6 +595,7 @@ class MEDIUMINT(_IntegerType):
         """
         super(MEDIUMINT, self).__init__(display_width=display_width, **kw)
 
+
 class TINYINT(_IntegerType):
     """MySQL TINYINT type."""
 
@@ -607,6 +616,7 @@ class TINYINT(_IntegerType):
         """
         super(TINYINT, self).__init__(display_width=display_width, **kw)
 
+
 class SMALLINT(_IntegerType, sqltypes.SMALLINT):
     """MySQL SMALLINTEGER type."""
 
@@ -627,6 +637,7 @@ class SMALLINT(_IntegerType, sqltypes.SMALLINT):
         """
         super(SMALLINT, self).__init__(display_width=display_width, **kw)
 
+
 class BIT(sqltypes.TypeEngine):
     """MySQL BIT type.
 
@@ -663,6 +674,7 @@ class BIT(sqltypes.TypeEngine):
             return value
         return process
 
+
 class TIME(sqltypes.TIME):
     """MySQL TIME type.
 
@@ -710,10 +722,12 @@ class TIME(sqltypes.TIME):
                 return None
         return process
 
+
 class TIMESTAMP(sqltypes.TIMESTAMP):
     """MySQL TIMESTAMP type."""
     __visit_name__ = 'TIMESTAMP'
 
+
 class YEAR(sqltypes.TypeEngine):
     """MySQL YEAR type, for single byte storage of years 1901-2155."""
 
@@ -722,6 +736,7 @@ class YEAR(sqltypes.TypeEngine):
     def __init__(self, display_width=None):
         self.display_width = display_width
 
+
 class TEXT(_StringType, sqltypes.TEXT):
     """MySQL TEXT type, for text up to 2^16 characters."""
 
@@ -757,6 +772,7 @@ class TEXT(_StringType, sqltypes.TEXT):
         """
         super(TEXT, self).__init__(length=length, **kw)
 
+
 class TINYTEXT(_StringType):
     """MySQL TINYTEXT type, for text up to 2^8 characters."""
 
@@ -788,6 +804,7 @@ class TINYTEXT(_StringType):
         """
         super(TINYTEXT, self).__init__(**kwargs)
 
+
 class MEDIUMTEXT(_StringType):
     """MySQL MEDIUMTEXT type, for text up to 2^24 characters."""
 
@@ -819,6 +836,7 @@ class MEDIUMTEXT(_StringType):
         """
         super(MEDIUMTEXT, self).__init__(**kwargs)
 
+
 class LONGTEXT(_StringType):
     """MySQL LONGTEXT type, for text up to 2^32 characters."""
 
@@ -882,6 +900,7 @@ class VARCHAR(_StringType, sqltypes.VARCHAR):
         """
         super(VARCHAR, self).__init__(length=length, **kwargs)
 
+
 class CHAR(_StringType, sqltypes.CHAR):
     """MySQL CHAR type, for fixed-length character data."""
 
@@ -902,6 +921,7 @@ class CHAR(_StringType, sqltypes.CHAR):
         """
         super(CHAR, self).__init__(length=length, **kwargs)
 
+
 class NVARCHAR(_StringType, sqltypes.NVARCHAR):
     """MySQL NVARCHAR type.
 
@@ -954,23 +974,24 @@ class NCHAR(_StringType, sqltypes.NCHAR):
         super(NCHAR, self).__init__(length=length, **kwargs)
 
 
-
-
 class TINYBLOB(sqltypes._Binary):
     """MySQL TINYBLOB type, for binary data up to 2^8 bytes."""
 
     __visit_name__ = 'TINYBLOB'
 
+
 class MEDIUMBLOB(sqltypes._Binary):
     """MySQL MEDIUMBLOB type, for binary data up to 2^24 bytes."""
 
     __visit_name__ = 'MEDIUMBLOB'
 
+
 class LONGBLOB(sqltypes._Binary):
     """MySQL LONGBLOB type, for binary data up to 2^32 bytes."""
 
     __visit_name__ = 'LONGBLOB'
 
+
 class ENUM(sqltypes.Enum, _StringType):
     """MySQL ENUM type."""
 
@@ -1086,6 +1107,7 @@ class ENUM(sqltypes.Enum, _StringType):
         kw['strict'] = self.strict
         return sqltypes.Enum.adapt(self, impltype, **kw)
 
+
 class SET(_StringType):
     """MySQL SET type."""
 
@@ -1250,11 +1272,13 @@ ischema_names = {
     'year': YEAR,
 }
 
+
 class MySQLExecutionContext(default.DefaultExecutionContext):
 
     def should_autocommit_text(self, statement):
         return AUTOCOMMIT_RE.match(statement)
 
+
 class MySQLCompiler(compiler.SQLCompiler):
 
     render_table_with_column_in_update_from = True
@@ -1569,6 +1593,7 @@ class MySQLDDLCompiler(compiler.DDLCompiler):
                     (self.preparer.format_table(constraint.table),
                     qual, const)
 
+
 class MySQLTypeCompiler(compiler.GenericTypeCompiler):
     def _extend_numeric(self, type_, spec):
         "Extend a numeric-type declaration with MySQL specific extensions."
@@ -1843,6 +1868,7 @@ class MySQLIdentifierPreparer(compiler.IdentifierPreparer):
 
         return tuple([self.quote_identifier(i) for i in ids if i is not None])
 
+
 class MySQLDialect(default.DefaultDialect):
     """Details of the MySQL dialect.  Not used directly in application code."""
 
@@ -2325,6 +2351,7 @@ class MySQLDialect(default.DefaultDialect):
                 rp.close()
         return rows
 
+
 class ReflectedState(object):
     """Stores raw information about a SHOW CREATE TABLE statement."""
 
@@ -2335,6 +2362,7 @@ class ReflectedState(object):
         self.keys = []
         self.constraints = []
 
+
 class MySQLTableDefinitionParser(object):
     """Parses the results of a SHOW CREATE TABLE statement."""
 
@@ -2790,6 +2818,7 @@ def _pr_compile(regex, cleanup=None):
 
     return (_re_compile(regex), cleanup)
 
+
 def _re_compile(regex):
     """Compile a string to regex, I and UNICODE."""
 
index 82d9067855906fad8339baddf4a1f6f8c5950419..cfaabb045829b5b6acfe28f9e7c56de758e362b9 100644 (file)
@@ -20,6 +20,7 @@ from .base import (MySQLDialect,
 
 from ... import util
 
+
 class MySQLExecutionContext_mysqlconnector(MySQLExecutionContext):
 
     def get_lastrowid(self):
@@ -34,18 +35,21 @@ class MySQLCompiler_mysqlconnector(MySQLCompiler):
     def post_process_text(self, text):
         return text.replace('%', '%%')
 
+
 class MySQLIdentifierPreparer_mysqlconnector(MySQLIdentifierPreparer):
 
     def _escape_identifier(self, value):
         value = value.replace(self.escape_quote, self.escape_to_quote)
         return value.replace("%", "%%")
 
+
 class _myconnpyBIT(BIT):
     def result_processor(self, dialect, coltype):
         """MySQL-connector already converts mysql bits, so."""
 
         return None
 
+
 class MySQLDialect_mysqlconnector(MySQLDialect):
     driver = 'mysqlconnector'
     supports_unicode_statements = True
index 7385f6e60d9b4b70e20e523715643f72e04622a5..d4938540b1a39290e7cfdd197671cb3861903241 100644 (file)
@@ -57,6 +57,7 @@ from ...connectors.mysqldb import (
                         MySQLDBConnector
                     )
 
+
 class MySQLExecutionContext_mysqldb(MySQLDBExecutionContext, MySQLExecutionContext):
     pass
 
@@ -68,6 +69,7 @@ class MySQLCompiler_mysqldb(MySQLDBCompiler, MySQLCompiler):
 class MySQLIdentifierPreparer_mysqldb(MySQLDBIdentifierPreparer, MySQLIdentifierPreparer):
     pass
 
+
 class MySQLDialect_mysqldb(MySQLDBConnector, MySQLDialect):
     execution_ctx_cls = MySQLExecutionContext_mysqldb
     statement_compiler = MySQLCompiler_mysqldb
index cc4e3b5f23c4ecea57e8fe638c270b406cc7472d..25c0a7e84defe4a33cea7ad44d9d09d9f247bc02 100644 (file)
@@ -53,6 +53,7 @@ class MySQLExecutionContext_oursql(MySQLExecutionContext):
     def plain_query(self):
         return self.execution_options.get('_oursql_plain_query', False)
 
+
 class MySQLDialect_oursql(MySQLDialect):
     driver = 'oursql'
 # Py2K
index 36b49ba3b847b956482103ed28e81d7a6a550d9f..818bb7e3b4e4322a98e9274840ef0b7e1f618e4b 100644 (file)
@@ -23,6 +23,7 @@ the pymysql driver as well.
 
 from .mysqldb import MySQLDialect_mysqldb
 
+
 class MySQLDialect_pymysql(MySQLDialect_mysqldb):
     driver = 'pymysql'
 
index 2736ef7a4ba3bd3285821c5cb23c65c0cdb1118e..f1dcae6d1dfdc708c897f14513307041d4c55fa5 100644 (file)
@@ -29,6 +29,7 @@ from ...connectors.pyodbc import PyODBCConnector
 from ... import util
 import re
 
+
 class MySQLExecutionContext_pyodbc(MySQLExecutionContext):
 
     def get_lastrowid(self):
@@ -38,6 +39,7 @@ class MySQLExecutionContext_pyodbc(MySQLExecutionContext):
         cursor.close()
         return lastrowid
 
+
 class MySQLDialect_pyodbc(PyODBCConnector, MySQLDialect):
     supports_unicode_statements = False
     execution_ctx_cls = MySQLExecutionContext_pyodbc
index 955044a58773f8dedcdc81c248729eaaa8488ce5..743eac77060a2687c65de54ac5fc8f40c05dfee5 100644 (file)
@@ -28,6 +28,7 @@ from ... import types as sqltypes, util
 from ...connectors.zxJDBC import ZxJDBCConnector
 from .base import BIT, MySQLDialect, MySQLExecutionContext
 
+
 class _ZxJDBCBit(BIT):
     def result_processor(self, dialect, coltype):
         """Converts boolean or byte arrays from MySQL Connector/J to longs."""
index 7a4d835c9af63aca2581c16da7864690cf052fdd..5956a04b67cad3f0226055c6cdbc403200854c57 100644 (file)
@@ -164,18 +164,22 @@ RESERVED_WORDS = \
 NO_ARG_FNS = set('UID CURRENT_DATE SYSDATE USER '
                 'CURRENT_TIME CURRENT_TIMESTAMP'.split())
 
+
 class RAW(sqltypes._Binary):
     __visit_name__ = 'RAW'
 OracleRaw = RAW
 
+
 class NCLOB(sqltypes.Text):
     __visit_name__ = 'NCLOB'
 
+
 class VARCHAR2(VARCHAR):
     __visit_name__ = 'VARCHAR2'
 
 NVARCHAR2 = NVARCHAR
 
+
 class NUMBER(sqltypes.Numeric, sqltypes.Integer):
     __visit_name__ = 'NUMBER'
 
@@ -207,12 +211,15 @@ class DOUBLE_PRECISION(sqltypes.Numeric):
 
         super(DOUBLE_PRECISION, self).__init__(precision=precision, scale=scale, asdecimal=asdecimal)
 
+
 class BFILE(sqltypes.LargeBinary):
     __visit_name__ = 'BFILE'
 
+
 class LONG(sqltypes.Text):
     __visit_name__ = 'LONG'
 
+
 class INTERVAL(sqltypes.TypeEngine):
     __visit_name__ = 'INTERVAL'
 
@@ -243,6 +250,7 @@ class INTERVAL(sqltypes.TypeEngine):
     def _type_affinity(self):
         return sqltypes.Interval
 
+
 class ROWID(sqltypes.TypeEngine):
     """Oracle ROWID type.
 
@@ -388,6 +396,7 @@ class OracleTypeCompiler(compiler.GenericTypeCompiler):
     def visit_ROWID(self, type_):
         return "ROWID"
 
+
 class OracleCompiler(compiler.SQLCompiler):
     """Oracle compiler modifies the lexical structure of Select
     statements to work under non-ANSI configured Oracle databases, if
@@ -613,6 +622,7 @@ class OracleCompiler(compiler.SQLCompiler):
         else:
             return super(OracleCompiler, self).for_update_clause(select)
 
+
 class OracleDDLCompiler(compiler.DDLCompiler):
 
     def define_constraint_cascades(self, constraint):
@@ -634,6 +644,7 @@ class OracleDDLCompiler(compiler.DDLCompiler):
         return super(OracleDDLCompiler, self).\
                     visit_create_index(create, include_schema=True)
 
+
 class OracleIdentifierPreparer(compiler.IdentifierPreparer):
 
     reserved_words = set([x.lower() for x in RESERVED_WORDS])
@@ -658,6 +669,7 @@ class OracleExecutionContext(default.DefaultExecutionContext):
                     self.dialect.identifier_preparer.format_sequence(seq) +
                     ".nextval FROM DUAL", type_)
 
+
 class OracleDialect(default.DefaultDialect):
     name = 'oracle'
     supports_alter = True
index 233f3cb271af20a4a539cc285d4335379f820c72..50c8550ed56136cdfab01455be5c1e9d09ff6591 100644 (file)
@@ -155,12 +155,12 @@ from .base import OracleCompiler, OracleDialect, \
 from . import base as oracle
 from ...engine import result as _result
 from sqlalchemy import types as sqltypes, util, exc, processors
-from datetime import datetime
 import random
 import collections
 from sqlalchemy.util.compat import decimal
 import re
 
+
 class _OracleNumeric(sqltypes.Numeric):
     def bind_processor(self, dialect):
         # cx_oracle accepts Decimal objects and floats
@@ -204,6 +204,7 @@ class _OracleNumeric(sqltypes.Numeric):
             return super(_OracleNumeric, self).\
                             result_processor(dialect, coltype)
 
+
 class _OracleDate(sqltypes.Date):
     def bind_processor(self, dialect):
         return None
@@ -216,6 +217,7 @@ class _OracleDate(sqltypes.Date):
                 return value
         return process
 
+
 class _LOBMixin(object):
     def result_processor(self, dialect, coltype):
         if not dialect.auto_convert_lobs:
@@ -229,6 +231,7 @@ class _LOBMixin(object):
                 return value
         return process
 
+
 class _NativeUnicodeMixin(object):
     # Py3K
     #pass
@@ -249,21 +252,26 @@ class _NativeUnicodeMixin(object):
     # unicode in all cases, so the "native_unicode" flag
     # will be set for the default String.result_processor.
 
+
 class _OracleChar(_NativeUnicodeMixin, sqltypes.CHAR):
     def get_dbapi_type(self, dbapi):
         return dbapi.FIXED_CHAR
 
+
 class _OracleNVarChar(_NativeUnicodeMixin, sqltypes.NVARCHAR):
     def get_dbapi_type(self, dbapi):
         return getattr(dbapi, 'UNICODE', dbapi.STRING)
 
+
 class _OracleText(_LOBMixin, sqltypes.Text):
     def get_dbapi_type(self, dbapi):
         return dbapi.CLOB
 
+
 class _OracleString(_NativeUnicodeMixin, sqltypes.String):
     pass
 
+
 class _OracleUnicodeText(_LOBMixin, _NativeUnicodeMixin, sqltypes.UnicodeText):
     def get_dbapi_type(self, dbapi):
         return dbapi.NCLOB
@@ -282,6 +290,7 @@ class _OracleUnicodeText(_LOBMixin, _NativeUnicodeMixin, sqltypes.UnicodeText):
                 return string_processor(lob_processor(value))
             return process
 
+
 class _OracleInteger(sqltypes.Integer):
     def result_processor(self, dialect, coltype):
         def to_int(val):
@@ -290,6 +299,7 @@ class _OracleInteger(sqltypes.Integer):
             return val
         return to_int
 
+
 class _OracleBinary(_LOBMixin, sqltypes.LargeBinary):
     def get_dbapi_type(self, dbapi):
         return dbapi.BLOB
@@ -297,17 +307,21 @@ class _OracleBinary(_LOBMixin, sqltypes.LargeBinary):
     def bind_processor(self, dialect):
         return None
 
+
 class _OracleInterval(oracle.INTERVAL):
     def get_dbapi_type(self, dbapi):
         return dbapi.INTERVAL
 
+
 class _OracleRaw(oracle.RAW):
     pass
 
+
 class _OracleRowid(oracle.ROWID):
     def get_dbapi_type(self, dbapi):
         return dbapi.ROWID
 
+
 class OracleCompiler_cx_oracle(OracleCompiler):
     def bindparam_string(self, name, quote=None, **kw):
         if quote is True or quote is not False and \
@@ -421,6 +435,7 @@ class OracleExecutionContext_cx_oracle(OracleExecutionContext):
 
         return result
 
+
 class OracleExecutionContext_cx_oracle_with_unicode(OracleExecutionContext_cx_oracle):
     """Support WITH_UNICODE in Python 2.xx.
 
@@ -442,6 +457,7 @@ class OracleExecutionContext_cx_oracle_with_unicode(OracleExecutionContext_cx_or
         return super(OracleExecutionContext_cx_oracle_with_unicode, self).\
                             _execute_scalar(unicode(stmt))
 
+
 class ReturningResultProxy(_result.FullyBufferedResultProxy):
     """Result proxy which stuffs the _returning clause + outparams into the fetch."""
 
@@ -461,6 +477,7 @@ class ReturningResultProxy(_result.FullyBufferedResultProxy):
         return collections.deque([tuple(self._returning_params["ret_%d" % i]
                     for i, c in enumerate(self._returning_params))])
 
+
 class OracleDialect_cx_oracle(OracleDialect):
     execution_ctx_cls = OracleExecutionContext_cx_oracle
     statement_compiler = OracleCompiler_cx_oracle
index 54608969bb3d729566cfeec093109eea82d75d47..7c828331b108f6626c68ad69d1cf33d5e3e21fbe 100644 (file)
@@ -24,6 +24,7 @@ import collections
 
 SQLException = zxJDBC = None
 
+
 class _ZxJDBCDate(sqltypes.Date):
 
     def result_processor(self, dialect, coltype):
index 37f7b29f55577257c0f35f853def4b639ade767c..c104c46143c7bedb7f9d72364e4959a9c922583a 100644 (file)
@@ -41,6 +41,7 @@ db_opts = {}
 options = None
 _existing_engine = None
 
+
 def _log(option, opt_str, value, parser):
     global logging
     if not logging:
@@ -59,34 +60,42 @@ def _list_dbs(*args):
         print "%20s\t%s" % (macro, file_config.get('db', macro))
     sys.exit(0)
 
+
 def _server_side_cursors(options, opt_str, value, parser):
     db_opts['server_side_cursors'] = True
 
+
 def _engine_strategy(options, opt_str, value, parser):
     if value:
         db_opts['strategy'] = value
 
 pre_configure = []
 post_configure = []
+
+
 def pre(fn):
     pre_configure.append(fn)
     return fn
+
+
 def post(fn):
     post_configure.append(fn)
     return fn
 
+
 @pre
 def _setup_options(opt, file_config):
     global options
     options = opt
 
+
 @pre
 def _monkeypatch_cdecimal(options, file_config):
     if options.cdecimal:
-        import sys
         import cdecimal
         sys.modules['decimal'] = cdecimal
 
+
 @post
 def _engine_uri(options, file_config):
     global db_label, db_url
@@ -105,6 +114,7 @@ def _engine_uri(options, file_config):
                         % db_label)
         db_url = file_config.get('db', db_label)
 
+
 @post
 def _require(options, file_config):
     if not(options.require or
@@ -131,12 +141,14 @@ def _require(options, file_config):
                 continue
             pkg_resources.require(requirement)
 
+
 @post
 def _engine_pool(options, file_config):
     if options.mockpool:
         from sqlalchemy import pool
         db_opts['poolclass'] = pool.AssertionPool
 
+
 @post
 def _create_testing_engine(options, file_config):
     from sqlalchemy.testing import engines, config
@@ -199,6 +211,7 @@ def _set_table_options(options, file_config):
     if options.mysql_engine:
         table_options['mysql_engine'] = options.mysql_engine
 
+
 @post
 def _reverse_topological(options, file_config):
     if options.reversetop:
@@ -208,6 +221,7 @@ def _reverse_topological(options, file_config):
         topological.set = unitofwork.set = session.set = mapper.set = \
                 dependency.set = RandomSet
 
+
 @post
 def _requirements(options, file_config):
     from sqlalchemy.testing import config
@@ -230,6 +244,7 @@ def _post_setup_options(opt, file_config):
     from sqlalchemy.testing import config
     config.options = options
 
+
 @post
 def _setup_profiling(options, file_config):
     from sqlalchemy.testing import profiling