mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-10 22:11:54 +08:00
mysqlclient.connection: add missing type hints (#8393)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
from _typeshed import Self
|
||||
from types import TracebackType
|
||||
from typing import Any
|
||||
|
||||
from . import _mysql, cursors as cursors
|
||||
from . import _mysql, cursors
|
||||
from ._exceptions import (
|
||||
DatabaseError as DatabaseError,
|
||||
DataError as DataError,
|
||||
@@ -20,16 +21,18 @@ re_numeric_part: Any
|
||||
def numeric_part(s): ...
|
||||
|
||||
class Connection(_mysql.connection):
|
||||
default_cursor: Any
|
||||
cursorclass: Any
|
||||
default_cursor: type[cursors.Cursor]
|
||||
cursorclass: type[cursors.BaseCursor]
|
||||
encoders: Any
|
||||
encoding: str
|
||||
messages: Any
|
||||
def __init__(self, *args, **kwargs): ...
|
||||
def __init__(self, *args, **kwargs) -> None: ...
|
||||
def __enter__(self: Self) -> Self: ...
|
||||
def __exit__(self, exc_type, exc_value, traceback) -> None: ...
|
||||
def autocommit(self, on) -> None: ...
|
||||
def cursor(self, cursorclass: Any | None = ...): ...
|
||||
def __exit__(
|
||||
self, exc_type: type[BaseException] | None, exc_value: BaseException | None, traceback: TracebackType | None
|
||||
) -> None: ...
|
||||
def autocommit(self, on: bool) -> None: ...
|
||||
def cursor(self, cursorclass: type[cursors.BaseCursor] | None = ...): ...
|
||||
def query(self, query) -> None: ...
|
||||
def literal(self, o): ...
|
||||
def begin(self) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user