@@ -366,13 +366,13 @@ def _token_is_on_own_line(text_before_token: str) -> bool:
366
366
return _LSTRIP_BLOCK_PATTERN .search (text_before_token ) is not None
367
367
368
368
369
- def _create_template_function ( # pylint: disable=,too-many-locals,too-many-branches,too-many-statements
369
+ def _create_template_rendering_function ( # pylint: disable=,too-many-locals,too-many-branches,too-many-statements
370
370
template : str ,
371
371
language : str = Language .HTML ,
372
372
* ,
373
373
trim_blocks : bool = True ,
374
374
lstrip_blocks : bool = True ,
375
- function_name : str = "_ " ,
375
+ function_name : str = "__template_rendering_function " ,
376
376
context_name : str = "context" ,
377
377
dry_run : bool = False ,
378
378
) -> "Generator[str] | str" :
@@ -605,7 +605,9 @@ def __init__(self, template_string: str, *, language: str = Language.HTML) -> No
605
605
:param str template_string: String containing the template to be rendered
606
606
:param str language: Language for autoescaping. Defaults to HTML
607
607
"""
608
- self ._template_function = _create_template_function (template_string , language )
608
+ self ._template_function = _create_template_rendering_function (
609
+ template_string , language
610
+ )
609
611
610
612
def render_iter (
611
613
self , context : dict = None , * , chunk_size : int = None
0 commit comments