mirror of
https://github.com/davidhalter/django-stubs.git
synced 2026-03-04 22:31:26 +08:00
improved version
This commit is contained in:
@@ -19,6 +19,7 @@ from typing import (
|
||||
Any,
|
||||
List,
|
||||
Optional,
|
||||
Type,
|
||||
Union,
|
||||
)
|
||||
|
||||
@@ -27,7 +28,7 @@ class AutoField:
|
||||
def __init__(self, *args, **kwargs) -> None: ...
|
||||
def _check_primary_key(self) -> List[Any]: ...
|
||||
def check(self, **kwargs) -> List[Any]: ...
|
||||
def contribute_to_class(self, cls: Any, name: str, **kwargs) -> None: ...
|
||||
def contribute_to_class(self, cls: Type[Model], name: str, **kwargs) -> None: ...
|
||||
def deconstruct(self) -> Any: ...
|
||||
def formfield(self, **kwargs) -> None: ...
|
||||
def get_db_prep_value(
|
||||
@@ -86,7 +87,7 @@ class CharField:
|
||||
def check(self, **kwargs) -> List[Error]: ...
|
||||
def formfield(self, **kwargs) -> Union[CharField, TypedChoiceField]: ...
|
||||
def get_internal_type(self) -> str: ...
|
||||
def get_prep_value(self, value: Any) -> object: ...
|
||||
def get_prep_value(self, value: object) -> object: ...
|
||||
def to_python(self, value: Optional[Union[int, str, Model]]) -> Optional[str]: ...
|
||||
|
||||
|
||||
@@ -100,15 +101,15 @@ class DateField:
|
||||
**kwargs
|
||||
) -> None: ...
|
||||
def _check_fix_default_value(self) -> List[Warning]: ...
|
||||
def contribute_to_class(self, cls: Any, name: str, **kwargs) -> None: ...
|
||||
def contribute_to_class(self, cls: Type[Model], name: str, **kwargs) -> None: ...
|
||||
def deconstruct(self) -> Any: ...
|
||||
def formfield(
|
||||
self,
|
||||
**kwargs
|
||||
) -> Union[SplitDateTimeField, BaseTemporalField]: ...
|
||||
) -> Union[BaseTemporalField, SplitDateTimeField]: ...
|
||||
def get_db_prep_value(
|
||||
self,
|
||||
value: Optional[Union[date, str]],
|
||||
value: Optional[Union[str, date]],
|
||||
connection: DatabaseWrapper,
|
||||
prepared: bool = ...
|
||||
) -> Optional[str]: ...
|
||||
|
||||
Reference in New Issue
Block a user