Skip to content

Commit b3193f6

Browse files
bpinsardyarikoptic
authored andcommitted
linting/typing
1 parent 2afe136 commit b3193f6

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

heudiconv/convert.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ def prep_conversion(
223223
custom_grouping=getattr(heuristic, "grouping", None),
224224
# callable which will be provided dcminfo and returned
225225
# structure extend seqinfo
226-
custom_seqinfo = getattr(heuristic, 'custom_seqinfo', None),
226+
custom_seqinfo=getattr(heuristic, 'custom_seqinfo', None),
227227
)
228228
elif seqinfo is None:
229229
raise ValueError("Neither 'dicoms' nor 'seqinfo' is given")

heudiconv/dicoms.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@
4343

4444

4545
class CustomSeqinfoT(Protocol):
46-
def __call__(self, wrapper: dw.Wrapper, series_files: list[str]) -> Hashable: ...
46+
def __call__(self, wrapper: dw.Wrapper, series_files: list[str]) -> Hashable:
47+
...
4748

4849

4950
def create_seqinfo(

heudiconv/heuristics/convertall.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from __future__ import annotations
22

33
import logging
4-
from typing import Any, Optional
4+
from typing import Optional
55

66
from heudiconv.dicoms import dw
77
from heudiconv.utils import SeqInfo
@@ -19,7 +19,7 @@ def create_key(
1919
return (template, outtype, annotation_classes)
2020

2121

22-
def custom_seqinfo(wrapper: dw.Wrapper, series_files: list[str], **kw: Any) -> tuple[str, str]:
22+
def custom_seqinfo(wrapper: dw.Wrapper, series_files: list[str]) -> tuple[str, str]:
2323
# Just a dummy demo for what custom_seqinfo could get/do
2424
# for already loaded DICOM data, and including storing/returning
2525
# the sample series file as was requested

heudiconv/tests/test_dicoms.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ def test_custom_seqinfo() -> None:
119119
assert len(seqinfo.custom) == 2
120120
assert seqinfo.custom[1] == dcmfiles[0]
121121

122+
122123
def test_get_datetime_from_dcm_from_acq_date_time() -> None:
123124
typical_dcm = dcm.dcmread(
124125
op.join(TESTS_DATA_PATH, "phantom.dcm"), stop_before_pixels=True

0 commit comments

Comments
 (0)