mirror of
https://github.com/django-components/django-components.git
synced 2025-11-17 13:52:56 +00:00
refactor: fix linter errors
This commit is contained in:
parent
5b1359addc
commit
83df109c1c
2 changed files with 3 additions and 3 deletions
|
|
@ -1243,7 +1243,7 @@ class TestComponentRender:
|
|||
def get(self, request):
|
||||
how = "via GET request"
|
||||
|
||||
return self.component_cls.render_to_response(
|
||||
return self.component_cls.render_to_response( # type: ignore[attr-defined]
|
||||
context=RequestContext(request),
|
||||
kwargs={"how": how},
|
||||
)
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@ class TestComponentAsView:
|
|||
|
||||
class View:
|
||||
def get(self, request, *args, **kwargs) -> HttpResponse:
|
||||
return self.component_cls.render_to_response(kwargs={"variable": "GET"})
|
||||
return self.component_cls.render_to_response(kwargs={"variable": "GET"}) # type: ignore[attr-defined]
|
||||
|
||||
client = CustomClient(urlpatterns=[path("test/", MockComponentRequest.as_view())])
|
||||
response = client.get("/test/")
|
||||
|
|
@ -148,7 +148,7 @@ class TestComponentAsView:
|
|||
class View:
|
||||
def post(self, request, *args, **kwargs) -> HttpResponse:
|
||||
variable = request.POST.get("variable")
|
||||
return self.component.render_to_response(kwargs={"variable": variable})
|
||||
return self.component_cls.render_to_response(kwargs={"variable": variable}) # type: ignore[attr-defined]
|
||||
|
||||
client = CustomClient(urlpatterns=[path("test/", MockComponentRequest.as_view())])
|
||||
response = client.post("/test/", {"variable": "POST"})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue