data: refactor types

This commit is contained in:
Sina Atalay
2024-07-16 16:16:58 +03:00
parent 905053a921
commit e8fd9eff35
3 changed files with 7 additions and 7 deletions

View File

@@ -87,11 +87,11 @@ text_entry = (
)
def dictionary_to_yaml(dictionary: dict[str, Any]):
def dictionary_to_yaml(dictionary: dict):
"""Converts a dictionary to a YAML string.
Args:
dictionary (dict[str, Any]): The dictionary to be converted to YAML.
dictionary (dict): The dictionary to be converted to YAML.
Returns:
str: The YAML string.
"""

View File

@@ -14,11 +14,11 @@ import ruamel.yaml
from . import models, reader
def dictionary_to_yaml(dictionary: dict[str, Any]) -> str:
def dictionary_to_yaml(dictionary: dict) -> str:
"""Converts a dictionary to a YAML string.
Args:
dictionary (dict[str, Any]): The dictionary to be converted to YAML.
dictionary (dict): The dictionary to be converted to YAML.
Returns:
str: The YAML string.
@@ -110,7 +110,7 @@ def create_a_sample_yaml_input_file(
return yaml_string
def generate_json_schema() -> dict[str, Any]:
def generate_json_schema() -> dict:
"""Generate the JSON schema of RenderCV.
JSON schema is generated for the users to make it easier for them to write the input

View File

@@ -113,7 +113,7 @@ def get_characteristic_entry_attributes(
def get_entry_type_name_and_section_validator(
entry: dict[str, Any] | str | Type, entry_types: list[Type]
entry: dict[str, str | list[str]] | str | Type, entry_types: list[Type]
) -> tuple[str, Type[SectionBase]]:
"""Get the entry type name and the section validator based on the entry.
@@ -122,7 +122,7 @@ def get_entry_type_name_and_section_validator(
type.
Args:
entry (dict[str, Any] | str): The entry to determine its type.
entry (dict[str, str | list[str]] | str): The entry to determine its type.
entry_types (list[Type]): The entry types to determine the entry type. These
are not instances of the entry types, but the entry types themselves. `str`
type should not be included in this list.