mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-08 13:04:47 +08:00
move generated stubs to separate directory, too messty
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
from typing import Any, Dict, List, Optional, Tuple, Union
|
||||
from typing import Any, Dict, List, Optional, Tuple, Union, TypeVar, Type, Generic
|
||||
|
||||
from django.contrib.postgres import lookups
|
||||
from django.db.models import Field, Transform
|
||||
@@ -7,16 +7,19 @@ from django.db.models.lookups import Exact, In
|
||||
|
||||
from .mixins import CheckFieldDefaultMixin
|
||||
|
||||
_T = TypeVar('_T', bound=Field)
|
||||
|
||||
class ArrayField(CheckFieldDefaultMixin, Field):
|
||||
|
||||
class ArrayField(CheckFieldDefaultMixin, Field, Generic[_T]):
|
||||
empty_strings_allowed: bool = ...
|
||||
default_error_messages: Any = ...
|
||||
base_field: Any = ...
|
||||
size: Any = ...
|
||||
default_validators: Any = ...
|
||||
from_db_value: Any = ...
|
||||
|
||||
def __init__(
|
||||
self, base_field: Field, size: None = ..., **kwargs: Any
|
||||
self, base_field: _T, size: None = ..., **kwargs: Any
|
||||
) -> None: ...
|
||||
@property
|
||||
def model(self): ...
|
||||
@@ -41,6 +44,7 @@ class ArrayField(CheckFieldDefaultMixin, Field):
|
||||
def validate(self, value: Any, model_instance: Any) -> None: ...
|
||||
def run_validators(self, value: Any) -> None: ...
|
||||
def formfield(self, **kwargs: Any): ...
|
||||
def __get__(self, instance, owner) -> List[_T]: ...
|
||||
|
||||
class ArrayContains(lookups.DataContains):
|
||||
def as_sql(self, qn: Any, connection: Any): ...
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user