@@ -412,32 +412,32 @@ def cli(opts: argparse.Namespace, args: Sequence[str]) -> int:
412412
413413 data .update (parse_kv_string (opts .D or []))
414414
415+ rendered = render (
416+ template_path ,
417+ data ,
418+ extensions ,
419+ opts .strict ,
420+ trim_blocks = opts .trim_blocks ,
421+ lstrip_blocks = opts .lstrip_blocks ,
422+ autoescape = opts .autoescape ,
423+ variable_start_string = opts .variable_start ,
424+ variable_end_string = opts .variable_end ,
425+ block_start_string = opts .block_start ,
426+ block_end_string = opts .block_end ,
427+ comment_start_string = opts .comment_start ,
428+ comment_end_string = opts .comment_end ,
429+ line_statement_prefix = opts .line_statement_prefix ,
430+ line_comment_prefix = opts .line_comment_prefix ,
431+ newline_sequence = opts .newline_sequence ,
432+ search_paths = opts .search_paths ,
433+ )
434+
415435 if opts .outfile is None :
416436 out = sys .stdout
417437 else :
418438 out = open (opts .outfile , "w" )
419439
420- out .write (
421- render (
422- template_path ,
423- data ,
424- extensions ,
425- opts .strict ,
426- trim_blocks = opts .trim_blocks ,
427- lstrip_blocks = opts .lstrip_blocks ,
428- autoescape = opts .autoescape ,
429- variable_start_string = opts .variable_start ,
430- variable_end_string = opts .variable_end ,
431- block_start_string = opts .block_start ,
432- block_end_string = opts .block_end ,
433- comment_start_string = opts .comment_start ,
434- comment_end_string = opts .comment_end ,
435- line_statement_prefix = opts .line_statement_prefix ,
436- line_comment_prefix = opts .line_comment_prefix ,
437- newline_sequence = opts .newline_sequence ,
438- search_paths = opts .search_paths ,
439- )
440- )
440+ out .write (rendered )
441441 out .flush ()
442442 return 0
443443
0 commit comments