mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-17 17:35:59 +08:00
fixes for ci imports failures
This commit is contained in:
@@ -22,15 +22,16 @@ class ForeignObjectRel(FieldCacheMixin):
|
||||
editable: bool = ...
|
||||
is_relation: bool = ...
|
||||
null: bool = ...
|
||||
field: Field = ...
|
||||
field: RelatedField = ...
|
||||
model: Union[Type[Model], str] = ...
|
||||
related_name: Optional[str] = ...
|
||||
related_query_name: None = ...
|
||||
limit_choices_to: Dict[Any, Any] = ...
|
||||
related_query_name: Optional[str] = ...
|
||||
limit_choices_to: Union[Callable, Dict[str, Any]] = ...
|
||||
parent_link: bool = ...
|
||||
on_delete: Callable = ...
|
||||
symmetrical: bool = ...
|
||||
multiple: bool = ...
|
||||
field_name: Optional[str] = ...
|
||||
def __init__(
|
||||
self,
|
||||
field: RelatedField,
|
||||
@@ -41,17 +42,10 @@ class ForeignObjectRel(FieldCacheMixin):
|
||||
parent_link: bool = ...,
|
||||
on_delete: Optional[Callable] = ...,
|
||||
) -> None: ...
|
||||
def hidden(self) -> bool: ...
|
||||
def name(self) -> str: ...
|
||||
@property
|
||||
def remote_field(self) -> RelatedField: ...
|
||||
@property
|
||||
def target_field(self) -> AutoField: ...
|
||||
def related_model(self) -> Type[Model]: ...
|
||||
def many_to_many(self) -> bool: ...
|
||||
def many_to_one(self) -> bool: ...
|
||||
def one_to_many(self) -> bool: ...
|
||||
def one_to_one(self) -> bool: ...
|
||||
def get_lookup(self, lookup_name: str) -> Type[BuiltinLookup]: ...
|
||||
def get_internal_type(self) -> str: ...
|
||||
@property
|
||||
@@ -64,14 +58,12 @@ class ForeignObjectRel(FieldCacheMixin):
|
||||
def get_extra_restriction(
|
||||
self, where_class: Type[WhereNode], alias: str, related_alias: str
|
||||
) -> Optional[Union[StartsWith, WhereNode]]: ...
|
||||
field_name: None = ...
|
||||
def set_field_name(self) -> None: ...
|
||||
def get_accessor_name(self, model: Optional[Type[Model]] = ...) -> Optional[str]: ...
|
||||
def get_path_info(self, filtered_relation: Optional[FilteredRelation] = ...) -> List[PathInfo]: ...
|
||||
def get_cache_name(self) -> str: ...
|
||||
|
||||
class ManyToOneRel(ForeignObjectRel):
|
||||
field: ForeignKey
|
||||
field: RelatedField
|
||||
hidden: bool
|
||||
limit_choices_to: Any
|
||||
many_to_many: bool
|
||||
@@ -87,7 +79,6 @@ class ManyToOneRel(ForeignObjectRel):
|
||||
related_name: Optional[str]
|
||||
related_query_name: Optional[str]
|
||||
symmetrical: bool
|
||||
field_name: Optional[str] = ...
|
||||
def __init__(
|
||||
self,
|
||||
field: ForeignKey,
|
||||
@@ -103,7 +94,6 @@ class ManyToOneRel(ForeignObjectRel):
|
||||
def set_field_name(self) -> None: ...
|
||||
|
||||
class OneToOneRel(ManyToOneRel):
|
||||
field: OneToOneField
|
||||
field_name: Optional[str]
|
||||
hidden: bool
|
||||
limit_choices_to: Dict[str, str]
|
||||
@@ -133,20 +123,11 @@ class OneToOneRel(ManyToOneRel):
|
||||
) -> None: ...
|
||||
|
||||
class ManyToManyRel(ForeignObjectRel):
|
||||
field: RelatedField
|
||||
field_name: None
|
||||
hidden: bool
|
||||
limit_choices_to: Union[Callable, Dict[str, str]]
|
||||
model: Union[Type[Model], str]
|
||||
multiple: bool
|
||||
name: str
|
||||
on_delete: None
|
||||
one_to_many: bool
|
||||
one_to_one: bool
|
||||
parent_link: bool
|
||||
related_model: Type[Model]
|
||||
related_name: Optional[str]
|
||||
related_query_name: Optional[str]
|
||||
through: Optional[Union[Type[Model], str]] = ...
|
||||
through_fields: Optional[Tuple[str, str]] = ...
|
||||
symmetrical: bool = ...
|
||||
|
||||
Reference in New Issue
Block a user