mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-20 10:51:16 +08:00
Change InlineModelAdmin.formset to Type[BaseInlineFormSet] (#521)
* Change InlineModelAdmin.formset to Type[BaseInlineFormSet] * More exact annotations + add NaturalTimeFormatter * Correction: cls type is Type[...] * Complete annotations for PasswordResetTokenGenerator * fix *gettext*_lazy annotations
This commit is contained in:
@@ -17,7 +17,7 @@ from typing import (
|
||||
)
|
||||
|
||||
from django.forms.forms import BaseForm
|
||||
from django.forms.formsets import BaseFormSet
|
||||
from django.forms.models import BaseInlineFormSet
|
||||
from typing_extensions import Literal, TypedDict
|
||||
|
||||
from django.contrib.admin.filters import ListFilter
|
||||
@@ -268,7 +268,7 @@ class ModelAdmin(BaseModelAdmin[_ModelT]):
|
||||
class InlineModelAdmin(BaseModelAdmin[_ModelT]):
|
||||
model: Type[_ModelT] = ...
|
||||
fk_name: str = ...
|
||||
formset: BaseFormSet = ...
|
||||
formset: Type[BaseInlineFormSet] = ...
|
||||
extra: int = ...
|
||||
min_num: Optional[int] = ...
|
||||
max_num: Optional[int] = ...
|
||||
|
||||
Reference in New Issue
Block a user