From d53b64cee8ed919ad24ba40657eb1ea37833e364 Mon Sep 17 00:00:00 2001 From: Dimitri Papadopoulos <3234522+DimitriPapadopoulos@users.noreply.github.com> Date: Sun, 22 Sep 2024 15:44:48 +0200 Subject: [PATCH 1/2] STY: Apply ruff/refurb rule FURB167 FURB167 Use of regular expression alias --- nibabel/nicom/ascconv.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nibabel/nicom/ascconv.py b/nibabel/nicom/ascconv.py index 8ec72fb3e..6d7243603 100644 --- a/nibabel/nicom/ascconv.py +++ b/nibabel/nicom/ascconv.py @@ -10,7 +10,7 @@ ASCCONV_RE = re.compile( r'### ASCCONV BEGIN((?:\s*[^=\s]+=[^=\s]+)*) ###\n(.*?)\n### ASCCONV END ###', - flags=re.M | re.S, + flags=re.MULTILINE | re.DOTALL, ) From 1abcdec867c54c3c58e2d8a7c0215a128e2c9f69 Mon Sep 17 00:00:00 2001 From: Dimitri Papadopoulos <3234522+DimitriPapadopoulos@users.noreply.github.com> Date: Sun, 22 Sep 2024 22:51:25 +0200 Subject: [PATCH 2/2] STY: Enforce ruff/refurb rules (FURB) --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index becc93366..316abdeca 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -119,6 +119,7 @@ select = [ "B", "C4", "F", + "FURB", "I", "PLE", "Q",