@@ -4,11 +4,10 @@ from _typeshed import ReadableBuffer, Self, StrOrBytesPath, SupportsLenAndGetIte
4
4
from collections .abc import Callable , Generator , Iterable , Iterator , Mapping
5
5
from datetime import date , datetime , time
6
6
from types import TracebackType
7
- from typing import Any , Generic , Protocol , TypeVar , overload
7
+ from typing import Any , Protocol , TypeVar , overload
8
8
from typing_extensions import Literal , SupportsIndex , TypeAlias , final
9
9
10
10
_T = TypeVar ("_T" )
11
- _T_co = TypeVar ("_T_co" , covariant = True )
12
11
_CursorT = TypeVar ("_CursorT" , bound = Cursor )
13
12
_SqliteData : TypeAlias = str | ReadableBuffer | int | float | None
14
13
# Data that is passed through adapters can be of any type accepted by an adapter.
@@ -379,7 +378,7 @@ class Cursor(Iterator[Any]):
379
378
def description (self ) -> tuple [tuple [str , None , None , None , None , None , None ], ...] | Any : ...
380
379
@property
381
380
def lastrowid (self ) -> int | None : ...
382
- row_factory : Callable [[Cursor , Row [ Any ] ], object ] | None
381
+ row_factory : Callable [[Cursor , Row ], object ] | None
383
382
@property
384
383
def rowcount (self ) -> int : ...
385
384
def __init__ (self , __cursor : Connection ) -> None : ...
@@ -420,15 +419,15 @@ class PrepareProtocol:
420
419
421
420
class ProgrammingError (DatabaseError ): ...
422
421
423
- class Row ( Generic [ _T_co ]) :
424
- def __init__ (self , __cursor : Cursor , __data : tuple [_T_co , ...]) -> None : ...
422
+ class Row :
423
+ def __init__ (self , __cursor : Cursor , __data : tuple [Any , ...]) -> None : ...
425
424
def keys (self ) -> list [str ]: ...
426
425
@overload
427
- def __getitem__ (self , __index : int | str ) -> _T_co : ...
426
+ def __getitem__ (self , __index : int | str ) -> Any : ...
428
427
@overload
429
- def __getitem__ (self , __index : slice ) -> tuple [_T_co , ...]: ...
428
+ def __getitem__ (self , __index : slice ) -> tuple [Any , ...]: ...
430
429
def __hash__ (self ) -> int : ...
431
- def __iter__ (self ) -> Iterator [_T_co ]: ...
430
+ def __iter__ (self ) -> Iterator [Any ]: ...
432
431
def __len__ (self ) -> int : ...
433
432
# These return NotImplemented for anything that is not a Row.
434
433
def __eq__ (self , __other : object ) -> bool : ...
0 commit comments