Skip to content

[BugFix] Fixes #6688 BLS Title String Concactenation #6690

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions openbb_platform/providers/bls/openbb_bls/utils/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

# We need to wrap this as a helper to accommodate requests for historical data
# greater than 20 years in length, or containing more than 50 symbols.
async def get_bls_timeseries( # pylint: disable=too-many-branches # noqa: PLR0912
async def get_bls_timeseries( # pylint: disable=too-many-branches,too-many-positional-arguments # noqa: PLR0912
api_key: str,
series_ids: Union[str, List[str]],
start_year: Optional[int] = None,
Expand Down Expand Up @@ -123,7 +123,11 @@ async def get_bls_timeseries( # pylint: disable=too-many-branches # noqa: PLR0
_date = year + "-12-31" if month == "13" else year + "-" + month + "-01"
new_d["symbol"] = seriesID
title = metadata[seriesID].get("series_title") if catalog else None
title = title + (" (Annual Average)" if month == "13" else "")
title = (
title + (" (Annual Average)" if month == "13" else "")
if title
else None
)
if title:
new_d["title"] = title
new_d["date"] = _date
Expand Down
Loading