mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-11-13 04:41:24 +00:00
[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:
@@ -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."""
|
||||
|
||||
@@ -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]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user