@@ -45,7 +45,7 @@ def _get_dialect(self) -> Dialect:
45
45
def _get_connection_kwargs (self ) -> dict :
46
46
url_options = self ._database_url .options
47
47
48
- kwargs = {} # type : typing.Dict[str, typing.Any]
48
+ kwargs : typing .Dict [str , typing .Any ] = {}
49
49
min_size = url_options .get ("min_size" )
50
50
max_size = url_options .get ("max_size" )
51
51
ssl = url_options .get ("ssl" )
@@ -162,7 +162,7 @@ class PostgresConnection(ConnectionBackend):
162
162
def __init__ (self , database : PostgresBackend , dialect : Dialect ):
163
163
self ._database = database
164
164
self ._dialect = dialect
165
- self ._connection = None # type : typing.Optional[asyncpg.connection.Connection]
165
+ self ._connection : typing .Optional [asyncpg .connection .Connection ] = None
166
166
167
167
async def acquire (self ) -> None :
168
168
assert self ._connection is None , "Connection is already acquired"
@@ -305,9 +305,7 @@ def raw_connection(self) -> asyncpg.connection.Connection:
305
305
class PostgresTransaction (TransactionBackend ):
306
306
def __init__ (self , connection : PostgresConnection ):
307
307
self ._connection = connection
308
- self ._transaction = (
309
- None
310
- ) # type: typing.Optional[asyncpg.transaction.Transaction]
308
+ self ._transaction : typing .Optional [asyncpg .transaction .Transaction ] = None
311
309
312
310
async def start (
313
311
self , is_root : bool , extra_options : typing .Dict [typing .Any , typing .Any ]
0 commit comments