From cb9b8d53db10dcd1595a3e6e1b004a3838929a74 Mon Sep 17 00:00:00 2001 From: Zain Sohail Date: Wed, 22 May 2024 16:07:02 +0200 Subject: [PATCH] minor fixes --- sed/core/user_dirs.py | 2 ++ sed/dataset/dataset.py | 7 +------ 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/sed/core/user_dirs.py b/sed/core/user_dirs.py index 813fe9c5..1c47acd5 100644 --- a/sed/core/user_dirs.py +++ b/sed/core/user_dirs.py @@ -7,6 +7,8 @@ USER_LOG_PATH (pathlib.Path): The path to the user-specific log directory. USER_DATA_PATH (pathlib.Path): The path to the user-specific data directory. """ +from __future__ import annotations + from pathlib import Path from platformdirs import user_config_path diff --git a/sed/dataset/dataset.py b/sed/dataset/dataset.py index 5b56a0d5..d7e31582 100644 --- a/sed/dataset/dataset.py +++ b/sed/dataset/dataset.py @@ -95,12 +95,7 @@ def set_data_path(data_name: str, data_path: str, existing_data_path: str) -> st # Set data path if not provided if data_path is None: - data_path = existing_data_path or str( - user_paths["data"].joinpath( - "datasets", - data_name, - ), - ) + data_path = existing_data_path or str(user_paths["data"] / data_name) path_source = "existing" if existing_data_path else "default" logger.info(f'Using {path_source} data path for "{data_name}": "{data_path}"')