Skip to content

settings

Settings

Bases: BaseModelWithoutExtraKeys

bold_keywords = pydantic.Field(default=[], title='Bold Keywords', description='Keywords to automatically bold in the output.') class-attribute instance-attribute

current_date = pydantic.Field(default_factory=(datetime.date.today), title='Date', description='The date to use as "current date" for filenames, the "last updated" label, and time span calculations. Defaults to the actual current date.') class-attribute instance-attribute

model_config = pydantic.ConfigDict(extra='forbid', validate_default=True) class-attribute instance-attribute

render_command = pydantic.Field(default_factory=RenderCommand, title='Render Command Settings', description='Settings for the `render` command. These correspond to command-line arguments. CLI arguments take precedence over these settings.') class-attribute instance-attribute

keep_unique_keywords(value) classmethod

Remove duplicate keywords from bold list.

Why

Users might accidentally list same keyword multiple times. Deduplication prevents redundant bold highlighting operations during rendering.

Parameters:

  • value (list[str]) –

    List of keywords potentially with duplicates.

Returns:

  • list[str]

    List with unique keywords only.

Source code in src/rendercv/schema/models/settings/settings.py
@pydantic.field_validator("bold_keywords")
@classmethod
def keep_unique_keywords(cls, value: list[str]) -> list[str]:
    """Remove duplicate keywords from bold list.

    Why:
        Users might accidentally list same keyword multiple times. Deduplication
        prevents redundant bold highlighting operations during rendering.

    Args:
        value: List of keywords potentially with duplicates.

    Returns:
        List with unique keywords only.
    """
    return list(set(value))