Fix Cursor type

This commit is contained in:
Trinh Anh Ngoc
2022-05-09 12:05:24 +07:00
parent e483bc58a8
commit 98a7157fa6
2 changed files with 5 additions and 3 deletions

View File

@@ -1,7 +1,7 @@
from collections.abc 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,8 +1,10 @@
import psycopg2.extensions
from typing import Any, Optional
from typing import Any, Optional, TypeVar
from .tools import Callbacks
_T = TypeVar('_T')
_logger: Any
def unbuffer(symb: Any, cr: Any): ...
@@ -24,7 +26,7 @@ class BaseCursor:
postrollback: Callbacks
def __init__(self) -> None: ...
def savepoint(self, flush: bool = ...) -> None: ...
def __enter__(self): ...
def __enter__(self: _T) -> _T: ...
def __exit__(self, exc_type: Any, exc_value: Any, traceback: Any) -> None: ...
class Cursor(BaseCursor):