mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-11-09 02:42:36 +00:00
mypy
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
from typing import Dict
|
||||
|
||||
|
||||
class SingletonMeta(type):
|
||||
# TODO : check if we want to update this to be thread safe
|
||||
_instances = {}
|
||||
_instances: Dict[object, object] = {}
|
||||
|
||||
def __call__(cls, *args, **kwargs):
|
||||
if cls not in cls._instances:
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
"""Abstract class for providers."""
|
||||
|
||||
from typing import Dict, List, Optional
|
||||
from typing import Dict, List, Optional, Type
|
||||
|
||||
from openbb_provider.abstract.fetcher import Fetcher
|
||||
|
||||
@@ -13,7 +13,7 @@ class Provider:
|
||||
name: str,
|
||||
description: str,
|
||||
required_credentials: Optional[List[str]],
|
||||
fetcher_dict: Dict[str, Fetcher],
|
||||
fetcher_dict: Dict[str, Type[Fetcher]],
|
||||
) -> None:
|
||||
"""Initialize the provider."""
|
||||
self.name = name
|
||||
|
||||
Reference in New Issue
Block a user