diff options
author | Danglewood <85772166+deeleeramone@users.noreply.github.com> | 2024-04-19 06:38:39 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-19 13:38:39 +0000 |
commit | 8ab4be9ec526372681b040391953bd830cf2bb75 (patch) | |
tree | a606292af4ca747b278e0c6907166376c74071f8 | |
parent | 666db0b321d0a3be6fdc5bdfb229c789e21bd4b9 (diff) |
[BugFix] Add Missing require_credentials=False In Nasdaq Fetchers (#6320)
* missing require_credentials=False
* pylint disable unused argument
---------
Co-authored-by: Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com>
-rw-r--r-- | openbb_platform/providers/nasdaq/openbb_nasdaq/models/calendar_earnings.py | 4 | ||||
-rw-r--r-- | openbb_platform/providers/nasdaq/openbb_nasdaq/models/historical_dividends.py | 8 |
2 files changed, 8 insertions, 4 deletions
diff --git a/openbb_platform/providers/nasdaq/openbb_nasdaq/models/calendar_earnings.py b/openbb_platform/providers/nasdaq/openbb_nasdaq/models/calendar_earnings.py index 9c153700ca6..b84b8efc7f5 100644 --- a/openbb_platform/providers/nasdaq/openbb_nasdaq/models/calendar_earnings.py +++ b/openbb_platform/providers/nasdaq/openbb_nasdaq/models/calendar_earnings.py @@ -1,5 +1,7 @@ """Nasdaq Earnings Calendar Model.""" +# pylint: disable=unused-argument + from concurrent.futures import ThreadPoolExecutor from datetime import ( date as dateType, @@ -138,6 +140,8 @@ class NasdaqCalendarEarningsFetcher( ): """Transform the query, extract and transform the data from the Nasdaq endpoints.""" + require_credentials = False + @staticmethod def transform_query(params: Dict[str, Any]) -> NasdaqCalendarEarningsQueryParams: """Transform the query params.""" diff --git a/openbb_platform/providers/nasdaq/openbb_nasdaq/models/historical_dividends.py b/openbb_platform/providers/nasdaq/openbb_nasdaq/models/historical_dividends.py index 2ca017a496b..9db313372f9 100644 --- a/openbb_platform/providers/nasdaq/openbb_nasdaq/models/historical_dividends.py +++ b/openbb_platform/providers/nasdaq/openbb_nasdaq/models/historical_dividends.py @@ -2,12 +2,12 @@ # pylint: disable=unused-argument import asyncio -import warnings from datetime import ( date as dateType, datetime, ) from typing import Any, Dict, List, Optional +from warnings import warn from dateutil import parser from openbb_core.provider.abstract.fetcher import Fetcher @@ -20,8 +20,6 @@ from openbb_core.provider.utils.helpers import amake_request from openbb_nasdaq.utils.helpers import IPO_HEADERS from pydantic import Field, field_validator -_warn = warnings.warn - class NasdaqHistoricalDividendsQueryParams(HistoricalDividendsQueryParams): """Nasdaq Historical Dividends Query Params.""" @@ -92,6 +90,8 @@ class NasdaqHistoricalDividendsFetcher( ): """Nasdaq Historical Dividends Fetcher.""" + require_credentials = False + @staticmethod def transform_query(params: Dict[str, Any]) -> NasdaqHistoricalDividendsQueryParams: """Transform the params to the provider-specific query.""" @@ -131,7 +131,7 @@ class NasdaqHistoricalDividendsFetcher( d["symbol"] = symbol results.extend(data) if not data: - _warn(f"No data found for {symbol}") + warn(f"No data found for {symbol}") tasks = [get_one(symbol) for symbol in symbols] |