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/orm/dependency.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/orm/dependency.py')
| -rw-r--r-- | lib/sqlalchemy/orm/dependency.py | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/lib/sqlalchemy/orm/dependency.py b/lib/sqlalchemy/orm/dependency.py index cba4d2141..ed3653de5 100644 --- a/lib/sqlalchemy/orm/dependency.py +++ b/lib/sqlalchemy/orm/dependency.py @@ -9,9 +9,17 @@ """ -from .. import sql, util, exc as sa_exc -from . import attributes, exc, sync, unitofwork, util as mapperutil -from .interfaces import ONETOMANY, MANYTOONE, MANYTOMANY +from . import attributes +from . import exc +from . import sync +from . import unitofwork +from . import util as mapperutil +from .interfaces import MANYTOMANY +from .interfaces import MANYTOONE +from .interfaces import ONETOMANY +from .. import exc as sa_exc +from .. import sql +from .. import util class DependencyProcessor(object): @@ -1180,9 +1188,9 @@ class ManyToManyDP(DependencyProcessor): ) result = connection.execute(statement, secondary_delete) - if result.supports_sane_multi_rowcount() and result.rowcount != len( - secondary_delete - ): + if ( + result.supports_sane_multi_rowcount() + ) and result.rowcount != len(secondary_delete): raise exc.StaleDataError( "DELETE statement on table '%s' expected to delete " "%d row(s); Only %d were matched." @@ -1206,9 +1214,9 @@ class ManyToManyDP(DependencyProcessor): ) result = connection.execute(statement, secondary_update) - if result.supports_sane_multi_rowcount() and result.rowcount != len( - secondary_update - ): + if ( + result.supports_sane_multi_rowcount() + ) and result.rowcount != len(secondary_update): raise exc.StaleDataError( "UPDATE statement on table '%s' expected to update " "%d row(s); Only %d were matched." |
