mirror of
https://github.com/davidhalter/django-stubs.git
synced 2026-11-06 04:13:03 +08:00
fix: remove SuccessMessageMixin.form_valid violation of Liskov substitution principle (#84)
This commit is contained in:
1 parent
0e60b70ae4
commit
629ba954b4
1 file changed
+2
-2
@@ -1,9 +1,9 @@
|
|||||||
from typing import Any, Dict, Optional
|
from typing import Any, Dict, Optional
|
||||||
|
|
||||||
from django.forms.forms import Form
|
from django.forms.forms import BaseForm
|
||||||
from django.http.response import HttpResponseRedirect
|
from django.http.response import HttpResponseRedirect
|
||||||
|
|
||||||
class SuccessMessageMixin:
|
class SuccessMessageMixin:
|
||||||
success_message: str = ...
|
success_message: str = ...
|
||||||
def form_valid(self, form: Form) -> HttpResponseRedirect: ...
|
def form_valid(self, form: BaseForm) -> HttpResponseRedirect: ...
|
||||||
def get_success_message(self, cleaned_data: Dict[str, str]) -> str: ...
|
def get_success_message(self, cleaned_data: Dict[str, str]) -> str: ...
|
||||||
Reference in new issue
Block a user