fix star import parsing for settings

This commit is contained in:
Maxim Kurnikov
2019-02-14 03:16:07 +03:00
parent f30cd092f1
commit a08ad80a0d
6 changed files with 106 additions and 43 deletions

View File

@@ -33,7 +33,7 @@ from django.db.models.fields.reverse_related import (
)
from django.db.models.query_utils import PathInfo, Q
from django.db.models.expressions import F
from django.db.models.expressions import Combinable
if TYPE_CHECKING:
from django.db.models.manager import RelatedManager
@@ -105,11 +105,12 @@ class ForeignObject(RelatedField):
class ForeignKey(RelatedField, Generic[_T]):
def __init__(self, to: Union[Type[_T], str], on_delete: Any, related_name: str = ..., **kwargs): ...
def __set__(self, instance, value: Union[Model, F]) -> None: ...
def __set__(self, instance, value: Union[Model, Combinable]) -> None: ...
def __get__(self, instance, owner) -> _T: ...
class OneToOneField(RelatedField, Generic[_T]):
def __init__(self, to: Union[Type[_T], str], on_delete: Any, related_name: str = ..., **kwargs): ...
def __set__(self, instance, value: Union[Model, Combinable]) -> None: ...
def __get__(self, instance, owner) -> _T: ...
class ManyToManyField(RelatedField, Generic[_T]):