mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-11-01 15:01:18 +00:00
Update some docstrings, fix typos and lint
This commit is contained in:
@@ -11,7 +11,6 @@ from openbb_core.api.auth.user import (
|
||||
get_user_settings,
|
||||
)
|
||||
|
||||
|
||||
# ruff: noqa: S105 S106
|
||||
|
||||
|
||||
|
||||
@@ -9,11 +9,12 @@ from openbb_provider.abstract.query_params import QueryParams
|
||||
|
||||
|
||||
class EtfCountriesQueryParams(QueryParams):
|
||||
"""ETF Countries Query Params"""
|
||||
"""ETF Countries Query Params."""
|
||||
|
||||
symbol: str = Field(description="The exchange ticker symbol for the ETF.")
|
||||
|
||||
@field_validator("symbol")
|
||||
@classmethod
|
||||
def upper_symbol(cls, v: Union[str, List[str], Set[str]]):
|
||||
"""Convert symbol to uppercase."""
|
||||
if isinstance(v, str):
|
||||
|
||||
@@ -10,11 +10,12 @@ from openbb_provider.abstract.query_params import QueryParams
|
||||
|
||||
|
||||
class EtfHistoricalNavQueryParams(QueryParams):
|
||||
"""ETF Historicl NAV Query Params"""
|
||||
"""ETF Historical Net Asset Value Query Params."""
|
||||
|
||||
symbol: str = Field(description="The exchange ticker symbol for the ETF.")
|
||||
|
||||
@field_validator("symbol")
|
||||
@classmethod
|
||||
def upper_symbol(cls, v: Union[str, List[str], Set[str]]):
|
||||
"""Convert symbol to uppercase."""
|
||||
if isinstance(v, str):
|
||||
@@ -23,7 +24,7 @@ class EtfHistoricalNavQueryParams(QueryParams):
|
||||
|
||||
|
||||
class EtfHistoricalNavData(Data):
|
||||
"""ETF Historical NAV Data."""
|
||||
"""ETF Historical Net Asset Value Data."""
|
||||
|
||||
date: dateType = Field(description="The date of the NAV.")
|
||||
nav: float = Field(description="The net asset value on the date.")
|
||||
|
||||
@@ -9,11 +9,12 @@ from openbb_provider.abstract.query_params import QueryParams
|
||||
|
||||
|
||||
class EtfInfoQueryParams(QueryParams):
|
||||
"""ETF Info Query Params"""
|
||||
"""ETF Info Query Params."""
|
||||
|
||||
symbol: str = Field(description="The exchange ticker symbol for the ETF.")
|
||||
|
||||
@field_validator("symbol")
|
||||
@classmethod
|
||||
def upper_symbol(cls, v: Union[str, List[str], Set[str]]):
|
||||
"""Convert symbol to uppercase."""
|
||||
if isinstance(v, str):
|
||||
|
||||
@@ -9,11 +9,12 @@ from openbb_provider.abstract.query_params import QueryParams
|
||||
|
||||
|
||||
class EtfSectorsQueryParams(QueryParams):
|
||||
"""ETF Sectors Query Params"""
|
||||
"""ETF Sectors Query Params."""
|
||||
|
||||
symbol: str = Field(description="The exchange ticker symbol for the ETF.")
|
||||
|
||||
@field_validator("symbol")
|
||||
@classmethod
|
||||
def upper_symbol(cls, v: Union[str, List[str], Set[str]]):
|
||||
"""Convert symbol to uppercase."""
|
||||
if isinstance(v, str):
|
||||
|
||||
@@ -15,11 +15,12 @@ from openbb_provider.utils.descriptions import DATA_DESCRIPTIONS, QUERY_DESCRIPT
|
||||
|
||||
|
||||
class HistoricalEpsQueryParams(QueryParams):
|
||||
"""Historical EPS Query."""
|
||||
"""Historical Earnings Per Share Query."""
|
||||
|
||||
symbol: str = Field(description=QUERY_DESCRIPTIONS.get("symbol", ""))
|
||||
|
||||
@validator("symbol", pre=True, check_fields=False, always=True)
|
||||
@classmethod
|
||||
def upper_symbol(cls, v: Union[str, List[str], Set[str]]):
|
||||
"""Convert symbol to uppercase."""
|
||||
if isinstance(v, str):
|
||||
@@ -28,7 +29,7 @@ class HistoricalEpsQueryParams(QueryParams):
|
||||
|
||||
|
||||
class HistoricalEpsData(Data):
|
||||
"""Historical EPS Data."""
|
||||
"""Historical Earnings Per Share Data."""
|
||||
|
||||
date: dateType = Field(default=None, description=DATA_DESCRIPTIONS.get("date", ""))
|
||||
symbol: str = Field(description=QUERY_DESCRIPTIONS.get("symbol", ""))
|
||||
|
||||
@@ -9,11 +9,12 @@ from openbb_provider.abstract.query_params import QueryParams
|
||||
|
||||
|
||||
class IndexConstituentsQueryParams(QueryParams):
|
||||
"""Index Constituents Query Params"""
|
||||
"""Index Constituents Query Params."""
|
||||
|
||||
symbol: str = Field(description="The index ticker symbol.")
|
||||
|
||||
@field_validator("symbol")
|
||||
@classmethod
|
||||
def upper_symbol(cls, v: Union[str, List[str], Set[str]]):
|
||||
"""Convert symbol to uppercase."""
|
||||
if isinstance(v, str):
|
||||
|
||||
@@ -9,11 +9,12 @@ from openbb_provider.abstract.query_params import QueryParams
|
||||
|
||||
|
||||
class IndexInfoQueryParams(QueryParams):
|
||||
"""Index Info Query Params"""
|
||||
"""Index Info Query Params."""
|
||||
|
||||
symbol: str = Field(description="The index ticker symbol.")
|
||||
|
||||
@field_validator("symbol")
|
||||
@classmethod
|
||||
def upper_symbol(cls, v: Union[str, List[str], Set[str]]):
|
||||
"""Convert symbol to uppercase."""
|
||||
if isinstance(v, str):
|
||||
|
||||
@@ -9,11 +9,12 @@ from openbb_provider.abstract.query_params import QueryParams
|
||||
|
||||
|
||||
class IndexSectorsQueryParams(QueryParams):
|
||||
"""Index Info Query Params"""
|
||||
"""Index Info Query Params."""
|
||||
|
||||
symbol: str = Field(description="The index ticker symbol.")
|
||||
|
||||
@field_validator("symbol")
|
||||
@classmethod
|
||||
def upper_symbol(cls, v: Union[str, List[str], Set[str]]):
|
||||
"""Convert symbol to uppercase."""
|
||||
if isinstance(v, str):
|
||||
|
||||
@@ -10,11 +10,11 @@ from openbb_provider.abstract.query_params import QueryParams
|
||||
|
||||
|
||||
class IndustryPEQueryParams(QueryParams):
|
||||
"""Industry P/E Ratio Query."""
|
||||
"""Industry Price to Earnings Ratio Query."""
|
||||
|
||||
|
||||
class IndustryPEData(Data):
|
||||
"""Industry P/E Ratio Data."""
|
||||
"""Industry Price to Earnings Ratio Data."""
|
||||
|
||||
date: Optional[dateType] = Field(
|
||||
description="The date of the P/E ratio.", default=None
|
||||
|
||||
@@ -9,11 +9,12 @@ from openbb_provider.abstract.query_params import QueryParams
|
||||
|
||||
|
||||
class RecentPerformanceQueryParams(QueryParams):
|
||||
"""Recent Performance Query Params"""
|
||||
"""Recent Performance Query Params."""
|
||||
|
||||
symbol: str = Field(description="The ticker symbol to fetch.")
|
||||
|
||||
@field_validator("symbol")
|
||||
@classmethod
|
||||
def upper_symbol(cls, v: Union[str, List[str], Set[str]]):
|
||||
"""Convert symbol to uppercase."""
|
||||
if isinstance(v, str):
|
||||
|
||||
@@ -10,11 +10,11 @@ from openbb_provider.abstract.query_params import QueryParams
|
||||
|
||||
|
||||
class SectorPEQueryParams(QueryParams):
|
||||
"""Sector P/E Ratio Query."""
|
||||
"""Sector Price to Earnings Ratio Query."""
|
||||
|
||||
|
||||
class SectorPEData(Data):
|
||||
"""Sector P/E Ratio Data."""
|
||||
"""Sector Price to Earnings Ratio Data."""
|
||||
|
||||
date: Optional[dateType] = Field(
|
||||
description="The date of the P/E ratio.", default=None
|
||||
|
||||
Reference in New Issue
Block a user