fix stocks.fa.transcript and rebuild

This commit is contained in:
Diogo Sousa
2023-09-25 14:31:25 +01:00
parent 67cc3bb3c8
commit 7d933e3f77
2 changed files with 10 additions and 7 deletions

View File

@@ -855,7 +855,7 @@ class ROUTER_stocks_fa(Container):
Name and position of the executive.
year : Optional[int]
Year of the compensation.
salary : Optional[PositiveFloat]
salary : Optional[NonNegativeFloat]
Salary of the executive.
bonus : Optional[NonNegativeFloat]
Bonus of the executive.
@@ -865,7 +865,7 @@ class ROUTER_stocks_fa(Container):
Incentive plan compensation of the executive.
all_other_compensation : Optional[NonNegativeFloat]
All other compensation of the executive.
total : Optional[PositiveFloat]
total : Optional[NonNegativeFloat]
Total compensation of the executive.
url : Optional[str]
URL of the filing data.""" # noqa: E501
@@ -3205,7 +3205,7 @@ class ROUTER_stocks_fa(Container):
OpenBBCustomParameter(description="Year of the earnings call transcript."),
],
quarter: typing_extensions.Annotated[
Literal[1, 2, 3, 4],
int,
OpenBBCustomParameter(
description="Quarter of the earnings call transcript."
),
@@ -3221,7 +3221,7 @@ class ROUTER_stocks_fa(Container):
Symbol to get data for.
year : int
Year of the earnings call transcript.
quarter : Literal[1, 2, 3, 4]
quarter : int
Quarter of the earnings call transcript.
provider : Union[Literal['fmp'], None]
The provider to use for the query, by default None.

View File

@@ -2,7 +2,7 @@
from datetime import datetime
from typing import List, Literal, Set, Union
from typing import List, Set, Union
from pydantic import Field, validator
@@ -16,8 +16,11 @@ class EarningsCallTranscriptQueryParams(QueryParams):
symbol: str = Field(description=QUERY_DESCRIPTIONS.get("symbol", ""))
year: int = Field(description="Year of the earnings call transcript.")
quarter: Literal[1, 2, 3, 4] = Field(
default=1, description="Quarter of the earnings call transcript."
quarter: int = Field(
default=1,
gt=0,
lt=5,
description="Quarter of the earnings call transcript.",
)
@validator("symbol", pre=True, check_fields=False, always=True)