From d9ec21d6a07fea4e290e7860c399060904eaa9a8 Mon Sep 17 00:00:00 2001 From: Dimitri Papadopoulos <3234522+DimitriPapadopoulos@users.noreply.github.com> Date: Tue, 1 Oct 2024 18:56:25 +0200 Subject: [PATCH] STY: Apply ruff/refurb preview rule FURB192 FURB192 Prefer `min` over `sorted()` to compute the minimum value in a sequence --- nibabel/nicom/dicomwrappers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nibabel/nicom/dicomwrappers.py b/nibabel/nicom/dicomwrappers.py index 009880e49..64b2b4a96 100755 --- a/nibabel/nicom/dicomwrappers.py +++ b/nibabel/nicom/dicomwrappers.py @@ -565,7 +565,7 @@ def applies(self, dcm_wrp) -> bool: warnings.warn( 'A multi-stack file was passed without an explicit filter, just using lowest StackID' ) - self._selected = sorted(stack_ids)[0] + self._selected = min(stack_ids) return True return False