Merge pull request #129 from isg/patch-2

Update dbapi2.pyi to allow `execute` without binding params
This commit is contained in:
Guido van Rossum
2016-03-23 13:30:57 -07:00
2 changed files with 4 additions and 4 deletions

View File

@@ -107,7 +107,7 @@ class Connection:
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= Union[type, None]) -> Cursor: ...
def execute(self, sql: str, parameters: Iterable) -> Cursor: ...
def execute(self, sql: str, parameters: Iterable = ...) -> 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 executescript(self, sql_script: Union[bytes, unicode]) -> Cursor: ...
@@ -137,7 +137,7 @@ class Cursor:
# however, the name of the __init__ variable is unknown
def __init__(self, *args, **kwargs): ...
def close(self, *args, **kwargs): ...
def execute(self, sql: str, parameters: Iterable) -> Cursor: ...
def execute(self, sql: str, parameters: Iterable = ...) -> Cursor: ...
def executemany(self, sql: str, seq_of_parameters: Iterable[Iterable]): ...
def executescript(self, sql_script: Union[bytes, unicode]) -> Cursor: ...
def fetchall(self) -> List[tuple]: ...

View File

@@ -107,7 +107,7 @@ class Connection:
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= Union[type, None]) -> Cursor: ...
def execute(self, sql: str, parameters: Iterable) -> Cursor: ...
def execute(self, sql: str, parameters: Iterable = ...) -> 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 executescript(self, sql_script: Union[bytes, AnyStr]) -> Cursor: ...
@@ -137,7 +137,7 @@ class Cursor:
# however, the name of the __init__ variable is unknown
def __init__(self, *args, **kwargs): ...
def close(self, *args, **kwargs): ...
def execute(self, sql: str, parameters: Iterable) -> Cursor: ...
def execute(self, sql: str, parameters: Iterable = ...) -> Cursor: ...
def executemany(self, sql: str, seq_of_parameters: Iterable[Iterable]): ...
def executescript(self, sql_script: Union[bytes, AnyStr]) -> Cursor: ...
def fetchall(self) -> List[tuple]: ...