add abstractmethod decorator

This commit is contained in:
Diogo Sousa
2023-07-29 00:17:56 +01:00
parent 934e046c7e
commit 64ced15536

View File

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