diff options
author | Federico Caselli <cfederico87@gmail.com> | 2022-11-03 20:52:21 +0100 |
---|---|---|
committer | Federico Caselli <cfederico87@gmail.com> | 2022-11-16 23:03:04 +0100 |
commit | 4eb4ceca36c7ce931ea65ac06d6ed08bf459fc66 (patch) | |
tree | 4970cff3f78489a4a0066cd27fd4bae682402957 /lib/sqlalchemy/dialects/postgresql/asyncpg.py | |
parent | 3fc6c40ea77c971d3067dab0fdf57a5b5313b69b (diff) | |
download | sqlalchemy-4eb4ceca36c7ce931ea65ac06d6ed08bf459fc66.tar.gz |
Try running pyupgrade on the code
command run is "pyupgrade --py37-plus --keep-runtime-typing --keep-percent-format <files...>"
pyupgrade will change assert_ to assertTrue. That was reverted since assertTrue does not
exists in sqlalchemy fixtures
Change-Id: Ie1ed2675c7b11d893d78e028aad0d1576baebb55
Diffstat (limited to 'lib/sqlalchemy/dialects/postgresql/asyncpg.py')
-rw-r--r-- | lib/sqlalchemy/dialects/postgresql/asyncpg.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/sqlalchemy/dialects/postgresql/asyncpg.py b/lib/sqlalchemy/dialects/postgresql/asyncpg.py index cd161d28e..751dc3dcf 100644 --- a/lib/sqlalchemy/dialects/postgresql/asyncpg.py +++ b/lib/sqlalchemy/dialects/postgresql/asyncpg.py @@ -560,7 +560,7 @@ class AsyncAdapt_asyncpg_ss_cursor(AsyncAdapt_asyncpg_cursor): __slots__ = ("_rowbuffer",) def __init__(self, adapt_connection): - super(AsyncAdapt_asyncpg_ss_cursor, self).__init__(adapt_connection) + super().__init__(adapt_connection) self._rowbuffer = None def close(self): @@ -863,9 +863,7 @@ class AsyncAdapt_asyncpg_dbapi: class InvalidCachedStatementError(NotSupportedError): def __init__(self, message): - super( - AsyncAdapt_asyncpg_dbapi.InvalidCachedStatementError, self - ).__init__( + super().__init__( message + " (SQLAlchemy asyncpg dialect will now invalidate " "all prepared caches in response to this exception)", ) @@ -1095,7 +1093,7 @@ class PGDialect_asyncpg(PGDialect): """ - super_connect = super(PGDialect_asyncpg, self).on_connect() + super_connect = super().on_connect() def connect(conn): conn.await_(self.setup_asyncpg_json_codec(conn)) |