Skip to content

Commit e74d33b

Browse files
committed
fix: codacy issues
1 parent 482d815 commit e74d33b

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed

nipype/interfaces/afni/base.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ class AFNICommandBase(CommandLine):
121121
def _run_interface(self, runtime, correct_return_codes=(0,)):
122122
if platform == "darwin":
123123
runtime.environ["DYLD_FALLBACK_LIBRARY_PATH"] = "/usr/local/afni/"
124-
return super(AFNICommandBase, self)._run_interface(runtime)
124+
return super(AFNICommandBase, self)._run_interface(runtime, correct_return_codes)
125125

126126

127127
class AFNICommandInputSpec(CommandLineInputSpec):

nipype/interfaces/afni/preprocess.py

+8-11
Original file line numberDiff line numberDiff line change
@@ -591,7 +591,7 @@ def _list_outputs(self):
591591
outputs["out_weight_file"] = op.abspath(self.inputs.out_weight_file)
592592

593593
if self.inputs.out_matrix:
594-
path, base, ext = split_filename(self.inputs.out_matrix)
594+
ext = split_filename(self.inputs.out_matrix)[-1]
595595
if ext.lower() not in [".1d", ".1D"]:
596596
outputs["out_matrix"] = self._gen_fname(
597597
self.inputs.out_matrix, suffix=".aff12.1D"
@@ -600,7 +600,7 @@ def _list_outputs(self):
600600
outputs["out_matrix"] = op.abspath(self.inputs.out_matrix)
601601

602602
if self.inputs.out_param_file:
603-
path, base, ext = split_filename(self.inputs.out_param_file)
603+
ext = split_filename(self.inputs.out_param_file)[-1]
604604
if ext.lower() not in [".1d", ".1D"]:
605605
outputs["out_param_file"] = self._gen_fname(
606606
self.inputs.out_param_file, suffix=".param.1D"
@@ -1220,9 +1220,6 @@ class DegreeCentrality(AFNICommand):
12201220

12211221
# Re-define generated inputs
12221222
def _list_outputs(self):
1223-
# Import packages
1224-
import os
1225-
12261223
# Update outputs dictionary if oned file is defined
12271224
outputs = super(DegreeCentrality, self)._list_outputs()
12281225
if self.inputs.oned_file:
@@ -1844,8 +1841,8 @@ def _parse_inputs(self, skip=None):
18441841
skip += ["outliers_file"]
18451842
return super(OutlierCount, self)._parse_inputs(skip)
18461843

1847-
def _run_interface(self, runtime):
1848-
runtime = super(OutlierCount, self)._run_interface(runtime)
1844+
def _run_interface(self, runtime, correct_return_codes=(0,)):
1845+
runtime = super(OutlierCount, self)._run_interface(runtime, correct_return_codes)
18491846

18501847
# Read from runtime.stdout or runtime.merged
18511848
with open(op.abspath(self.inputs.out_file), "w") as outfh:
@@ -2096,7 +2093,7 @@ class ROIStats(AFNICommandBase):
20962093
input_spec = ROIStatsInputSpec
20972094
output_spec = ROIStatsOutputSpec
20982095

2099-
def _format_arg(self, name, spec, value):
2096+
def _format_arg(self, name, trait_spec, value):
21002097
_stat_dict = {
21012098
"mean": "-nzmean",
21022099
"median": "-nzmedian",
@@ -2113,7 +2110,7 @@ def _format_arg(self, name, spec, value):
21132110
}
21142111
if name == "stat":
21152112
value = [_stat_dict[v] for v in value]
2116-
return super(ROIStats, self)._format_arg(name, spec, value)
2113+
return super(ROIStats, self)._format_arg(name, trait_spec, value)
21172114

21182115

21192116
class RetroicorInputSpec(AFNICommandInputSpec):
@@ -3146,8 +3143,8 @@ class TSmoothInputSpec(AFNICommandInputSpec):
31463143
argstr="-osf",
31473144
)
31483145
lin3 = traits.Int(
3149-
desc=r"3 point linear filter: :math:`0.5\,(1-m)\,a + m\,b + 0.5\,(1-m)\,c`"
3150-
" Here, 'm' is a number strictly between 0 and 1.",
3146+
desc=r"3 point linear filter: :math:`0.5\,(1-m)\,a + m\,b + 0.5\,(1-m)\,c`. "
3147+
"Here, 'm' is a number strictly between 0 and 1.",
31513148
argstr="-3lin %d",
31523149
)
31533150
hamming = traits.Int(

nipype/interfaces/nitime/analysis.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -86,11 +86,14 @@ class CoherenceAnalyzerInputSpec(BaseInterfaceInputSpec):
8686
)
8787

8888
output_csv_file = File(
89-
desc="File to write outputs (coherence,time-delay) with file-names: ``file_name_{coherence,timedelay}``"
89+
desc="File to write outputs (coherence,time-delay) with file-names: "
90+
"``file_name_{coherence,timedelay}``"
9091
)
9192

9293
output_figure_file = File(
93-
desc="File to write output figures (coherence,time-delay) with file-names: ``file_name_{coherence,timedelay}``. Possible formats: .png,.svg,.pdf,.jpg,..."
94+
desc="""\
95+
File to write output figures (coherence,time-delay) with file-names:
96+
``file_name_{coherence,timedelay}``. Possible formats: .png,.svg,.pdf,.jpg,..."""
9497
)
9598

9699
figure_type = traits.Enum(

0 commit comments

Comments
 (0)