Fix Cursor type

This commit is contained in:
Trinh Anh Ngoc
2022-05-09 16:39:15 +07:00
parent 2f8836cb17
commit 807df75b70
2 changed files with 5 additions and 3 deletions

View File

@@ -1,7 +1,7 @@
from collections import Mapping
from typing import Any, Optional
from odoo.sql_db import Cursor
from ..sql_db import Cursor
_logger: Any
_schema: Any

View File

@@ -1,5 +1,7 @@
import psycopg2.extensions
from typing import Any, Optional
from typing import Any, Optional, TypeVar
_T = TypeVar('_T')
_logger: Any
@@ -47,7 +49,7 @@ class Cursor:
def _pop_event_handlers(self): ...
def commit(self): ...
def rollback(self): ...
def __enter__(self): ...
def __enter__(self: _T) -> _T: ...
def __exit__(self, exc_type: Any, exc_value: Any, traceback: Any) -> None: ...
def savepoint(self, flush: bool = ...) -> None: ...
def __getattr__(self, name: Any): ...