|
1 | 1 | import abc |
2 | 2 | from typing import Any |
3 | 3 |
|
4 | | -from ..util import ABC as ABC |
| 4 | +from .interfaces import _DBAPIConnection |
| 5 | +from .interfaces import Dialect |
| 6 | +from ..util import ABC |
5 | 7 |
|
6 | 8 | class ConnectionCharacteristic(ABC, metaclass=abc.ABCMeta): |
7 | 9 | transactional: bool = ... |
8 | 10 | @abc.abstractmethod |
9 | | - def reset_characteristic(self, dialect: Any, dbapi_conn: Any) -> Any: ... |
| 11 | + def reset_characteristic( |
| 12 | + self, dialect: Dialect, dbapi_conn: _DBAPIConnection |
| 13 | + ) -> None: ... |
10 | 14 | @abc.abstractmethod |
11 | 15 | def set_characteristic( |
12 | | - self, dialect: Any, dbapi_conn: Any, value: Any |
13 | | - ) -> Any: ... |
| 16 | + self, dialect: Dialect, dbapi_conn: _DBAPIConnection, value: Any |
| 17 | + ) -> None: ... |
14 | 18 | @abc.abstractmethod |
15 | | - def get_characteristic(self, dialect: Any, dbapi_conn: Any) -> Any: ... |
| 19 | + def get_characteristic( |
| 20 | + self, dialect: Dialect, dbapi_conn: _DBAPIConnection |
| 21 | + ) -> Any: ... |
16 | 22 |
|
17 | 23 | class IsolationLevelCharacteristic(ConnectionCharacteristic): |
18 | 24 | transactional: bool = ... |
19 | | - def reset_characteristic(self, dialect: Any, dbapi_conn: Any) -> None: ... |
| 25 | + def reset_characteristic( |
| 26 | + self, dialect: Dialect, dbapi_conn: _DBAPIConnection |
| 27 | + ) -> None: ... |
20 | 28 | def set_characteristic( |
21 | | - self, dialect: Any, dbapi_conn: Any, value: Any |
| 29 | + self, dialect: Dialect, dbapi_conn: _DBAPIConnection, value: Any |
22 | 30 | ) -> None: ... |
23 | | - def get_characteristic(self, dialect: Any, dbapi_conn: Any): ... |
| 31 | + def get_characteristic( |
| 32 | + self, dialect: Dialect, dbapi_conn: _DBAPIConnection |
| 33 | + ) -> Any: ... |
0 commit comments