Update CPI docstring (#5856)

* docstring

* pep8

* caps

* rip

---------

Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com>
This commit is contained in:
James Maslek
2023-12-05 12:06:22 -05:00
committed by GitHub
parent 8e97e3220d
commit c9ac060201
2 changed files with 6 additions and 4 deletions

View File

@@ -80,9 +80,11 @@ class ConsumerPriceIndexQueryParams(QueryParams):
description=QUERY_DESCRIPTIONS.get("units", "")
+ """
Options:
- `growth_previous`: growth from the previous period
- `growth_same`: growth from the same period in the previous year
- `index_2015`: index with base year 2015.""",
- `growth_previous`: Percent growth from the previous period.
If monthly data, this is month-over-month, etc
- `growth_same`: Percent growth from the same period in the previous year.
If looking at monthly data, this would be year-over-year, etc.
- `index_2015`: Rescaled index value, such that the value in 2015 is 100.""",
)
frequency: CPI_FREQUENCY = Field(
default="monthly",

View File

@@ -36,7 +36,7 @@ async def cpi(
standard_params: StandardParams,
extra_params: ExtraParams,
) -> OBBject[BaseModel]:
"""Consumer Price Index (CPI) Data."""
"""Consumer Price Index (CPI). Returns either the rescaled index value, or a rate of change (inflation)."""
return await OBBject.from_query(Query(**locals()))