Skip to content

Commit 8553b39

Browse files
authored
Merge pull request #3679 from DimitriPapadopoulos/ISC
STY: Apply ruff/flake8-implicit-str-concat rules (ISC)
2 parents 72a944e + 535d160 commit 8553b39

File tree

12 files changed

+38
-46
lines changed

12 files changed

+38
-46
lines changed

nipype/algorithms/metrics.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -478,13 +478,13 @@ def _run_interface(self, runtime):
478478

479479
if np.any(refdata > 1.0):
480480
iflogger.warning(
481-
'Values greater than 1.0 found in "in_ref" input, ' "scaling values."
481+
'Values greater than 1.0 found in "in_ref" input, scaling values.'
482482
)
483483
refdata /= refdata.max()
484484

485485
if np.any(tstdata > 1.0):
486486
iflogger.warning(
487-
'Values greater than 1.0 found in "in_tst" input, ' "scaling values."
487+
'Values greater than 1.0 found in "in_tst" input, scaling values.'
488488
)
489489
tstdata /= tstdata.max()
490490

nipype/algorithms/misc.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -669,7 +669,7 @@ def _run_interface(self, runtime):
669669

670670
if isdefined(self.inputs.row_headings):
671671
iflogger.info(
672-
'Row headings have been provided. Adding "labels"' "column header."
672+
'Row headings have been provided. Adding "labels" column header.'
673673
)
674674
prefix = f'"{self.inputs.row_heading_title}","'
675675
csv_headings = prefix + '","'.join(itertools.chain(headings)) + '"\n'

nipype/interfaces/camino/utils.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ class ImageStatsInputSpec(CommandLineInputSpec):
4646
"double",
4747
argstr="-outputdatatype %s",
4848
usedefault=True,
49-
desc=('A Camino data type string, default is "float". ' "Type must be signed."),
49+
desc=('A Camino data type string, default is "float". Type must be signed.'),
5050
)
5151
output_root = File(
5252
argstr="-outputroot %s",

nipype/interfaces/freesurfer/model.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -1469,9 +1469,8 @@ class Label2LabelInputSpec(FSTraitedSpec):
14691469
desc="Registration method",
14701470
)
14711471
copy_inputs = traits.Bool(
1472-
desc="If running as a node, set this to True."
1473-
+ "This will copy the input files to the node "
1474-
+ "directory."
1472+
desc="If running as a node, set this to True. "
1473+
"This will copy the input files to the node directory."
14751474
)
14761475

14771476

nipype/interfaces/freesurfer/preprocess.py

+8-9
Original file line numberDiff line numberDiff line change
@@ -2645,20 +2645,20 @@ class MNIBiasCorrectionInputSpec(FSTraitedSpec):
26452645
hash_files=False,
26462646
keep_extension=True,
26472647
desc="output volume. Output can be any format accepted by mri_convert. "
2648-
+ "If the output format is COR, then the directory must exist.",
2648+
"If the output format is COR, then the directory must exist.",
26492649
)
26502650
iterations = traits.Int(
26512651
4,
26522652
usedefault=True,
26532653
argstr="--n %d",
26542654
desc="Number of iterations to run nu_correct. Default is 4. This is the number of times "
2655-
+ "that nu_correct is repeated (ie, using the output from the previous run as the input for "
2656-
+ "the next). This is different than the -iterations option to nu_correct.",
2655+
"that nu_correct is repeated (ie, using the output from the previous run as the input for "
2656+
"the next). This is different than the -iterations option to nu_correct.",
26572657
)
26582658
protocol_iterations = traits.Int(
26592659
argstr="--proto-iters %d",
26602660
desc="Passes Np as argument of the -iterations flag of nu_correct. This is different "
2661-
+ "than the --n flag above. Default is not to pass nu_correct the -iterations flag.",
2661+
"than the --n flag above. Default is not to pass nu_correct the -iterations flag.",
26622662
)
26632663
distance = traits.Int(argstr="--distance %d", desc="N3 -distance option")
26642664
no_rescale = traits.Bool(
@@ -3167,8 +3167,8 @@ class MRIsCALabelInputSpec(FSTraitedSpecOpenMP):
31673167
seed = traits.Int(argstr="-seed %d", desc="")
31683168
copy_inputs = traits.Bool(
31693169
desc="Copies implicit inputs to node directory "
3170-
+ "and creates a temp subjects_directory. "
3171-
+ "Use this when running as a node"
3170+
"and creates a temp subjects_directory. "
3171+
"Use this when running as a node"
31723172
)
31733173

31743174

@@ -3286,9 +3286,8 @@ class SegmentCCInputSpec(FSTraitedSpec):
32863286
desc="Subject name",
32873287
)
32883288
copy_inputs = traits.Bool(
3289-
desc="If running as a node, set this to True."
3290-
+ "This will copy the input files to the node "
3291-
+ "directory."
3289+
desc="If running as a node, set this to True. "
3290+
"This will copy the input files to the node directory."
32923291
)
32933292

