mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-11-26 11:12:50 +00:00
feat: historical dividends
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
"""Historical Dividends Standard Model."""
|
||||
|
||||
from datetime import date as dateType
|
||||
from typing import List, Optional, Set, Union
|
||||
from typing import Optional
|
||||
|
||||
from pydantic import Field, field_validator
|
||||
|
||||
@@ -24,11 +24,9 @@ class HistoricalDividendsQueryParams(QueryParams):
|
||||
)
|
||||
|
||||
@field_validator("symbol", mode="before", check_fields=False)
|
||||
def upper_symbol(cls, v: Union[str, List[str], Set[str]]): # pylint: disable=E0213
|
||||
def upper_symbol(cls, v: str) -> str:
|
||||
"""Convert symbol to uppercase."""
|
||||
if isinstance(v, str):
|
||||
return v.upper()
|
||||
return ",".join([symbol.upper() for symbol in list(v)])
|
||||
return v.upper()
|
||||
|
||||
|
||||
class HistoricalDividendsData(Data):
|
||||
|
||||
Reference in New Issue
Block a user