Skip to content

Commit 0be73eb

Browse files
This is a regular dict at runtime (#2604)
1 parent c853da0 commit 0be73eb

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

django-stubs/forms/forms.pyi

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from collections.abc import Iterable, Iterator, Mapping
1+
from collections.abc import Iterable, Iterator, MutableMapping
22
from typing import Any, ClassVar
33

44
from django.core.exceptions import ValidationError
@@ -19,7 +19,7 @@ class BaseForm(RenderableFormMixin):
1919
data: _DataT
2020
files: _FilesT
2121
auto_id: bool | str
22-
initial: Mapping[str, Any]
22+
initial: MutableMapping[str, Any]
2323
error_class: type[ErrorList]
2424
prefix: str | None
2525
label_suffix: str
@@ -38,7 +38,7 @@ class BaseForm(RenderableFormMixin):
3838
files: _FilesT | None = None,
3939
auto_id: bool | str = "id_%s",
4040
prefix: str | None = None,
41-
initial: Mapping[str, Any] | None = None,
41+
initial: MutableMapping[str, Any] | None = None,
4242
error_class: type[ErrorList] = ...,
4343
label_suffix: str | None = None,
4444
empty_permitted: bool = False,

django-stubs/forms/models.pyi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from collections.abc import Callable, Collection, Container, Iterator, Mapping, Sequence
1+
from collections.abc import Callable, Collection, Container, Iterator, Mapping, MutableMapping, Sequence
22
from typing import Any, ClassVar, Generic, Literal, TypeAlias, TypeVar, overload
33
from uuid import UUID
44

@@ -76,7 +76,7 @@ class BaseModelForm(Generic[_M], BaseForm):
7676
files: _FilesT | None = None,
7777
auto_id: bool | str = "id_%s",
7878
prefix: str | None = None,
79-
initial: Mapping[str, Any] | None = None,
79+
initial: MutableMapping[str, Any] | None = None,
8080
error_class: type[ErrorList] = ...,
8181
label_suffix: str | None = None,
8282
empty_permitted: bool = False,

0 commit comments

Comments
 (0)