Skip to content

Commit 12deb95

Browse files
committed
STY: black
1 parent c9e7097 commit 12deb95

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+92
-97
lines changed

nipype/algorithms/confounds.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -577,7 +577,7 @@ class CompCor(SimpleInterface):
577577
]
578578

579579
def __init__(self, *args, **kwargs):
580-
""" exactly the same as compcor except the header """
580+
"""exactly the same as compcor except the header"""
581581
super(CompCor, self).__init__(*args, **kwargs)
582582
self._header = "CompCor"
583583

@@ -774,7 +774,7 @@ class ACompCor(CompCor):
774774
"""
775775

776776
def __init__(self, *args, **kwargs):
777-
""" exactly the same as compcor except the header """
777+
"""exactly the same as compcor except the header"""
778778
super(ACompCor, self).__init__(*args, **kwargs)
779779
self._header = "aCompCor"
780780

@@ -825,7 +825,7 @@ class TCompCor(CompCor):
825825
output_spec = TCompCorOutputSpec
826826

827827
def __init__(self, *args, **kwargs):
828-
""" exactly the same as compcor except the header """
828+
"""exactly the same as compcor except the header"""
829829
super(TCompCor, self).__init__(*args, **kwargs)
830830
self._header = "tCompCor"
831831
self._mask_files = []

nipype/algorithms/mesh.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424

2525
class TVTKBaseInterface(BaseInterface):
26-
""" A base class for interfaces using VTK """
26+
"""A base class for interfaces using VTK"""
2727

2828
_redirect_x = True
2929

nipype/algorithms/modelgen.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,7 @@ def _generate_design(self, infolist=None):
516516
)
517517

518518
def _run_interface(self, runtime):
519-
""""""
519+
""" """
520520
self._sessioninfo = None
521521
self._generate_design()
522522
return runtime

nipype/algorithms/tests/test_CompCor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212

1313
class TestCompCor:
14-
""" Note: Tests currently do a poor job of testing functionality """
14+
"""Note: Tests currently do a poor job of testing functionality"""
1515

1616
filenames = {
1717
"functionalnii": "compcorfunc.nii",

nipype/algorithms/tests/test_TSNR.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515

1616
class TestTSNR:
17-
""" Note: Tests currently do a poor job of testing functionality """
17+
"""Note: Tests currently do a poor job of testing functionality"""
1818

1919
in_filenames = {"in_file": "tsnrinfile.nii"}
2020

nipype/external/cloghandler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ def flush(self):
222222
pass
223223

224224
def _degrade(self, degrade, msg, *args):
225-
""" Set degrade mode or not. Ignore msg. """
225+
"""Set degrade mode or not. Ignore msg."""
226226
self._rotateFailed = degrade
227227
del msg, args # avoid pychecker warnings
228228

nipype/interfaces/base/core.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,12 +87,12 @@ def version(self):
8787

8888
@classmethod
8989
def _outputs(cls):
90-
""" Initializes outputs"""
90+
"""Initializes outputs"""
9191
raise NotImplementedError
9292

9393
@classmethod
9494
def help(cls, returnhelp=False):
95-
""" Prints class help """
95+
"""Prints class help"""
9696
allhelp = format_help(cls)
9797
if returnhelp:
9898
return allhelp
@@ -112,7 +112,7 @@ def aggregate_outputs(self, runtime=None, needed_outputs=None):
112112
raise NotImplementedError
113113

114114
def _list_outputs(self):
115-
""" List expected outputs"""
115+
"""List expected outputs"""
116116
raise NotImplementedError
117117

118118
@classmethod

nipype/interfaces/base/specs.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ class BaseTraitedSpec(traits.HasTraits):
5858
package_version = nipype_version
5959

6060
def __init__(self, **kwargs):
61-
""" Initialize handlers and inputs"""
61+
"""Initialize handlers and inputs"""
6262
# NOTE: In python 2.6, object.__init__ no longer accepts input
6363
# arguments. HasTraits does not define an __init__ and
6464
# therefore these args were being ignored.
@@ -79,7 +79,7 @@ def items(self):
7979
yield name, self.traits()[name]
8080

8181
def __repr__(self):
82-
""" Return a well-formatted representation of the traits """
82+
"""Return a well-formatted representation of the traits"""
8383
outstr = []
8484
for name, value in sorted(self.trait_get().items()):
8585
outstr.append("%s = %s" % (name, value))

nipype/interfaces/cmtk/cmtk.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ def cmat(
190190
endpoint_name,
191191
intersections=False,
192192
):
193-
""" Create the connection matrix for each resolution using fibers and ROIs. """
193+
"""Create the connection matrix for each resolution using fibers and ROIs."""
194194
import scipy.io as sio
195195

196196
stats = {}
@@ -460,7 +460,7 @@ def cmat(
460460

461461

462462
def save_fibers(oldhdr, oldfib, fname, indices):
463-
""" Stores a new trackvis file fname using only given indices """
463+
"""Stores a new trackvis file fname using only given indices"""
464464
hdrnew = oldhdr.copy()
465465
outstreams = []
466466
for i in indices:

nipype/interfaces/dipy/base.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@
2727

2828

2929
def no_dipy():
30-
""" Check if dipy is available """
30+
"""Check if dipy is available"""
3131
global HAVE_DIPY
3232
return not HAVE_DIPY
3333

3434

3535
def dipy_version():
36-
""" Check dipy version """
36+
"""Check dipy version"""
3737
if no_dipy():
3838
return None
3939

nipype/interfaces/fsl/fix.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@ class Cleaner(CommandLine):
375375
cmd = "fix -a"
376376

377377
def _get_cleaned_functional_filename(self, artifacts_list_filename):
378-
""" extract the proper filename from the first line of the artifacts file """
378+
"""extract the proper filename from the first line of the artifacts file"""
379379
artifacts_list_file = open(artifacts_list_filename, "r")
380380
functional_filename, extension = artifacts_list_file.readline().split(".")
381381
artifacts_list_file_path, artifacts_list_filename = os.path.split(

nipype/interfaces/fsl/preprocess.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ def _gen_filename(self, name):
236236

237237

238238
class FASTInputSpec(FSLCommandInputSpec):
239-
""" Defines inputs (trait classes) for FAST """
239+
"""Defines inputs (trait classes) for FAST"""
240240

241241
in_files = InputMultiPath(
242242
File(exists=True),

nipype/interfaces/io.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ class ProgressPercentage(object):
169169
"""
170170

