From 218ea9a54332f408df41fe72af31ec9928283686 Mon Sep 17 00:00:00 2001 From: Danglewood <85772166+deeleeramone@users.noreply.github.com> Date: Wed, 25 Sep 2024 03:32:08 -0700 Subject: [PATCH] [BugFix] Fixes #6688 BLS Title String Concactenation (#6690) * fix title string concactenation * too-many-positional-arguments --- openbb_platform/providers/bls/openbb_bls/utils/helpers.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/openbb_platform/providers/bls/openbb_bls/utils/helpers.py b/openbb_platform/providers/bls/openbb_bls/utils/helpers.py index d26a894f7db..bebfff559e5 100644 --- a/openbb_platform/providers/bls/openbb_bls/utils/helpers.py +++ b/openbb_platform/providers/bls/openbb_bls/utils/helpers.py @@ -8,7 +8,7 @@ if TYPE_CHECKING: # 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, @@ -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