Skip to content

Commit 629ba95

Browse files
antonagestammkurnikov
authored andcommitted
fix: remove SuccessMessageMixin.form_valid violation of Liskov substitution principle (typeddjango#84)
1 parent 0e60b70 commit 629ba95

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
from typing import Any, Dict, Optional
22

3-
from django.forms.forms import Form
3+
from django.forms.forms import BaseForm
44
from django.http.response import HttpResponseRedirect
55

66
class SuccessMessageMixin:
77
success_message: str = ...
8-
def form_valid(self, form: Form) -> HttpResponseRedirect: ...
8+
def form_valid(self, form: BaseForm) -> HttpResponseRedirect: ...
99
def get_success_message(self, cleaned_data: Dict[str, str]) -> str: ...

0 commit comments

Comments
 (0)