[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>
This commit is contained in:
Danglewood
2024-04-19 06:38:39 -07:00
committed by GitHub
parent 666db0b321
commit 8ab4be9ec5
2 changed files with 8 additions and 4 deletions

View File

@@ -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."""

View File

@@ -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]