We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 647999e commit 9ba9ec1Copy full SHA for 9ba9ec1
chart/schemas/currency.py
@@ -2,9 +2,9 @@
2
This module provides a model for handling currency conversion operations.
3
"""
4
from datetime import date
5
-from typing import Optional
+from typing import Optional, Literal
6
7
-from pydantic import BaseModel, Field, root_validator
+from pydantic import BaseModel, Field
8
9
class Currency(BaseModel):
10
@@ -34,7 +34,7 @@ class Currency(BaseModel):
34
default=None,
35
description='End of period'
36
)
37
- period: Optional[str] = Field(
+ period: Optional[Literal['week', 'month', 'quarter', 'year']] = Field(
38
39
description='Date Period.' \
40
'Arguments week/month/quarter/year are accepted'
0 commit comments