From e003f5ada0021c238123f0d56b86ac0093075188 Mon Sep 17 00:00:00 2001 From: Dimitri Papadopoulos <3234522+DimitriPapadopoulos@users.noreply.github.com> Date: Sun, 22 Sep 2024 17:01:44 +0200 Subject: [PATCH] STY: Apply ruff/flake8-comprehensions rule C419 C419 Unnecessary list comprehension --- nibabel/casting.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nibabel/casting.py b/nibabel/casting.py index 31e27d0e8..042a2f415 100644 --- a/nibabel/casting.py +++ b/nibabel/casting.py @@ -764,7 +764,7 @@ def able_int_type(values): >>> able_int_type([-1, 1]) == np.int8 True """ - if any([v % 1 for v in values]): + if any(v % 1 for v in values): return None mn = min(values) mx = max(values)