Fix BaseModelFormSet.save_m2m: accept self (#970)

* Fix BaseModelFormSet.save_m2m: accept `self`

Before it would result in the following when calling it:

> Attribute function "save_m2m" with type "Callable[[], None]" does not accept self argument  [misc]

* fixup! Fix BaseModelFormSet.save_m2m: accept `self`
This commit is contained in:
Daniel Hahler
2022-05-27 12:42:45 +02:00
committed by GitHub
parent 42d8e18bf8
commit 43b082850c

View File

@@ -150,7 +150,7 @@ class BaseModelFormSet(Generic[_M, _ModelFormT], BaseFormSet[_ModelFormT]):
def save_existing(self, form: _ModelFormT, instance: _M, commit: bool = ...) -> _M: ...
def delete_existing(self, obj: _M, commit: bool = ...) -> None: ...
saved_forms: List[_ModelFormT] = ...
save_m2m: Callable[[], None] = ...
def save_m2m(self) -> None: ...
def save(self, commit: bool = ...) -> List[_M]: ...
def clean(self) -> None: ...
def validate_unique(self) -> None: ...