diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2019-04-11 14:23:29 -0400 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2019-04-11 14:23:29 -0400 |
commit | 17413bbf10c3b993d343c28035713a23c745712c (patch) | |
tree | 61c126a4101874d671288396c2dbf9432e3e86fc /lib/sqlalchemy | |
parent | 53c65ed93ade1fc99c75e1f0bf055cd129596c06 (diff) | |
download | sqlalchemy-17413bbf10c3b993d343c28035713a23c745712c.tar.gz |
Black updates
Updating for a few black adjustments
Change-Id: I9c8abadd1ccd6173e6d68dd62f14cec208cc304a
Diffstat (limited to 'lib/sqlalchemy')
-rw-r--r-- | lib/sqlalchemy/__init__.py | 2 | ||||
-rw-r--r-- | lib/sqlalchemy/dialects/postgresql/psycopg2.py | 2 | ||||
-rw-r--r-- | lib/sqlalchemy/orm/util.py | 5 | ||||
-rw-r--r-- | lib/sqlalchemy/sql/util.py | 4 |
4 files changed, 4 insertions, 9 deletions
diff --git a/lib/sqlalchemy/__init__.py b/lib/sqlalchemy/__init__.py index 1e4292382..8782ad683 100644 --- a/lib/sqlalchemy/__init__.py +++ b/lib/sqlalchemy/__init__.py @@ -122,7 +122,7 @@ from .engine import create_engine # noqa nosort from .engine import engine_from_config # noqa nosort -__version__ = '1.3.3' +__version__ = "1.3.3" def __go(lcls): diff --git a/lib/sqlalchemy/dialects/postgresql/psycopg2.py b/lib/sqlalchemy/dialects/postgresql/psycopg2.py index fb127f1c7..f7c5f668b 100644 --- a/lib/sqlalchemy/dialects/postgresql/psycopg2.py +++ b/lib/sqlalchemy/dialects/postgresql/psycopg2.py @@ -776,7 +776,7 @@ class PGDialect_psycopg2(PGDialect): else: # no connection arguments whatsoever; psycopg2.connect() # requires that "dsn" be present as a blank string. - return ([''], opts) + return ([""], opts) def is_disconnect(self, e, connection, cursor): if isinstance(e, self.dbapi.Error): diff --git a/lib/sqlalchemy/orm/util.py b/lib/sqlalchemy/orm/util.py index 7b8edd349..36da781a4 100644 --- a/lib/sqlalchemy/orm/util.py +++ b/lib/sqlalchemy/orm/util.py @@ -1265,10 +1265,7 @@ def _entity_corresponds_to_use_path_impl(given, entity): return ( entity.is_aliased_class and not entity._use_mapper_path - and ( - given is entity - or given in entity._with_polymorphic_entities - ) + and (given is entity or given in entity._with_polymorphic_entities) ) elif not entity.is_aliased_class: return given.common_parent(entity.mapper) diff --git a/lib/sqlalchemy/sql/util.py b/lib/sqlalchemy/sql/util.py index 8719b26ec..d90b3f158 100644 --- a/lib/sqlalchemy/sql/util.py +++ b/lib/sqlalchemy/sql/util.py @@ -156,9 +156,7 @@ def find_left_clause_to_join_from(clauses, join_to, onclause): toremove = set( chain(*[_expand_cloned(f._hide_froms) for f in clauses]) ) - idx = [ - i for i in idx if clauses[i] not in toremove - ] + idx = [i for i in idx if clauses[i] not in toremove] # onclause was given and none of them resolved, so assume # all indexes can match |