mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-10 10:21:59 +00:00
Allow not using files from user_dir
This commit is contained in:
parent
de2cc58b0c
commit
44289e4c58
|
@ -17,13 +17,13 @@ class IResolver:
|
|||
This class contains all the logic to load custom classes
|
||||
"""
|
||||
|
||||
def build_search_paths(self, config, current_path: Path, user_subdir: str,
|
||||
def build_search_paths(self, config, current_path: Path, user_subdir: Optional[str] = None,
|
||||
extra_dir: Optional[str] = None) -> List[Path]:
|
||||
|
||||
abs_paths = [
|
||||
config['user_data_dir'].joinpath(user_subdir),
|
||||
current_path,
|
||||
]
|
||||
abs_paths: List[Path] = [current_path]
|
||||
|
||||
if user_subdir:
|
||||
abs_paths.insert(0, config['user_data_dir'].joinpath(user_subdir))
|
||||
|
||||
if extra_dir:
|
||||
# Add extra directory to the top of the search paths
|
||||
|
|
|
@ -40,7 +40,7 @@ class PairListResolver(IResolver):
|
|||
current_path = Path(__file__).parent.parent.joinpath('pairlist').resolve()
|
||||
|
||||
abs_paths = self.build_search_paths(config, current_path=current_path,
|
||||
user_subdir='pairlist', extra_dir=None)
|
||||
user_subdir=None, extra_dir=None)
|
||||
|
||||
pairlist = self._load_object(paths=abs_paths, object_type=IPairList,
|
||||
object_name=pairlist_name, kwargs=kwargs)
|
||||
|
|
Loading…
Reference in New Issue
Block a user