Skip to content

Commit 7ec23b1

Browse files
committed
remove typing protocols
1 parent f08ef58 commit 7ec23b1

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

evap/evaluation/tools.py

+2-8
Original file line numberDiff line numberDiff line change
@@ -189,12 +189,6 @@ def formset_valid(self, formset) -> HttpResponse:
189189
return super().form_valid(formset)
190190

191191

192-
@typing.runtime_checkable
193-
class HasFormValid(Protocol):
194-
def form_valid(self, form):
195-
pass
196-
197-
198192
class SaveValidFormMixin:
199193
"""
200194
Call `form.save()` if the submitted form is valid.
@@ -203,9 +197,9 @@ class SaveValidFormMixin:
203197
example if a formset for a collection of objects is submitted.
204198
"""
205199

206-
def form_valid(self: HasFormValid, form) -> HttpResponse:
200+
def form_valid(self, form) -> HttpResponse:
207201
form.save()
208-
return super().form_valid(form)
202+
return super().form_valid(form) # type: ignore[misc]
209203

210204

211205
class AttachmentResponse(HttpResponse):

0 commit comments

Comments
 (0)