@@ -45,7 +45,7 @@ def _get_dialect(self) -> Dialect:
4545 def _get_connection_kwargs (self ) -> dict :
4646 url_options = self ._database_url .options
4747
48- kwargs = {} # type : typing.Dict[str, typing.Any]
48+ kwargs : typing .Dict [str , typing .Any ] = {}
4949 min_size = url_options .get ("min_size" )
5050 max_size = url_options .get ("max_size" )
5151 ssl = url_options .get ("ssl" )
@@ -162,7 +162,7 @@ class PostgresConnection(ConnectionBackend):
162162 def __init__ (self , database : PostgresBackend , dialect : Dialect ):
163163 self ._database = database
164164 self ._dialect = dialect
165- self ._connection = None # type : typing.Optional[asyncpg.connection.Connection]
165+ self ._connection : typing .Optional [asyncpg .connection .Connection ] = None
166166
167167 async def acquire (self ) -> None :
168168 assert self ._connection is None , "Connection is already acquired"
@@ -305,9 +305,7 @@ def raw_connection(self) -> asyncpg.connection.Connection:
305305class PostgresTransaction (TransactionBackend ):
306306 def __init__ (self , connection : PostgresConnection ):
307307 self ._connection = connection
308- self ._transaction = (
309- None
310- ) # type: typing.Optional[asyncpg.transaction.Transaction]
308+ self ._transaction : typing .Optional [asyncpg .transaction .Transaction ] = None
311309
312310 async def start (
313311 self , is_root : bool , extra_options : typing .Dict [typing .Any , typing .Any ]
0 commit comments