use Config typing in more places

This commit is contained in:
Matthias
2022-09-18 13:31:52 +02:00
parent 667853c504
commit 994c1c5ea0
32 changed files with 79 additions and 61 deletions

View File

@@ -10,6 +10,7 @@ import sys
from pathlib import Path
from typing import Any, Dict, Iterator, List, Optional, Tuple, Type, Union
from freqtrade.constants import Config
from freqtrade.exceptions import OperationalException
@@ -43,7 +44,7 @@ class IResolver:
initial_search_path: Optional[Path]
@classmethod
def build_search_paths(cls, config: Dict[str, Any], user_subdir: Optional[str] = None,
def build_search_paths(cls, config: Config, user_subdir: Optional[str] = None,
extra_dirs: List[str] = []) -> List[Path]:
abs_paths: List[Path] = []
@@ -153,7 +154,7 @@ class IResolver:
return None
@classmethod
def load_object(cls, object_name: str, config: dict, *, kwargs: dict,
def load_object(cls, object_name: str, config: Config, *, kwargs: dict,
extra_dir: Optional[str] = None) -> Any:
"""
Search and loads the specified object as configured in hte child class.