Open
Description
I'd be in favor of removing the typing on CspRenderingTestCase
. I'm not in favor of utilizing type hinting to that extent.
I know we have an issue to bring typing to the library, but I'm not sure I'm in agreement with that any more. The type hinting below seems to only be beneficial to a particular developer set up that we don't have documented anywhere. I think that inconsistency isn't worth it.
response = cast(HttpResponse, self.client.get(path="/regular/basic/"))
self.assertEqual(response.status_code, 200)
html_root: Element = self.parser.parse(stream=response.content)
self._fail_on_invalid_html(content=response.content, parser=self.parser)
self.assertContains(response, "djDebug")
namespaces = get_namespaces(element=html_root)
context: ContextList = response.context # pyright: ignore[reportAttributeAccessIssue]
Metadata
Metadata
Assignees
Labels
No labels