mirror of
https://github.com/rendercv/rendercv.git
synced 2026-10-24 13:18:50 -04:00
use write_text instead of open
This commit is contained in:
1 parent
27e46e0c4f
commit
eb10184852
1 file changed
+2
-2
@@ -20,6 +20,7 @@ from typing import Optional, Literal
|
||||
import jinja2
|
||||
|
||||
from . import data_models as dm
|
||||
|
||||
# from .user_communicator import time_the_event_below
|
||||
|
||||
|
||||
@@ -145,8 +146,7 @@ class LaTeXFile:
|
||||
|
||||
def write_to_file(self, file_path: pathlib.Path):
|
||||
"""Write the $\\LaTeX$ code to a file."""
|
||||
with open(file_path, "w") as latex_file:
|
||||
latex_file.write(self.get_latex_code())
|
||||
file_path.write_text(self.get_latex_code())
|
||||
|
||||
|
||||
def make_matched_part_something(
|
||||
|
||||
Reference in new issue
Block a user