32943293

nipype/interfaces/freesurfer/registration.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ class RegisterInputSpec(FSTraitedSpec):
251251
mandatory=True,
252252
position=-2,
253253
desc="The data to register to. In normal recon-all usage, "
254-
+ "this is a template file for average surface.",
254+
"this is a template file for average surface.",
255255
)
256256
in_sulc = File(
257257
exists=True,
@@ -331,7 +331,7 @@ class PaintInputSpec(FSTraitedSpec):
331331
mandatory=True,
332332
position=-2,
333333
desc="Surface file with grid (vertices) onto which the "
334-
+ "template data is to be sampled or 'painted'",
334+
"template data is to be sampled or 'painted'",
335335
)
336336
template = File(
337337
argstr="%s", exists=True, mandatory=True, position=-3, desc="Template file"
@@ -348,7 +348,7 @@ class PaintInputSpec(FSTraitedSpec):
348348
name_source=["in_surf"],
349349
keep_extension=False,
350350
desc="File containing a surface-worth of per-vertex values, "
351-
+ "saved in 'curvature' format.",
351+
"saved in 'curvature' format.",
352352
)
353353

354354

nipype/interfaces/freesurfer/utils.py

+14-20
Original file line numberDiff line numberDiff line change
@@ -2094,7 +2094,7 @@ class CheckTalairachAlignmentInputSpec(FSTraitedSpec):
20942094
usedefault=True,
20952095
argstr="-T %.3f",
20962096
desc="Talairach transforms for subjects with p-values <= T "
2097-
+ "are considered as very unlikely default=0.010",
2097+
"are considered as very unlikely default=0.010",
20982098
)
20992099

21002100

@@ -2483,8 +2483,7 @@ class FixTopologyInputSpec(FSTraitedSpec):
24832483
copy_inputs = traits.Bool(
24842484
mandatory=True,
24852485
desc="If running as a node, set this to True "
2486-
+ "otherwise, the topology fixing will be done "
2487-
+ "in place.",
2486+
"otherwise, the topology fixing will be done in place.",
24882487
)
24892488

24902489
# optional
@@ -2737,9 +2736,8 @@ class MakeSurfacesInputSpec(FSTraitedSpec):
27372736
)
27382737
white = traits.String(argstr="-white %s", desc="White surface name")
27392738
copy_inputs = traits.Bool(
2740-
desc="If running as a node, set this to True."
2741-
+ "This will copy the input files to the node "
2742-
+ "directory."
2739+
desc="If running as a node, set this to True. "
2740+
"This will copy the input files to the node directory."
27432741
)
27442742

27452743

@@ -3012,9 +3010,8 @@ class CurvatureStatsInputSpec(FSTraitedSpec):
30123010
)
30133011
write = traits.Bool(argstr="--writeCurvatureFiles", desc="Write curvature files")
30143012
copy_inputs = traits.Bool(
3015-
desc="If running as a node, set this to True."
3016-
+ "This will copy the input files to the node "
3017-
+ "directory."
3013+
desc="If running as a node, set this to True. "
3014+
"This will copy the input files to the node directory."
30183015
)
30193016

30203017

