From 4a62e70aa4bd5fa7371c0175d311d8ca1f2b39d4 Mon Sep 17 00:00:00 2001 From: Spiros Maggioros Date: Mon, 9 Dec 2024 17:51:46 +0200 Subject: [PATCH] Fetched main to spiros-dev | Fixed pre-commit --- NiChart_DLMUSE/SegmentImage.py | 2 -- NiChart_DLMUSE/__init__.py | 2 +- NiChart_DLMUSE/dlmuse_pipeline.py | 7 ++++--- NiChart_DLMUSE/utils.py | 4 +++- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/NiChart_DLMUSE/SegmentImage.py b/NiChart_DLMUSE/SegmentImage.py index ae043d6..90b9adc 100644 --- a/NiChart_DLMUSE/SegmentImage.py +++ b/NiChart_DLMUSE/SegmentImage.py @@ -2,8 +2,6 @@ import os import shutil from typing import Any -import DLMUSE -import DLICV def run_dlicv( diff --git a/NiChart_DLMUSE/__init__.py b/NiChart_DLMUSE/__init__.py index aa82748..7612d57 100644 --- a/NiChart_DLMUSE/__init__.py +++ b/NiChart_DLMUSE/__init__.py @@ -1 +1 @@ -from .dlmuse_pipeline import run_pipeline, run_dlicv, run_dlmuse +from .dlmuse_pipeline import run_dlicv, run_dlmuse, run_pipeline diff --git a/NiChart_DLMUSE/dlmuse_pipeline.py b/NiChart_DLMUSE/dlmuse_pipeline.py index 8268fd7..03f35c9 100644 --- a/NiChart_DLMUSE/dlmuse_pipeline.py +++ b/NiChart_DLMUSE/dlmuse_pipeline.py @@ -1,5 +1,6 @@ import logging import os +from typing import Any import pkg_resources # type: ignore @@ -39,10 +40,10 @@ def run_pipeline( in_data: str, out_dir: str, device: str, - dlmuse_extra_args: str = '', - dlicv_extra_args: str = '', + dlmuse_extra_args: str = "", + dlicv_extra_args: str = "", sub_fldr: int = 1, - progress_bar = None, + progress_bar: Any = None, ) -> None: """ NiChart pipeline diff --git a/NiChart_DLMUSE/utils.py b/NiChart_DLMUSE/utils.py index f4c4e31..60966f6 100644 --- a/NiChart_DLMUSE/utils.py +++ b/NiChart_DLMUSE/utils.py @@ -65,7 +65,9 @@ def remove_common_suffix(list_files: list) -> list: bnames = list_files if len(list_files) == 1: - if list_files[0].endswith('_T1'): # If there is a single image with suffix _T1, remove it + if list_files[0].endswith( + "_T1" + ): # If there is a single image with suffix _T1, remove it bnames = [x[0:-3] for x in bnames] return bnames