1- from typing import List , Optional , Tuple , Union
1+ from typing import Any , Mapping , Optional , Sequence , Union
22
33from django .http import HttpRequest , HttpResponse
44from django .template import Context , loader
@@ -18,9 +18,9 @@ class Jinja2Template: # type: ignore[no-redef]
1818
1919
2020def render_block_to_string (
21- template_name : Union [str , Tuple [ str ], List [str ]],
21+ template_name : Union [str , Sequence [str ]],
2222 block_name : str ,
23- context : Optional [Context ] = None ,
23+ context : Optional [Union [ Context , Mapping [ str , Any ]] ] = None ,
2424 request : Optional [HttpRequest ] = None ,
2525) -> str :
2626 """
@@ -62,9 +62,9 @@ def render_block_to_string(
6262
6363def render_block (
6464 request : HttpRequest ,
65- template_name : str ,
65+ template_name : Union [ str , Sequence [ str ]] ,
6666 block_name : str ,
67- context : Optional [Context ] = None ,
67+ context : Optional [Union [ Context , Mapping [ str , Any ]] ] = None ,
6868 content_type : Optional [str ] = None ,
6969 status : Optional [int ] = None ,
7070) -> HttpResponse :
0 commit comments