Skip to content

Commit 2efa21a

Browse files
committed
MAINT: Require yapf >= 0.27 for check specs
1 parent 1689fe5 commit 2efa21a

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

nipype/info.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ def get_nipype_gitversion():
186186
'nipy': ['nitime', 'nilearn<0.5.0', 'dipy', 'nipy', 'matplotlib'],
187187
'profiler': ['psutil>=5.0'],
188188
'pybids': ['pybids>=0.7.0'],
189-
'specs': ['yapf'],
189+
'specs': ['yapf>=0.27'],
190190
'ssh': ['paramiko'],
191191
'tests': TESTS_REQUIRES,
192192
'xvfbwrapper': ['xvfbwrapper'],

tools/checkspecs.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,14 @@
1010
import re
1111
import sys
1212
import warnings
13+
from distutils.version import LooseVersion
1314

1415
from nipype.interfaces.base import BaseInterface
16+
17+
import yapf
18+
if LooseVersion(yapf.__version__) < '0.27':
19+
raise ImportError("Please upgrade yapf to version 0.27 or newer for stable formatting")
20+
1521
from yapf.yapflib.yapf_api import FormatCode
1622

1723

0 commit comments

Comments
 (0)