Skip to content

Commit 547f990

Browse files
author
Saharsh Rathi
committed
change return type of fetchmany and fetchall from Sequence to List
Signed-off-by: Saharsh Rathi <[email protected]>
1 parent 0c32881 commit 547f990

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

comdb2/dbapi2.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@
251251
from . import cdb2
252252
from .cdb2 import ColumnType, Row, Value
253253
from collections.abc import Callable, Iterator, Mapping, Sequence
254-
from typing import Any
254+
from typing import Any, List
255255

256256
__all__ = [
257257
"apilevel",
@@ -1167,7 +1167,7 @@ def fetchone(self) -> Row | None:
11671167
except StopIteration:
11681168
return None
11691169

1170-
def fetchmany(self, n: int | None = None) -> Sequence[Row]:
1170+
def fetchmany(self, n: int | None = None) -> List[Row]:
11711171
"""Fetch the next set of rows of the current result set.
11721172
11731173
Args:
@@ -1187,7 +1187,7 @@ def fetchmany(self, n: int | None = None) -> Sequence[Row]:
11871187
n = self._arraysize
11881188
return [x for x in itertools.islice(self, 0, n)]
11891189

1190-
def fetchall(self) -> Sequence[Row]:
1190+
def fetchall(self) -> List[Row]:
11911191
"""Fetch all remaining rows of the current result set.
11921192
11931193
Returns:

0 commit comments

Comments
 (0)