From 1e278de4cc9a4181e0747640a960e80efcea1ca9 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Sun, 6 Jan 2019 01:19:47 -0500 Subject: 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 --- lib/sqlalchemy/orm/dependency.py | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) (limited to 'lib/sqlalchemy/orm/dependency.py') 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." -- cgit v1.2.1