From 384872815f1b30e7f4c7c11582fa7fb825e3892b Mon Sep 17 00:00:00 2001 From: Dimitri Papadopoulos <3234522+DimitriPapadopoulos@users.noreply.github.com> Date: Sun, 5 May 2024 17:17:10 +0200 Subject: [PATCH] STY: Apply ruff/refurb rule FURB167 FURB167 Use of regular expression alias `re.X` FURB167 Use of regular expression alias `re.M` --- nipype/sphinxext/apidoc/docstring.py | 2 +- nipype/sphinxext/plot_workflow.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/nipype/sphinxext/apidoc/docstring.py b/nipype/sphinxext/apidoc/docstring.py index 8f56f96942..cbecc0a5de 100644 --- a/nipype/sphinxext/apidoc/docstring.py +++ b/nipype/sphinxext/apidoc/docstring.py @@ -62,7 +62,7 @@ class InterfaceDocstring(NipypeDocstring): _name_rgx = re.compile( r"^\s*(:(?P\w+):`(?P[a-zA-Z0-9_.-]+)`|" r" (?P[a-zA-Z0-9_.-]+))\s*", - re.X, + re.VERBOSE, ) def __init__( diff --git a/nipype/sphinxext/plot_workflow.py b/nipype/sphinxext/plot_workflow.py index 69f2ba3aaf..ff8b02249a 100644 --- a/nipype/sphinxext/plot_workflow.py +++ b/nipype/sphinxext/plot_workflow.py @@ -484,7 +484,7 @@ def contains_doctest(text): return False except SyntaxError: pass - r = re.compile(r"^\s*>>>", re.M) + r = re.compile(r"^\s*>>>", re.MULTILINE) m = r.search(text) return bool(m)