Skip to content

Commit

Permalink
Fix BaseModelFormSet.save_m2m: accept self (typeddjango#970)
Browse files Browse the repository at this point in the history
* 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`
  • Loading branch information
blueyed committed May 27, 2022
1 parent 42d8e18 commit 43b0828
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion django-stubs/forms/models.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -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: ...
Expand Down

0 comments on commit 43b0828

Please sign in to comment.