171171
def __init__(self, filename):
172-
""""""
172+
""" """
173173

174174
# Import packages
175175
import threading
@@ -181,7 +181,7 @@ def __init__(self, filename):
181181
self._lock = threading.Lock()
182182

183183
def __call__(self, bytes_amount):
184-
""""""
184+
""" """
185185

186186
# Import packages
187187
import sys
@@ -206,7 +206,7 @@ def __call__(self, bytes_amount):
206206

207207
# DataSink inputs
208208
class DataSinkInputSpec(DynamicTraitedSpec, BaseInterfaceInputSpec):
209-
""""""
209+
""" """
210210

211211
# Init inputspec data attributes
212212
base_directory = Str(desc="Path to the base directory for storing data.")

nipype/interfaces/matlab.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def get_matlab_command():
4242

4343

4444
class MatlabInputSpec(CommandLineInputSpec):
45-
""" Basic expected inputs to Matlab interface """
45+
"""Basic expected inputs to Matlab interface"""
4646

4747
script = traits.Str(
4848
argstr='-r "%s;exit"', desc="m-code to run", mandatory=True, position=-1
@@ -187,7 +187,7 @@ def _format_arg(self, name, trait_spec, value):
187187
return super(MatlabCommand, self)._format_arg(name, trait_spec, value)
188188

189189
def _gen_matlab_command(self, argstr, script_lines):
190-
""" Generates commands and, if mfile specified, writes it to disk."""
190+
"""Generates commands and, if mfile specified, writes it to disk."""
191191
cwd = os.getcwd()
192192
mfile = self.inputs.mfile or self.inputs.uses_mcr
193193
paths = []

nipype/interfaces/niftyfit/asl.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111

1212
class FitAslInputSpec(CommandLineInputSpec):
13-
""" Input Spec for FitAsl. """
13+
"""Input Spec for FitAsl."""
1414

1515
desc = "Filename of the 4D ASL (control/label) source image (mandatory)."
1616
source_file = File(
@@ -129,7 +129,7 @@ class FitAslInputSpec(CommandLineInputSpec):
129129

130130

131131
class FitAslOutputSpec(TraitedSpec):
132-
""" Output Spec for FitAsl. """
132+
"""Output Spec for FitAsl."""
133133

134134
desc = "Filename of the Cerebral Blood Flow map (in ml/100g/min)."
135135
cbf_file = File(exists=True, desc=desc)

nipype/interfaces/niftyfit/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class NiftyFitCommand(CommandLine):
3131
_suffix = "_nf"
3232

3333
def __init__(self, **inputs):
34-
""" Init method calling super. No version to be checked."""
34+
"""Init method calling super. No version to be checked."""
3535
super(NiftyFitCommand, self).__init__(**inputs)
3636

3737
def _gen_fname(self, basename, out_dir=None, suffix=None, ext=None):

nipype/interfaces/niftyfit/dwi.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111

1212
class FitDwiInputSpec(CommandLineInputSpec):
13-
""" Input Spec for FitDwi. """
13+
"""Input Spec for FitDwi."""
1414

1515
# Inputs options
1616
source_file = File(
@@ -281,7 +281,7 @@ class FitDwiInputSpec(CommandLineInputSpec):
281281

282282

283283
class FitDwiOutputSpec(TraitedSpec):
284-
""" Output Spec for FitDwi. """
284+
"""Output Spec for FitDwi."""
285285

286286
error_file = File(desc="Filename of parameter error maps")
287287
res_file = File(desc="Filename of model residual map")
@@ -342,7 +342,7 @@ def _format_arg(self, name, trait_spec, value):
342342

343343

344344
class DwiToolInputSpec(CommandLineInputSpec):
345-
""" Input Spec for DwiTool. """
345+
"""Input Spec for DwiTool."""
346346

347347
desc = "The source image containing the fitted model."
348348
source_file = File(
@@ -540,7 +540,7 @@ class DwiToolInputSpec(CommandLineInputSpec):
540540

541541

542542
class DwiToolOutputSpec(TraitedSpec):
543-
""" Output Spec for DwiTool. """
543+
"""Output Spec for DwiTool."""
544544

545545
desc = "Filename of multi-compartment model parameter map \
546546
(-ivim,-ball,-nod)"

nipype/interfaces/niftyfit/qt1.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212

1313
class FitQt1InputSpec(CommandLineInputSpec):
14-
""" Input Spec for FitQt1. """
14+
"""Input Spec for FitQt1."""
1515

1616
desc = "Filename of the 4D Multi-Echo T1 source image."
1717
source_file = File(
@@ -144,7 +144,7 @@ class FitQt1InputSpec(CommandLineInputSpec):
144144

145145

146146
class FitQt1OutputSpec(TraitedSpec):
147-
""" Output Spec for FitQt1. """
147+
"""Output Spec for FitQt1."""
148148

149149
t1map_file = File(desc="Filename of the estimated output T1 map (in ms)")
150150
m0map_file = File(desc="Filename of the m0 map")

nipype/interfaces/niftyfit/tests/test_asl.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
@pytest.mark.skipif(no_nifty_tool(cmd="fit_asl"), reason="niftyfit is not installed")
1515
def test_fit_asl():
16-
""" Testing FitAsl interface."""
16+
"""Testing FitAsl interface."""
1717
# Create the test node
1818
fit_asl = FitAsl()
1919

nipype/interfaces/niftyfit/tests/test_dwi.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
@pytest.mark.skipif(no_nifty_tool(cmd="fit_dwi"), reason="niftyfit is not installed")
1414
def test_fit_dwi():
15-
""" Testing FitDwi interface."""
15+
"""Testing FitDwi interface."""
1616
# Create a node object
1717
fit_dwi = FitDwi()
1818

@@ -60,7 +60,7 @@ def test_fit_dwi():
6060

6161
@pytest.mark.skipif(no_nifty_tool(cmd="dwi_tool"), reason="niftyfit is not installed")
6262
def test_dwi_tool():
63-
""" Testing DwiTool interface."""
63+
"""Testing DwiTool interface."""
6464
# Create a node object
6565
dwi_tool = DwiTool()
6666

nipype/interfaces/niftyfit/tests/test_qt1.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
@pytest.mark.skipif(no_nifty_tool(cmd="fit_qt1"), reason="niftyfit is not installed")
1414
def test_fit_qt1():
15-
""" Testing FitQt1 interface."""
15+
"""Testing FitQt1 interface."""
1616
# Create a node object
1717
fit_qt1 = FitQt1()
1818

nipype/interfaces/niftyreg/reg.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616

1717
class RegAladinInputSpec(NiftyRegCommandInputSpec):
18-
""" Input Spec for RegAladin. """
18+
"""Input Spec for RegAladin."""
1919

2020
# Input reference file
2121
ref_file = File(
@@ -116,7 +116,7 @@ class RegAladinInputSpec(NiftyRegCommandInputSpec):
116116

117117

118118
class RegAladinOutputSpec(TraitedSpec):
119-
""" Output Spec for RegAladin. """
119+
"""Output Spec for RegAladin."""
120120

121121
aff_file = File(desc="The output affine file")
122122
res_file = File(desc="The output transformed image")
@@ -163,7 +163,7 @@ def _list_outputs(self):
163163

164164

165165
class RegF3DInputSpec(NiftyRegCommandInputSpec):
166-
""" Input Spec for RegF3D. """
166+
"""Input Spec for RegF3D."""
167167

168168
# Input reference file
169169
ref_file = File(
@@ -343,7 +343,7 @@ class RegF3DInputSpec(NiftyRegCommandInputSpec):
343343

344344

345345
class RegF3DOutputSpec(TraitedSpec):
346-
""" Output Spec for RegF3D. """
346+
"""Output Spec for RegF3D."""
347347

348348
cpp_file = File(desc="The output CPP file")
349349
res_file = File(desc="The output resampled image")

0 commit comments

Comments
 (0)