Skip to content

Commit

Permalink
STY: apply ruff/flake8-implicit-str-concat rule ISC003
Browse files Browse the repository at this point in the history
ISC003 Explicitly concatenated string should be implicitly concatenated
  • Loading branch information
DimitriPapadopoulos committed Oct 5, 2024
1 parent a700e89 commit 535d160
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 38 deletions.
5 changes: 2 additions & 3 deletions nipype/interfaces/freesurfer/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -1469,9 +1469,8 @@ class Label2LabelInputSpec(FSTraitedSpec):
desc="Registration method",
)
copy_inputs = traits.Bool(
desc="If running as a node, set this to True."
+ "This will copy the input files to the node "
+ "directory."
desc="If running as a node, set this to True. "
"This will copy the input files to the node directory."
)


Expand Down
17 changes: 8 additions & 9 deletions nipype/interfaces/freesurfer/preprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -2645,20 +2645,20 @@ class MNIBiasCorrectionInputSpec(FSTraitedSpec):
hash_files=False,
keep_extension=True,
desc="output volume. Output can be any format accepted by mri_convert. "
+ "If the output format is COR, then the directory must exist.",
"If the output format is COR, then the directory must exist.",
)
iterations = traits.Int(
4,
usedefault=True,
argstr="--n %d",
desc="Number of iterations to run nu_correct. Default is 4. This is the number of times "
+ "that nu_correct is repeated (ie, using the output from the previous run as the input for "
+ "the next). This is different than the -iterations option to nu_correct.",
"that nu_correct is repeated (ie, using the output from the previous run as the input for "
"the next). This is different than the -iterations option to nu_correct.",
)
protocol_iterations = traits.Int(
argstr="--proto-iters %d",
desc="Passes Np as argument of the -iterations flag of nu_correct. This is different "
+ "than the --n flag above. Default is not to pass nu_correct the -iterations flag.",
"than the --n flag above. Default is not to pass nu_correct the -iterations flag.",
)
distance = traits.Int(argstr="--distance %d", desc="N3 -distance option")
no_rescale = traits.Bool(
Expand Down Expand Up @@ -3167,8 +3167,8 @@ class MRIsCALabelInputSpec(FSTraitedSpecOpenMP):
seed = traits.Int(argstr="-seed %d", desc="")
copy_inputs = traits.Bool(
desc="Copies implicit inputs to node directory "
+ "and creates a temp subjects_directory. "
+ "Use this when running as a node"
"and creates a temp subjects_directory. "
"Use this when running as a node"
)


Expand Down Expand Up @@ -3286,9 +3286,8 @@ class SegmentCCInputSpec(FSTraitedSpec):
desc="Subject name",
)
copy_inputs = traits.Bool(
desc="If running as a node, set this to True."
+ "This will copy the input files to the node "
+ "directory."
desc="If running as a node, set this to True. "
"This will copy the input files to the node directory."
)


Expand Down
6 changes: 3 additions & 3 deletions nipype/interfaces/freesurfer/registration.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ class RegisterInputSpec(FSTraitedSpec):
mandatory=True,
position=-2,
desc="The data to register to. In normal recon-all usage, "
+ "this is a template file for average surface.",
"this is a template file for average surface.",
)
in_sulc = File(
exists=True,
Expand Down Expand Up @@ -331,7 +331,7 @@ class PaintInputSpec(FSTraitedSpec):
mandatory=True,
position=-2,
desc="Surface file with grid (vertices) onto which the "
+ "template data is to be sampled or 'painted'",
"template data is to be sampled or 'painted'",
)
template = File(
argstr="%s", exists=True, mandatory=True, position=-3, desc="Template file"
Expand All @@ -348,7 +348,7 @@ class PaintInputSpec(FSTraitedSpec):
name_source=["in_surf"],
keep_extension=False,
desc="File containing a surface-worth of per-vertex values, "
+ "saved in 'curvature' format.",
"saved in 'curvature' format.",
)


