diff options
author | Diana Clarke <diana.joan.clarke@gmail.com> | 2012-11-19 22:28:52 -0500 |
---|---|---|
committer | Diana Clarke <diana.joan.clarke@gmail.com> | 2012-11-19 22:28:52 -0500 |
commit | e0dc5ed803de7a57de033c16f2fa0044b59ce374 (patch) | |
tree | 7435132c0a11c71f2479a9674c443e4acb5c25e5 /lib/sqlalchemy/dialects/postgresql/pg8000.py | |
parent | fb18595f426a9026c946840e2fb2f0e0dbd29bef (diff) | |
download | sqlalchemy-e0dc5ed803de7a57de033c16f2fa0044b59ce374.tar.gz |
just a pep8 pass of lib/sqlalchemy/dialects/postgresql
Diffstat (limited to 'lib/sqlalchemy/dialects/postgresql/pg8000.py')
-rw-r--r-- | lib/sqlalchemy/dialects/postgresql/pg8000.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/sqlalchemy/dialects/postgresql/pg8000.py b/lib/sqlalchemy/dialects/postgresql/pg8000.py index 6a7c5cecb..d016bf7e1 100644 --- a/lib/sqlalchemy/dialects/postgresql/pg8000.py +++ b/lib/sqlalchemy/dialects/postgresql/pg8000.py @@ -34,6 +34,7 @@ from .base import PGDialect, \ PGCompiler, PGIdentifierPreparer, PGExecutionContext,\ _DECIMAL_TYPES, _FLOAT_TYPES, _INT_TYPES + class _PGNumeric(sqltypes.Numeric): def result_processor(self, dialect, coltype): if self.asdecimal: @@ -60,6 +61,7 @@ class _PGNumericNoBind(_PGNumeric): def bind_processor(self, dialect): return None + class PGExecutionContext_pg8000(PGExecutionContext): pass @@ -71,7 +73,8 @@ class PGCompiler_pg8000(PGCompiler): def post_process_text(self, text): if '%%' in text: - util.warn("The SQLAlchemy postgresql dialect now automatically escapes '%' in text() " + util.warn("The SQLAlchemy postgresql dialect " + "now automatically escapes '%' in text() " "expressions to '%%'.") return text.replace('%', '%%') @@ -99,8 +102,8 @@ class PGDialect_pg8000(PGDialect): colspecs = util.update_copy( PGDialect.colspecs, { - sqltypes.Numeric : _PGNumericNoBind, - sqltypes.Float : _PGNumeric + sqltypes.Numeric: _PGNumericNoBind, + sqltypes.Float: _PGNumeric } ) |