Skip to content

Commit f64bf33

Browse files
committed
STY: black
1 parent 82c9276 commit f64bf33

File tree

135 files changed

+1961
-2307
lines changed

Some content is hidden

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

135 files changed

+1961
-2307
lines changed

nipype/algorithms/metrics.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,7 @@ class DistanceOutputSpec(TraitedSpec):
6363

6464

6565
class Distance(BaseInterface):
66-
"""Calculates distance between two volumes.
67-
"""
66+
"""Calculates distance between two volumes."""
6867

6968
input_spec = DistanceInputSpec
7069
output_spec = DistanceOutputSpec
@@ -542,7 +541,7 @@ class ErrorMapOutputSpec(TraitedSpec):
542541

543542

544543
class ErrorMap(BaseInterface):
545-
""" Calculates the error (distance) map between two input volumes.
544+
"""Calculates the error (distance) map between two input volumes.
546545
547546
Example
548547
-------

nipype/algorithms/misc.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,7 @@ class SimpleThresholdOutputSpec(TraitedSpec):
141141

142142

143143
class SimpleThreshold(BaseInterface):
144-
"""Applies a threshold to input volumes
145-
"""
144+
"""Applies a threshold to input volumes"""
146145

147146
input_spec = SimpleThresholdInputSpec
148147
output_spec = SimpleThresholdOutputSpec
@@ -240,8 +239,7 @@ class CreateNiftiOutputSpec(TraitedSpec):
240239

241240

242241
class CreateNifti(BaseInterface):
243-
"""Creates a nifti volume
244-
"""
242+
"""Creates a nifti volume"""
245243

246244
input_spec = CreateNiftiInputSpec
247245
output_spec = CreateNiftiOutputSpec

nipype/algorithms/modelgen.py

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ def scale_timings(timelist, input_units, output_units, time_repetition):
135135

136136

137137
def bids_gen_info(
138-
bids_event_files, condition_column="", amplitude_column=None, time_repetition=False,
138+
bids_event_files, condition_column="", amplitude_column=None, time_repetition=False
139139
):
140140
"""
141141
Generate a subject_info structure from a list of BIDS .tsv event files.
@@ -471,8 +471,7 @@ def _generate_standard_design(
471471
return sessinfo
472472

473473
def _generate_design(self, infolist=None):
474-
"""Generate design specification for a typical fmri paradigm
475-
"""
474+
"""Generate design specification for a typical fmri paradigm"""
476475
realignment_parameters = []
477476
if isdefined(self.inputs.realignment_parameters):
478477
for parfile in self.inputs.realignment_parameters:
@@ -517,8 +516,7 @@ def _generate_design(self, infolist=None):
517516
)
518517

519518
def _run_interface(self, runtime):
520-
"""
521-
"""
519+
""""""
522520
self._sessioninfo = None
523521
self._generate_design()
524522
return runtime
@@ -739,7 +737,7 @@ class SpecifySparseModelOutputSpec(SpecifyModelOutputSpec):
739737

740738

741739
class SpecifySparseModel(SpecifyModel):
742-
""" Specify a sparse model that is compatible with SPM/FSL designers [1]_.
740+
"""Specify a sparse model that is compatible with SPM/FSL designers [1]_.
743741
744742
Examples
745743
--------
@@ -770,8 +768,7 @@ class SpecifySparseModel(SpecifyModel):
770768
output_spec = SpecifySparseModelOutputSpec
771769

772770
def _gen_regress(self, i_onsets, i_durations, i_amplitudes, nscans):
773-
"""Generates a regressor for a sparse/clustered-sparse acquisition
774-
"""
771+
"""Generates a regressor for a sparse/clustered-sparse acquisition"""
775772
bplot = False
776773
if isdefined(self.inputs.save_plot) and self.inputs.save_plot:
777774
bplot = True
@@ -901,8 +898,7 @@ def _gen_regress(self, i_onsets, i_durations, i_amplitudes, nscans):
901898
return reg
902899

903900
def _cond_to_regress(self, info, nscans):
904-
"""Converts condition information to full regressors
905-
"""
901+
"""Converts condition information to full regressors"""
906902
reg = []
907903
regnames = []
908904
for i, cond in enumerate(info.conditions):

nipype/algorithms/rapidart.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -686,8 +686,7 @@ def _detect_outliers_core(self, imgfile, motionfile, runidx, cwd=None):
686686
save_json(statsfile, stats)
687687

688688
def _run_interface(self, runtime):
689-
"""Execute this module.
690-
"""
689+
"""Execute this module."""
691690
funcfilelist = ensure_list(self.inputs.realigned_files)
692691
motparamlist = ensure_list(self.inputs.realignment_parameters)
693692
for i, imgf in enumerate(funcfilelist):
@@ -814,8 +813,7 @@ def _get_spm_submatrix(self, spmmat, sessidx, rows=None):
814813
return outmatrix
815814

816815
def _run_interface(self, runtime):
817-
"""Execute this module.
818-
"""
816+
"""Execute this module."""
819817
import scipy.io as sio
820818

821819
motparamlist = self.inputs.realignment_parameters

nipype/algorithms/tests/test_TSNR.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,8 @@ def test_tsnr_withpoly3(self):
9393

9494
@mock.patch("warnings.warn")
9595
def test_warning(self, mock_warn):
96-
""" test that usage of misc.TSNR trips a warning to use
97-
confounds.TSNR instead """
96+
"""test that usage of misc.TSNR trips a warning to use
97+
confounds.TSNR instead"""
9898
# run
9999
misc.TSNR(in_file=self.in_filenames["in_file"])
100100

nipype/algorithms/tests/test_modelgen.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ def test_modelgen1(tmpdir):
105105
np.array([6.0, 6.0]),
106106
)
107107
npt.assert_almost_equal(
108-
np.array(res.outputs.session_info[0]["cond"][1]["duration"]), np.array([6.0,])
108+
np.array(res.outputs.session_info[0]["cond"][1]["duration"]), np.array([6.0])
109109
)
110110
npt.assert_almost_equal(
111111
np.array(res.outputs.session_info[1]["cond"][1]["duration"]),
@@ -191,14 +191,14 @@ def test_modelgen_spm_concat(tmpdir):
191191
np.array([1.0, 1.0]),
192192
)
193193
npt.assert_almost_equal(
194-
np.array(res.outputs.session_info[0]["cond"][1]["duration"]), np.array([1.0,])
194+
np.array(res.outputs.session_info[0]["cond"][1]["duration"]), np.array([1.0])
195195
)
196196
npt.assert_almost_equal(
197197
np.array(res.outputs.session_info[1]["cond"][1]["duration"]),
198198
np.array([1.0, 1.0]),
199199
)
200200
npt.assert_almost_equal(
201-
np.array(res.outputs.session_info[2]["cond"][1]["duration"]), np.array([1.0,])
201+
np.array(res.outputs.session_info[2]["cond"][1]["duration"]), np.array([1.0])
202202
)
203203

204204
# Test case for variable number of events in concatenated runs, sometimes unique.

0 commit comments

Comments
 (0)