mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-11-09 19:02:19 +00:00
add abstractmethod decorator
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
"""Abstract class for the fetcher."""
|
||||
|
||||
|
||||
from abc import abstractmethod
|
||||
from typing import Any, Dict, Generic, List, Optional, TypeVar, Union
|
||||
|
||||
from openbb_provider.abstract.data import Data, QueryParams
|
||||
@@ -53,24 +54,28 @@ class Fetcher(
|
||||
return data
|
||||
|
||||
@property
|
||||
@abstractmethod
|
||||
def query_params_type(self):
|
||||
"""Get the type of the query."""
|
||||
# pylint: disable=E1101
|
||||
return self.__orig_bases__[0].__args__[0]
|
||||
|
||||
@property
|
||||
@abstractmethod
|
||||
def data_type(self):
|
||||
"""Get the type of the data."""
|
||||
# pylint: disable=E1101
|
||||
return self.__orig_bases__[0].__args__[1]
|
||||
|
||||
@property
|
||||
@abstractmethod
|
||||
def provider_query_params_type(self):
|
||||
"""Get the type of the provider query."""
|
||||
# pylint: disable=E1101
|
||||
return self.__orig_bases__[0].__args__[2]
|
||||
|
||||
@property
|
||||
@abstractmethod
|
||||
def provider_data_type(self):
|
||||
"""Get the type of the provider data."""
|
||||
# pylint: disable=E1101
|
||||
|
||||
Reference in New Issue
Block a user