From 68ac70bac8dd7cc94bf4427cc97255b7a528c5cc Mon Sep 17 00:00:00 2001 From: collerek Date: Thu, 20 Jan 2022 22:14:37 +0100 Subject: [PATCH] change return types for asyncmy --- databases/backends/asyncmy.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/databases/backends/asyncmy.py b/databases/backends/asyncmy.py index c9b6611f..fa940a23 100644 --- a/databases/backends/asyncmy.py +++ b/databases/backends/asyncmy.py @@ -100,7 +100,7 @@ async def release(self) -> None: await self._database._pool.release(self._connection) self._connection = None - async def fetch_all(self, query: ClauseElement) -> typing.List[typing.Sequence]: + async def fetch_all(self, query: ClauseElement) -> typing.List[typing.Mapping]: assert self._connection is not None, "Connection is not acquired" query_str, args, context = self._compile(query) async with self._connection.cursor() as cursor: @@ -121,7 +121,7 @@ async def fetch_all(self, query: ClauseElement) -> typing.List[typing.Sequence]: finally: await cursor.close() - async def fetch_one(self, query: ClauseElement) -> typing.Optional[typing.Sequence]: + async def fetch_one(self, query: ClauseElement) -> typing.Optional[typing.Mapping]: assert self._connection is not None, "Connection is not acquired" query_str, args, context = self._compile(query) async with self._connection.cursor() as cursor: