mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-20 19:01:16 +08:00
fix star import parsing for settings
This commit is contained in:
@@ -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]):
|
||||
|
||||
Reference in New Issue
Block a user