mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 21:14:48 +08:00
Update dbapi2.pyi to allow execute without binding params
According to https://docs.python.org/2/library/sqlite3.html this is totally allowed!
This commit is contained in:
@@ -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]: ...
|
||||
|
||||
Reference in New Issue
Block a user