Fix some errors with --disallow-any-generics (#3276)

See #3267. Covers all of stdlib/2and3.
This commit is contained in:
Guido van Rossum
2019-09-29 09:15:27 -07:00
committed by GitHub
parent 1e881ad156
commit b336182b69
27 changed files with 85 additions and 92 deletions

View File

@@ -130,9 +130,9 @@ class Connection(object):
def create_collation(self, name: str, callable: Any) -> None: ...
def create_function(self, name: str, num_params: int, func: Any) -> None: ...
def cursor(self, cursorClass: Optional[type] = ...) -> Cursor: ...
def execute(self, sql: str, parameters: Iterable = ...) -> Cursor: ...
def execute(self, sql: str, parameters: Iterable[Any] = ...) -> Cursor: ...
# TODO: please check in executemany() if seq_of_parameters type is possible like this
def executemany(self, sql: str, seq_of_parameters: Iterable[Iterable]) -> Cursor: ...
def executemany(self, sql: str, seq_of_parameters: Iterable[Iterable[Any]]) -> Cursor: ...
def executescript(self, sql_script: Union[bytes, Text]) -> Cursor: ...
def interrupt(self, *args, **kwargs) -> None: ...
def iterdump(self, *args, **kwargs) -> None: ...
@@ -168,8 +168,8 @@ class Cursor(Iterator[Any]):
# however, the name of the __init__ variable is unknown
def __init__(self, *args, **kwargs) -> None: ...
def close(self, *args, **kwargs) -> None: ...
def execute(self, sql: str, parameters: Iterable = ...) -> Cursor: ...
def executemany(self, sql: str, seq_of_parameters: Iterable[Iterable]) -> Cursor: ...
def execute(self, sql: str, parameters: Iterable[Any] = ...) -> Cursor: ...
def executemany(self, sql: str, seq_of_parameters: Iterable[Iterable[Any]]) -> Cursor: ...
def executescript(self, sql_script: Union[bytes, Text]) -> Cursor: ...
def fetchall(self) -> List[Any]: ...
def fetchmany(self, size: Optional[int] = ...) -> List[Any]: ...