Expand Down
34 changes: 14 additions & 20 deletions nipype/interfaces/freesurfer/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -2094,7 +2094,7 @@ class CheckTalairachAlignmentInputSpec(FSTraitedSpec):
usedefault=True,
argstr="-T %.3f",
desc="Talairach transforms for subjects with p-values <= T "
+ "are considered as very unlikely default=0.010",
"are considered as very unlikely default=0.010",
)


Expand Down Expand Up @@ -2483,8 +2483,7 @@ class FixTopologyInputSpec(FSTraitedSpec):
copy_inputs = traits.Bool(
mandatory=True,
desc="If running as a node, set this to True "
+ "otherwise, the topology fixing will be done "
+ "in place.",
"otherwise, the topology fixing will be done in place.",
)

# optional
Expand Down Expand Up @@ -2737,9 +2736,8 @@ class MakeSurfacesInputSpec(FSTraitedSpec):
)
white = traits.String(argstr="-white %s", desc="White surface name")
copy_inputs = traits.Bool(
desc="If running as a node, set this to True."
+ "This will copy the input files to the node "
+ "directory."
desc="If running as a node, set this to True. "
"This will copy the input files to the node directory."
)


Expand Down Expand Up @@ -3012,9 +3010,8 @@ class CurvatureStatsInputSpec(FSTraitedSpec):
)
write = traits.Bool(argstr="--writeCurvatureFiles", desc="Write curvature files")
copy_inputs = traits.Bool(
desc="If running as a node, set this to True."
+ "This will copy the input files to the node "
+ "directory."
desc="If running as a node, set this to True. "
"This will copy the input files to the node directory."
)


Expand Down Expand Up @@ -3237,7 +3234,7 @@ class VolumeMaskInputSpec(FSTraitedSpec):
exists=True,
xor=["in_aseg"],
desc="Implicit aseg.mgz segmentation. "
+ "Specify a different aseg by using the 'in_aseg' input.",
"Specify a different aseg by using the 'in_aseg' input.",
)
subject_id = traits.String(
"subject_id",
Expand All @@ -3257,12 +3254,11 @@ class VolumeMaskInputSpec(FSTraitedSpec):
save_ribbon = traits.Bool(
argstr="--save_ribbon",
desc="option to save just the ribbon for the "
+ "hemispheres in the format ?h.ribbon.mgz",
"hemispheres in the format ?h.ribbon.mgz",
)
copy_inputs = traits.Bool(
desc="If running as a node, set this to True."
+ "This will copy the implicit input files to the "
+ "node directory."
desc="If running as a node, set this to True. "
"This will copy the implicit input files to the node directory."
)


Expand Down Expand Up @@ -3431,9 +3427,8 @@ class ParcellationStatsInputSpec(FSTraitedSpec):
desc="Output annotation files's colortable to text file",
)
copy_inputs = traits.Bool(
desc="If running as a node, set this to True."
+ "This will copy the input files to the node "
+ "directory."
desc="If running as a node, set this to True. "
"This will copy the input files to the node directory."
)
th3 = traits.Bool(
argstr="-th3",
Expand Down Expand Up @@ -3623,9 +3618,8 @@ class ContrastInputSpec(FSTraitedSpec):
exists=True, mandatory=True, desc="Implicit input file mri/rawavg.mgz"
)
copy_inputs = traits.Bool(
desc="If running as a node, set this to True."
+ "This will copy the input files to the node "
+ "directory."
desc="If running as a node, set this to True. "
"This will copy the input files to the node directory."
)


Expand Down
6 changes: 3 additions & 3 deletions nipype/interfaces/fsl/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -2366,8 +2366,8 @@ class GLMInputSpec(FSLCommandInputSpec):
position=2,
desc=(
"file name of the GLM design matrix (text time"
+ " courses for temporal regression or an image"
+ " file for spatial regression)"
" courses for temporal regression or an image"
" file for spatial regression)"
),
)
contrasts = File(
Expand All @@ -2381,7 +2381,7 @@ class GLMInputSpec(FSLCommandInputSpec):
argstr="--des_norm",
desc=(
"switch on normalization of the design"
+ " matrix columns to unit std deviation"
" matrix columns to unit std deviation"
),
)
dat_norm = traits.Bool(
Expand Down

0 comments on commit 535d160

Please sign in to comment.