mirror of https://github.com/eyhc1/rendercv.git
fix docstring errors
This commit is contained in:
parent
7ce3e70b8a
commit
5187c6d4a0
|
@ -1,8 +1,8 @@
|
||||||
r"""RenderCV package.
|
"""RenderCV package.
|
||||||
|
|
||||||
It parses the user input YAML/JSON file and validates the data (checking spelling
|
It parses the user input YAML/JSON file and validates the data (checking spelling
|
||||||
mistakes, whether the dates are consistent, etc.). Then, with the data, it creates a
|
mistakes, whether the dates are consistent, etc.). Then, with the data, it creates a
|
||||||
$\LaTeX$ file and renders it with [TinyTeX](https://yihui.org/tinytex/).
|
$\\LaTeX$ file and renders it with [TinyTeX](https://yihui.org/tinytex/).
|
||||||
"""
|
"""
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import os
|
import os
|
||||||
import logging
|
import logging
|
||||||
import re
|
import re
|
||||||
from typing import Annotated
|
from typing import Annotated, Callable
|
||||||
from functools import wraps
|
from functools import wraps
|
||||||
|
|
||||||
from .rendering import read_input_file, render_template, run_latex
|
from .rendering import read_input_file, render_template, run_latex
|
||||||
|
@ -20,13 +20,13 @@ app = typer.Typer(
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
def user_friendly_errors(func):
|
def user_friendly_errors(func: Callable) -> Callable:
|
||||||
"""Function decorator to make Pydantic's error messages more user-friendly.
|
"""Function decorator to make Pydantic's error messages more user-friendly.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
func (function): Function to decorate
|
func (Callable): Function to decorate
|
||||||
Returns:
|
Returns:
|
||||||
function: Decorated function
|
Callable: Decorated function
|
||||||
"""
|
"""
|
||||||
@wraps(func)
|
@wraps(func)
|
||||||
def wrapper(*args, **kwargs):
|
def wrapper(*args, **kwargs):
|
||||||
|
@ -121,6 +121,7 @@ def new(name: Annotated[str, typer.Argument(help="Full name")]):
|
||||||
with open(file_name, "w", encoding="utf-8") as file:
|
with open(file_name, "w", encoding="utf-8") as file:
|
||||||
file.write(new_input_file)
|
file.write(new_input_file)
|
||||||
|
|
||||||
|
logger.info(f"New input file created: {file_name}")
|
||||||
|
|
||||||
def cli():
|
def cli():
|
||||||
"""Start the CLI application.
|
"""Start the CLI application.
|
||||||
|
|
Loading…
Reference in New Issue