diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2019-01-06 01:14:26 -0500 |
---|---|---|
committer | mike bayer <mike_mp@zzzcomputing.com> | 2019-01-06 17:34:50 +0000 |
commit | 1e1a38e7801f410f244e4bbb44ec795ae152e04e (patch) | |
tree | 28e725c5c8188bd0cfd133d1e268dbca9b524978 /lib/sqlalchemy/dialects/sybase/pyodbc.py | |
parent | 404e69426b05a82d905cbb3ad33adafccddb00dd (diff) | |
download | sqlalchemy-1e1a38e7801f410f244e4bbb44ec795ae152e04e.tar.gz |
Run black -l 79 against all source files
This is a straight reformat run using black as is, with no edits
applied at all.
The black run will format code consistently, however in
some cases that are prevalent in SQLAlchemy code it produces
too-long lines. The too-long lines will be resolved in the
following commit that will resolve all remaining flake8 issues
including shadowed builtins, long lines, import order, unused
imports, duplicate imports, and docstring issues.
Change-Id: I7eda77fed3d8e73df84b3651fd6cfcfe858d4dc9
Diffstat (limited to 'lib/sqlalchemy/dialects/sybase/pyodbc.py')
-rw-r--r-- | lib/sqlalchemy/dialects/sybase/pyodbc.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/sqlalchemy/dialects/sybase/pyodbc.py b/lib/sqlalchemy/dialects/sybase/pyodbc.py index af6469dad..a4759428c 100644 --- a/lib/sqlalchemy/dialects/sybase/pyodbc.py +++ b/lib/sqlalchemy/dialects/sybase/pyodbc.py @@ -34,8 +34,10 @@ Currently *not* supported are:: """ -from sqlalchemy.dialects.sybase.base import SybaseDialect,\ - SybaseExecutionContext +from sqlalchemy.dialects.sybase.base import ( + SybaseDialect, + SybaseExecutionContext, +) from sqlalchemy.connectors.pyodbc import PyODBCConnector from sqlalchemy import types as sqltypes, processors import decimal @@ -51,12 +53,10 @@ class _SybNumeric_pyodbc(sqltypes.Numeric): """ def bind_processor(self, dialect): - super_process = super(_SybNumeric_pyodbc, self).\ - bind_processor(dialect) + super_process = super(_SybNumeric_pyodbc, self).bind_processor(dialect) def process(value): - if self.asdecimal and \ - isinstance(value, decimal.Decimal): + if self.asdecimal and isinstance(value, decimal.Decimal): if value.adjusted() < -6: return processors.to_float(value) @@ -65,6 +65,7 @@ class _SybNumeric_pyodbc(sqltypes.Numeric): return super_process(value) else: return value + return process @@ -79,8 +80,7 @@ class SybaseExecutionContext_pyodbc(SybaseExecutionContext): class SybaseDialect_pyodbc(PyODBCConnector, SybaseDialect): execution_ctx_cls = SybaseExecutionContext_pyodbc - colspecs = { - sqltypes.Numeric: _SybNumeric_pyodbc, - } + colspecs = {sqltypes.Numeric: _SybNumeric_pyodbc} + dialect = SybaseDialect_pyodbc |