mirror of
https://github.com/rendercv/rendercv.git
synced 2026-05-19 14:15:40 -04:00
Revert current_date type to Any in ValidationContext
The field receives raw YAML data from commented_map.get() which can be anything the user provides, not just Date | str | None. The get_current_date function already handles arbitrary input defensively with isinstance checks and falls back to Date.today().
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import pathlib
|
||||
from dataclasses import dataclass
|
||||
from datetime import date as Date
|
||||
from typing import cast
|
||||
from typing import Any, cast
|
||||
|
||||
import pydantic
|
||||
|
||||
@@ -9,7 +9,7 @@ import pydantic
|
||||
@dataclass
|
||||
class ValidationContext:
|
||||
input_file_path: pathlib.Path | None = None
|
||||
current_date: Date | str | None = None
|
||||
current_date: Any = None
|
||||
|
||||
|
||||
def get_input_file_path(info: pydantic.ValidationInfo) -> pathlib.Path | None:
|
||||
|
||||
Reference in New Issue
Block a user