mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-14 15:57:08 +08:00
add plugin support for ArrayField base_field
This commit is contained in:
@@ -1,11 +1,14 @@
|
||||
from typing import List, Any
|
||||
from typing import List, Any, TypeVar, Generic
|
||||
|
||||
from django.contrib.postgres.fields.mixins import CheckFieldDefaultMixin
|
||||
from django.db.models import Field
|
||||
|
||||
_T = TypeVar('_T', bound=Field)
|
||||
|
||||
class ArrayField(CheckFieldDefaultMixin, Field):
|
||||
|
||||
class ArrayField(CheckFieldDefaultMixin, Field, Generic[_T]):
|
||||
def __init__(self,
|
||||
base_field: Field,
|
||||
**kwargs): ...
|
||||
def __get__(self, instance, owner) -> List[Any]: ...
|
||||
|
||||
def __get__(self, instance, owner) -> List[_T]: ...
|
||||
|
||||
Reference in New Issue
Block a user