update docstrings

This commit is contained in:
Sina Atalay 2024-02-24 16:20:13 +01:00
parent cdbbc46b5c
commit dfa23b9fbb
3 changed files with 7 additions and 7 deletions

View File

@ -411,7 +411,7 @@ def cli_command_render(
help="Use the local LaTeX installation instead of the RenderCV's TinyTeX.", help="Use the local LaTeX installation instead of the RenderCV's TinyTeX.",
), ),
): ):
"""Generate a LaTeX CV from a YAML input file. """Generate a $\\LaTeX$ CV from a YAML input file.
Args: Args:
input_file_path (str): Path to the YAML input file as a string. input_file_path (str): Path to the YAML input file as a string.

View File

@ -2,7 +2,7 @@
This module contains all the necessary classes to store CV data. These classes are called This module contains all the necessary classes to store CV data. These classes are called
data models. The YAML input file is transformed into instances of these classes (i.e., data models. The YAML input file is transformed into instances of these classes (i.e.,
the input file is read) with the [`read_input_file`](#read_input_file) function. the input file is read) with the [`read_input_file`](#read_input_file) function.
RenderCV utilizes these instances to generate a LaTeX file which is then rendered into a RenderCV utilizes these instances to generate a $\\LaTeX$ file which is then rendered into a
PDF file. PDF file.
The data models are initialized with data validation to prevent unexpected bugs. During The data models are initialized with data validation to prevent unexpected bugs. During
@ -1061,14 +1061,14 @@ def read_input_file(
file_path: pathlib.Path, file_path: pathlib.Path,
) -> RenderCVDataModel: ) -> RenderCVDataModel:
"""Read the input file and return two instances of RenderCVDataModel. The first """Read the input file and return two instances of RenderCVDataModel. The first
instance is the data model with LaTeX strings and the second instance is the data instance is the data model with $\\LaTeX$ strings and the second instance is the data
model with markdown strings. model with markdown strings.
Args: Args:
file_path (str): The path to the input file. file_path (str): The path to the input file.
Returns: Returns:
tuple[RenderCVDataModel, RenderCVDataModel]: The data models with LaTeX and tuple[RenderCVDataModel, RenderCVDataModel]: The data models with $\\LaTeX$ and
markdown strings. markdown strings.
""" """
# check if the file exists: # check if the file exists:

View File

@ -28,7 +28,7 @@ from . import data_models as dm
class TemplatedFile: class TemplatedFile:
"""This class is a base class for LaTeXFile and MarkdownFile classes. It contains """This class is a base class for LaTeXFile and MarkdownFile classes. It contains
the common methods and attributes for both classes. These classes are used to the common methods and attributes for both classes. These classes are used to
generate the LaTeX and Markdown files with the data model and Jinja2 templates. generate the $\\LaTeX$ and Markdown files with the data model and Jinja2 templates.
Args: Args:
data_model (dm.RenderCVDataModel): The data model. data_model (dm.RenderCVDataModel): The data model.
@ -411,7 +411,7 @@ def markdown_to_latex(markdown_string: str) -> str:
markdown_string (str): The markdown string to convert. markdown_string (str): The markdown string to convert.
Returns: Returns:
str: The LaTeX string. str: The $\\LaTeX$ string.
""" """
# convert links # convert links
links = re.findall(r"\[([^\]\[]*)\]\((.*?)\)", markdown_string) links = re.findall(r"\[([^\]\[]*)\]\((.*?)\)", markdown_string)
@ -539,7 +539,7 @@ def make_matched_part_something(
Args: Args:
value (str): The string to make something. value (str): The string to make something.
something (str): The LaTeX command to use. something (str): The $\\LaTeX$ command to use.
match_str (str): The string to match. match_str (str): The string to match.
Returns: Returns:
str: The string with the matched part something. str: The string with the matched part something.