@@ -3237,7 +3234,7 @@ class VolumeMaskInputSpec(FSTraitedSpec):
32373234
exists=True,
32383235
xor=["in_aseg"],
32393236
desc="Implicit aseg.mgz segmentation. "
3240-
+ "Specify a different aseg by using the 'in_aseg' input.",
3237+
"Specify a different aseg by using the 'in_aseg' input.",
32413238
)
32423239
subject_id = traits.String(
32433240
"subject_id",
@@ -3257,12 +3254,11 @@ class VolumeMaskInputSpec(FSTraitedSpec):
32573254
save_ribbon = traits.Bool(
32583255
argstr="--save_ribbon",
32593256
desc="option to save just the ribbon for the "
3260-
+ "hemispheres in the format ?h.ribbon.mgz",
3257+
"hemispheres in the format ?h.ribbon.mgz",
32613258
)
32623259
copy_inputs = traits.Bool(
3263-
desc="If running as a node, set this to True."
3264-
+ "This will copy the implicit input files to the "
3265-
+ "node directory."
3260+
desc="If running as a node, set this to True. "
3261+
"This will copy the implicit input files to the node directory."
32663262
)
32673263

32683264

@@ -3431,9 +3427,8 @@ class ParcellationStatsInputSpec(FSTraitedSpec):
34313427
desc="Output annotation files's colortable to text file",
34323428
)
34333429
copy_inputs = traits.Bool(
3434-
desc="If running as a node, set this to True."
3435-
+ "This will copy the input files to the node "
3436-
+ "directory."
3430+
desc="If running as a node, set this to True. "
3431+
"This will copy the input files to the node directory."
34373432
)
34383433
th3 = traits.Bool(
34393434
argstr="-th3",
@@ -3623,9 +3618,8 @@ class ContrastInputSpec(FSTraitedSpec):
36233618
exists=True, mandatory=True, desc="Implicit input file mri/rawavg.mgz"
36243619
)
36253620
copy_inputs = traits.Bool(
3626-
desc="If running as a node, set this to True."
3627-
+ "This will copy the input files to the node "
3628-
+ "directory."
3621+
desc="If running as a node, set this to True. "
3622+
"This will copy the input files to the node directory."
36293623
)
36303624

36313625

nipype/interfaces/fsl/dti.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -941,7 +941,7 @@ class ProbTrackX2InputSpec(ProbTrackXBaseInputSpec):
941941
"OR",
942942
"AND",
943943
argstr="--waycond=%s",
944-
desc=('Waypoint condition. Either "AND" (default) ' 'or "OR"'),
944+
desc=('Waypoint condition. Either "AND" (default) or "OR"'),
945945
)
946946
wayorder = traits.Bool(
947947
desc=(

nipype/interfaces/fsl/model.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -2366,8 +2366,8 @@ class GLMInputSpec(FSLCommandInputSpec):
23662366
position=2,
23672367
desc=(
23682368
"file name of the GLM design matrix (text time"
2369-
+ " courses for temporal regression or an image"
2370-
+ " file for spatial regression)"
2369+
" courses for temporal regression or an image"
2370+
" file for spatial regression)"
23712371
),
23722372
)
23732373
contrasts = File(
@@ -2381,7 +2381,7 @@ class GLMInputSpec(FSLCommandInputSpec):
23812381
argstr="--des_norm",
23822382
desc=(
23832383
"switch on normalization of the design"
2384-
+ " matrix columns to unit std deviation"
2384+
" matrix columns to unit std deviation"
23852385
),
23862386
)
23872387
dat_norm = traits.Bool(

nipype/pipeline/engine/base.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ def clone(self, name):
8787
8888
"""
8989
if name == self.name:
90-
raise ValueError('Cloning requires a new name, "%s" is ' "in use." % name)
90+
raise ValueError('Cloning requires a new name, "%s" is in use.' % name)
9191
clone = deepcopy(self)
9292
clone.name = name
9393
if hasattr(clone, "_id"):

nipype/pipeline/engine/workflows.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1046,7 +1046,7 @@ def _get_dot(
10461046
else:
10471047
if colored:
10481048
dotlist.append(
1049-
('%s[label="%s", style=filled,' ' fillcolor="%s"];')
1049+
('%s[label="%s", style=filled, fillcolor="%s"];')
10501050
% (nodename, node_class_name, colorset[level])
10511051
)
10521052
else:

tools/gitwash_dumper.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ def make_link_targets(
129129
have_gh_url = True
130130
if not have_url or not have_ml_url:
131131
raise RuntimeError(
132-
"Need command line or known project " "and / or mailing list URLs"
132+
"Need command line or known project and / or mailing list URLs"
133133
)
134134
lines = []
135135
if url is not None:

0 commit comments

Comments
 (0)