update docstrings

This commit is contained in:
Sina Atalay 2023-10-20 20:29:44 +02:00
parent c73412d82d
commit 7ef7a60aef
3 changed files with 11 additions and 14 deletions

View File

@ -1,7 +1,7 @@
r"""RenderCV package.
It parses the user input YAML/JSON file and validates the data (checks spelling
mistakes, checks if the dates are consistent, etc.). Then, with the data, it creates a
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
$\LaTeX$ file and renders it with [TinyTeX](https://yihui.org/tinytex/).
"""
import logging
@ -9,10 +9,6 @@ import os
class LoggingFormatter(logging.Formatter):
"""
Logging formatter class
"""
grey = "\x1b[38;20m" # debug level
white = "\x1b[37;20m" # info level
yellow = "\x1b[33;20m" # warning level
@ -36,6 +32,7 @@ class LoggingFormatter(logging.Formatter):
return formatter.format(record)
# Initialize logger with colors
os.system("COLOR 0") # enable colors in Windows terminal
logger = logging.getLogger()
logger.setLevel(logging.DEBUG)

View File

@ -2,7 +2,7 @@
This module contains classes and functions to parse and validate YAML or JSON input
files. It uses [Pydantic](https://github.com/pydantic/pydantic) to achieve this goal.
All the data classes have `BaseModel` from Pydantic as a base class, and some data
fields have advanced types like `HttpUrl`, `EmailStr`, or `PastDate` from the Pydnatic
fields have advanced types like `HttpUrl`, `EmailStr`, or `PastDate` from the Pydantic
library for validation.
"""
@ -349,9 +349,9 @@ class ClassicThemeSectionTitleMargins(BaseModel):
class ClassicThemeEntryAreaMargins(BaseModel):
"""This class stores the margins of entry areas for the classic theme.
For the classic theme, entry areas are (OneLineEntry)[../index.md#onelineentry],
(NormalEntry)[../index.md#normalentry], and
(ExperienceEntry)[../index.md#experienceentry].
For the classic theme, entry areas are [OneLineEntry](../index.md#onelineentry),
[NormalEntry](../index.md#normalentry), and
[ExperienceEntry](../index.md#experienceentry).
"""
left: LaTeXDimension = Field(
@ -944,7 +944,7 @@ class SocialNetwork(BaseModel):
class Connection(BaseModel):
r"""This class stores a connection/communication information.
"""This class stores a connection/communication information.
Warning:
This class isn't designed for users to use, but it is used by RenderCV to make

View File

@ -118,9 +118,9 @@ def make_it_something(
Warning:
This function shouldn't be used directly. Use
(make_it_bold)[#rendercv.rendering.make_it_bold],
(make_it_underlined)[#rendercv.rendering.make_it_underlined], or
(make_it_italic)[#rendercv.rendering.make_it_italic] instead.
[make_it_bold](rendering.md#rendercv.rendering.make_it_bold),
[make_it_underlined](rendering.md#rendercv.rendering.make_it_underlined), or
[make_it_italic](rendering.md#rendercv.rendering.make_it_italic) instead.
"""
if not isinstance(value, str):
raise ValueError(f"{something} should only be used on strings!")