diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2022-03-28 15:52:27 -0400 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2022-03-28 15:58:35 -0400 |
commit | c90396fbe7424c481f8f4ee18b6cedd1fa09c711 (patch) | |
tree | 6abf98023e15fb2ba81c3af3ccb5583de5b94919 /lib/sqlalchemy | |
parent | bbd6420b39edb24481f171b8d0081149dd2e5ba7 (diff) | |
download | sqlalchemy-c90396fbe7424c481f8f4ee18b6cedd1fa09c711.tar.gz |
bump black to 22.3.0
both black and click were released in the past
few hours, and black 21.5b1 seems to suddenly
be failing on a missing symbol from click. just
update to the latest
Change-Id: Idf76732479a264f7f2245699a6bdaff018e3a123
Diffstat (limited to 'lib/sqlalchemy')
-rw-r--r-- | lib/sqlalchemy/dialects/mysql/enumerated.py | 4 | ||||
-rw-r--r-- | lib/sqlalchemy/dialects/oracle/cx_oracle.py | 2 | ||||
-rw-r--r-- | lib/sqlalchemy/engine/default.py | 2 | ||||
-rw-r--r-- | lib/sqlalchemy/sql/coercions.py | 11 | ||||
-rw-r--r-- | lib/sqlalchemy/sql/schema.py | 12 |
5 files changed, 12 insertions, 19 deletions
diff --git a/lib/sqlalchemy/dialects/mysql/enumerated.py b/lib/sqlalchemy/dialects/mysql/enumerated.py index c35b7226d..753f591e9 100644 --- a/lib/sqlalchemy/dialects/mysql/enumerated.py +++ b/lib/sqlalchemy/dialects/mysql/enumerated.py @@ -152,10 +152,10 @@ class SET(_StringType): ) if self.retrieve_as_bitwise: self._bitmap = dict( - (value, 2 ** idx) for idx, value in enumerate(self.values) + (value, 2**idx) for idx, value in enumerate(self.values) ) self._bitmap.update( - (2 ** idx, value) for idx, value in enumerate(self.values) + (2**idx, value) for idx, value in enumerate(self.values) ) length = max([len(v) for v in values] + [0]) kw.setdefault("length", length) diff --git a/lib/sqlalchemy/dialects/oracle/cx_oracle.py b/lib/sqlalchemy/dialects/oracle/cx_oracle.py index 98181051e..5208f9671 100644 --- a/lib/sqlalchemy/dialects/oracle/cx_oracle.py +++ b/lib/sqlalchemy/dialects/oracle/cx_oracle.py @@ -1266,7 +1266,7 @@ class OracleDialect_cx_oracle(OracleDialect): """ - id_ = random.randint(0, 2 ** 128) + id_ = random.randint(0, 2**128) return (0x1234, "%032x" % id_, "%032x" % 9) def do_executemany(self, cursor, statement, parameters, context=None): diff --git a/lib/sqlalchemy/engine/default.py b/lib/sqlalchemy/engine/default.py index d605af3ef..65cb57e10 100644 --- a/lib/sqlalchemy/engine/default.py +++ b/lib/sqlalchemy/engine/default.py @@ -630,7 +630,7 @@ class DefaultDialect(Dialect): do_commit_twophase(). Its format is unspecified. """ - return "_sa_%032x" % random.randint(0, 2 ** 128) + return "_sa_%032x" % random.randint(0, 2**128) def do_savepoint(self, connection, name): connection.execute(expression.SavepointClause(name)) diff --git a/lib/sqlalchemy/sql/coercions.py b/lib/sqlalchemy/sql/coercions.py index ea17b8e03..35cd33a18 100644 --- a/lib/sqlalchemy/sql/coercions.py +++ b/lib/sqlalchemy/sql/coercions.py @@ -64,13 +64,10 @@ def _is_literal(element): """ - return ( - not isinstance( - element, - (Visitable, schema.SchemaEventTarget), - ) - and not hasattr(element, "__clause_element__") - ) + return not isinstance( + element, + (Visitable, schema.SchemaEventTarget), + ) and not hasattr(element, "__clause_element__") def _deep_is_literal(element): diff --git a/lib/sqlalchemy/sql/schema.py b/lib/sqlalchemy/sql/schema.py index 9924e632b..7206cfdba 100644 --- a/lib/sqlalchemy/sql/schema.py +++ b/lib/sqlalchemy/sql/schema.py @@ -4329,14 +4329,10 @@ class PrimaryKeyConstraint(ColumnCollectionConstraint): if col.autoincrement is True: _validate_autoinc(col, True) return col - elif ( - col.autoincrement - in ( - "auto", - "ignore_fk", - ) - and _validate_autoinc(col, False) - ): + elif col.autoincrement in ( + "auto", + "ignore_fk", + ) and _validate_autoinc(col, False): return col else: |