@@ -13,7 +13,6 @@ from typing_extensions import Self, TypeAlias, TypeVar, deprecated
1313_T = TypeVar ("_T" , covariant = True )
1414_Model = TypeVar ("_Model" , bound = Model , covariant = True )
1515_Row = TypeVar ("_Row" , covariant = True , default = _Model ) # ONLY use together with _Model
16- _QS = TypeVar ("_QS" , bound = _QuerySet )
1716_TupleT = TypeVar ("_TupleT" , bound = tuple [Any , ...], covariant = True )
1817
1918MAX_GET_RESULTS : int
@@ -60,7 +59,7 @@ class QuerySet(Generic[_Model, _Row], Iterable[_Row], Sized):
6059 def as_manager (cls ) -> Manager [_Model ]: ...
6160 def __len__ (self ) -> int : ...
6261 def __bool__ (self ) -> bool : ...
63- def __class_getitem__ (cls : type [ _QS ] , item : type [_Model ]) -> type [ _QS ] : ...
62+ def __class_getitem__ (cls , item : type [_Model ]) -> Self : ...
6463 def __getstate__ (self ) -> dict [str , Any ]: ...
6564 # Technically, the other QuerySet must be of the same type _T, but _T is covariant
6665 def __and__ (self , other : QuerySet [_Model , _Row ]) -> Self : ...
@@ -228,7 +227,7 @@ class RawQuerySet(Iterable[_Model], Sized):
228227 def using (self , alias : str | None ) -> RawQuerySet [_Model ]: ...
229228
230229# Deprecated alias of QuerySet, for compatibility only.
231- _QuerySet : TypeAlias = QuerySet
230+ _QuerySet : TypeAlias = QuerySet # noqa: PYI047
232231
233232class Prefetch :
234233 prefetch_through : str
0 commit comments