diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2019-01-06 01:19:47 -0500 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2019-01-06 18:23:11 -0500 |
commit | 1e278de4cc9a4181e0747640a960e80efcea1ca9 (patch) | |
tree | 13d0c035807613bfa07e734acad79b9c843cb8b0 /lib/sqlalchemy/sql/dml.py | |
parent | 1e1a38e7801f410f244e4bbb44ec795ae152e04e (diff) | |
download | sqlalchemy-1e278de4cc9a4181e0747640a960e80efcea1ca9.tar.gz |
Post black reformatting
Applied on top of a pure run of black -l 79 in
I7eda77fed3d8e73df84b3651fd6cfcfe858d4dc9, this set of changes
resolves all remaining flake8 conditions for those codes
we have enabled in setup.cfg.
Included are resolutions for all remaining flake8 issues
including shadowed builtins, long lines, import order, unused
imports, duplicate imports, and docstring issues.
Change-Id: I4f72d3ba1380dd601610ff80b8fb06a2aff8b0fe
Diffstat (limited to 'lib/sqlalchemy/sql/dml.py')
-rw-r--r-- | lib/sqlalchemy/sql/dml.py | 54 |
1 files changed, 24 insertions, 30 deletions
diff --git a/lib/sqlalchemy/sql/dml.py b/lib/sqlalchemy/sql/dml.py index 0cea5ccc4..39a3b39d3 100644 --- a/lib/sqlalchemy/sql/dml.py +++ b/lib/sqlalchemy/sql/dml.py @@ -9,29 +9,22 @@ Provide :class:`.Insert`, :class:`.Update` and :class:`.Delete`. """ -from .base import ( - Executable, - _generative, - _from_objects, - DialectKWArgs, - ColumnCollection, -) -from .elements import ( - ClauseElement, - _literal_as_text, - Null, - and_, - _clone, - _column_as_key, -) -from .selectable import ( - _interpret_as_from, - _interpret_as_select, - HasPrefixes, - HasCTE, -) -from .. import util +from .base import _from_objects +from .base import _generative +from .base import DialectKWArgs +from .base import Executable +from .elements import _clone +from .elements import _column_as_key +from .elements import _literal_as_text +from .elements import and_ +from .elements import ClauseElement +from .elements import Null +from .selectable import _interpret_as_from +from .selectable import _interpret_as_select +from .selectable import HasCTE +from .selectable import HasPrefixes from .. import exc +from .. import util class UpdateBase( @@ -372,9 +365,10 @@ class ValuesBase(UpdateBase): v = {} if self.parameters is None: - self.parameters, self._has_multi_parameters = self._process_colparams( - v - ) + ( + self.parameters, + self._has_multi_parameters, + ) = self._process_colparams(v) else: if self._has_multi_parameters: self.parameters = list(self.parameters) @@ -714,17 +708,17 @@ class Update(ValuesBase): :meth:`.ResultProxy.last_updated_params`. :param preserve_parameter_order: if True, the update statement is - expected to receive parameters **only** via the :meth:`.Update.values` - method, and they must be passed as a Python ``list`` of 2-tuples. - The rendered UPDATE statement will emit the SET clause for each - referenced column maintaining this order. + expected to receive parameters **only** via the + :meth:`.Update.values` method, and they must be passed as a Python + ``list`` of 2-tuples. The rendered UPDATE statement will emit the SET + clause for each referenced column maintaining this order. .. versionadded:: 1.0.10 .. seealso:: :ref:`updates_order_parameters` - full example of the - :paramref:`~sqlalchemy.sql.expression.update.preserve_parameter_order` flag + :paramref:`~.update.preserve_parameter_order` flag If both ``values`` and compile-time bind parameters are present, the compile-time bind parameters override the information specified |