diff --git a/heudiconv/heuristics/convertall_custom.py b/heudiconv/heuristics/convertall_custom.py index 780ecc76..26f0ca05 100644 --- a/heudiconv/heuristics/convertall_custom.py +++ b/heudiconv/heuristics/convertall_custom.py @@ -4,11 +4,18 @@ behavior of an already existing heuristic without complete rewrite. Such approach could be useful for heuristic like reproin to overload mapping etc. """ +from __future__ import annotations + +from typing import Any + +import nibabel.nicom.dicomwrappers as dw from .convertall import * # noqa: F403 -def custom_seqinfo(series_files, wrapper, **kw): # noqa: U100 +def custom_seqinfo( + series_files: list[str], wrapper: dw.Wrapper, **kw: Any # noqa: U100 +) -> tuple[str | None, str]: """Demo for extracting custom header fields into custom_seqinfo field Operates on already loaded DICOM data. diff --git a/heudiconv/tests/test_dicoms.py b/heudiconv/tests/test_dicoms.py index 12ac29c6..4cb28290 100644 --- a/heudiconv/tests/test_dicoms.py +++ b/heudiconv/tests/test_dicoms.py @@ -108,7 +108,7 @@ def test_custom_seqinfo() -> None: seqinfos = group_dicoms_into_seqinfos( dcmfiles, "studyUID", flatten=True, custom_seqinfo=custom_seqinfo - ) + ) # type: ignore seqinfo = list(seqinfos.keys())[0]