Rename ValuesQuerySet -> _ValuesQuerySet and remove _BaseQuerySet. Ma… (#654)

* Rename ValuesQuerySet -> _ValuesQuerySet and remove _BaseQuerySet. Make a public alias called ValuesQuerySet in django_stubs_ext.

* Update tests
This commit is contained in:
Seth Yastrov
2021-06-28 12:23:00 +02:00
committed by GitHub
parent 29e971ed9d
commit f9317c7679
10 changed files with 58 additions and 32 deletions

View File

@@ -1,3 +1,4 @@
from .aliases import ValuesQuerySet as ValuesQuerySet
from .patch import monkeypatch as monkeypatch
__all__ = ["monkeypatch"]
__all__ = ["monkeypatch", "ValuesQuerySet"]

View File

@@ -0,0 +1,8 @@
import typing
if typing.TYPE_CHECKING:
from django.db.models.query import _T, _Row, _ValuesQuerySet
ValuesQuerySet = _ValuesQuerySet[_T, _Row]
else:
ValuesQuerySet = typing.Any