mirror of
https://github.com/rendercv/rendercv.git
synced 2026-10-03 10:55:03 -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 parent
441214e8c8
commit
26e9c6d86f
1 file changed
+2
-2
@@ -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