mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-11-26 11:12:50 +00:00
feat: balancesheet
This commit is contained in:
@@ -30,12 +30,7 @@ class BalanceSheetQueryParams(QueryParams):
|
||||
@field_validator("symbol", mode="before", check_fields=False)
|
||||
@classmethod
|
||||
def upper_symbol(cls, v: str):
|
||||
"""Convert symbol to uppercase."""
|
||||
if "," in v:
|
||||
_warn(
|
||||
f"{QUERY_DESCRIPTIONS.get('symbol_list_warning', '')} {v.split(',')[0].upper()}"
|
||||
)
|
||||
return v.split(",")[0].upper() if "," in v else v.upper()
|
||||
return v
|
||||
|
||||
|
||||
class BalanceSheetData(Data):
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
"""Field validators"""
|
||||
|
||||
|
||||
def check_single(v: str) -> str:
|
||||
"""Check that string is not comma-separated string"""
|
||||
if "," in v:
|
||||
raise ValueError("multiple values are not allowed")
|
||||
return v
|
||||
Reference in New Issue
Block a user