From: Daniele Varrazzo Date: Wed, 28 Dec 2022 03:26:43 +0000 (+0000) Subject: style: uniform variable name between sync and async cursor X-Git-Tag: pool-3.2.0~149 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c6ab7bda39ccb1347b3ab4d87a0d95c6532be496;p=thirdparty%2Fpsycopg.git style: uniform variable name between sync and async cursor --- diff --git a/psycopg/psycopg/cursor_async.py b/psycopg/psycopg/cursor_async.py index 8971d4097..42cd8e501 100644 --- a/psycopg/psycopg/cursor_async.py +++ b/psycopg/psycopg/cursor_async.py @@ -173,10 +173,10 @@ class AsyncCursor(BaseCursor["AsyncConnection[Any]", Row]): async def fetchone(self) -> Optional[Row]: await self._fetch_pipeline() self._check_result_for_fetch() - rv = self._tx.load_row(self._pos, self._make_row) - if rv is not None: + record = self._tx.load_row(self._pos, self._make_row) + if record is not None: self._pos += 1 - return rv + return record async def fetchmany(self, size: int = 0) -> List[Row]: await self._fetch_pipeline()