Fix signature for slite3.fetchmany (#1444)

Also made pymssql.fetchmany simpler.
This commit is contained in:
Peter Vilim
2017-06-29 15:05:47 -07:00
committed by Guido van Rossum
parent ac87de50dd
commit bc9b2f0d4d
3 changed files with 4 additions and 6 deletions

View File

@@ -1,8 +1,7 @@
# Filip Hron <filip.hron@gmail.com>
# based heavily on Andrey Vlasovskikh's python-skeletons https://github.com/JetBrains/python-skeletons/blob/master/sqlite3.py
from typing import Any, Union, List, Iterator
from numbers import Integral
from typing import Any, Union, List, Iterator, Optional
from datetime import time, datetime
from collections import Iterable
@@ -141,7 +140,7 @@ class Cursor(Iterator[Any]):
def executemany(self, sql: str, seq_of_parameters: Iterable[Iterable]): ...
def executescript(self, sql_script: Union[bytes, unicode]) -> Cursor: ...
def fetchall(self) -> List[Any]: ...
def fetchmany(self, size: Integral = ...) -> List[Any]: ...
def fetchmany(self, size: Optional[int] = ...) -> List[Any]: ...
def fetchone(self) -> Any: ...
def setinputsizes(self, *args, **kwargs): ...
def setoutputsize(self, *args, **kwargs): ...

View File

@@ -3,7 +3,6 @@
import sys
from typing import Any, Union, List, Iterator, Optional, TypeVar, Callable
from numbers import Integral
from datetime import time, datetime
from collections import Iterable
@@ -141,7 +140,7 @@ class Cursor(Iterator[Any]):
def executemany(self, sql: str, seq_of_parameters: Iterable[Iterable]): ...
def executescript(self, sql_script: Union[bytes, str]) -> Cursor: ...
def fetchall(self) -> List[Any]: ...
def fetchmany(self, size: Integral = ...) -> List[Any]: ...
def fetchmany(self, size: Optional[int] = ...) -> List[Any]: ...
def fetchone(self) -> Any: ...
def setinputsizes(self, *args, **kwargs): ...
def setoutputsize(self, *args, **kwargs): ...

View File

@@ -26,7 +26,7 @@ class Cursor(object):
def executemany(self, stmt: str,
params: Optional[Sequence[Tuple[Scalar, ...]]]) -> None: ...
def fetchall(self) -> List[Result]: ...
def fetchmany(self, size: Optional[Union[int, None]]) -> List[Result]: ...
def fetchmany(self, size: Optional[int]) -> List[Result]: ...
def fetchone(self) -> Result: ...
def connect(server: Optional[str],