Skip to content

Commit c88baff

Browse files
committed
Replace traits.Str with base Str and switch double/single quotes.
Also re-run make check-before-commit, which overwrote the old 3dNotes test.
1 parent ee143e8 commit c88baff

File tree

2 files changed

+21
-21
lines changed

2 files changed

+21
-21
lines changed

nipype/interfaces/afni/preprocess.py

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
from ...utils.filemanip import (load_json, save_json, split_filename)
2121
from ..base import (
2222
CommandLineInputSpec, CommandLine, Directory, TraitedSpec,
23-
traits, isdefined, File, InputMultiPath, Undefined)
23+
traits, isdefined, File, InputMultiPath, Undefined, Str)
2424

2525
from .base import (
2626
AFNICommandBase, AFNICommand, AFNICommandInputSpec, AFNICommandOutputSpec,
@@ -3013,26 +3013,26 @@ class QualityIndex(CommandLine):
30133013

30143014

30153015
class NotesInputSpec(AFNICommandInputSpec):
3016-
in_file = File(desc="input file to 3dNotes",
3017-
argstr="%s",
3016+
in_file = File(desc='input file to 3dNotes',
3017+
argstr='%s',
30183018
position=-1,
30193019
mandatory=True,
30203020
exists=True,
30213021
copyfile=False)
3022-
add = traits.Str(desc="note to add",
3023-
argstr="-a '%s'")
3024-
add_history = traits.Str(desc="note to add to history",
3025-
argstr="-h '%s'",
3026-
xor=["rep_history"])
3027-
rep_history = traits.Str(desc="note with which to replace history",
3028-
argstr="-HH '%s'",
3029-
xor=["add_history"])
3030-
delete = traits.Int(desc="delete note number num",
3031-
argstr="-d %d")
3032-
ses = traits.Bool(desc="print to stdout the expanded notes",
3033-
argstr="-ses")
3034-
out_file = File(desc="output image file name",
3035-
argstr="%s")
3022+
add = Str(desc='note to add',
3023+
argstr='-a "%s"')
3024+
add_history = Str(desc='note to add to history',
3025+
argstr='-h "%s"',
3026+
xor=['rep_history'])
3027+
rep_history = Str(desc='note with which to replace history',
3028+
argstr='-HH "%s"',
3029+
xor=['add_history'])
3030+
delete = traits.Int(desc='delete note number num',
3031+
argstr='-d %d')
3032+
ses = traits.Bool(desc='print to stdout the expanded notes',
3033+
argstr='-ses')
3034+
out_file = File(desc='output image file name',
3035+
argstr='%s')
30363036

30373037

30383038
class Notes(CommandLine):
@@ -3051,7 +3051,7 @@ class Notes(CommandLine):
30513051
>>> notes.inputs.add = "This note is added."
30523052
>>> notes.inputs.add_history = "This note is added to history."
30533053
>>> notes.cmdline #doctest: +IGNORE_UNICODE
3054-
"3dNotes -a 'This note is added.' -h 'This note is added to history.' functional.HEAD"
3054+
'3dNotes -a "This note is added." -h "This note is added to history." functional.HEAD'
30553055
>>> res = notes.run() # doctest: +SKIP
30563056
"""
30573057

nipype/interfaces/afni/tests/test_auto_Notes.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44

55

66
def test_Notes_inputs():
7-
input_map = dict(add=dict(argstr="-a '%s'",
7+
input_map = dict(add=dict(argstr='-a "%s"',
88
),
9-
add_history=dict(argstr="-h '%s'",
9+
add_history=dict(argstr='-h "%s"',
1010
xor=[u'rep_history'],
1111
),
1212
args=dict(argstr='%s',
@@ -27,7 +27,7 @@ def test_Notes_inputs():
2727
out_file=dict(argstr='%s',
2828
),
2929
outputtype=dict(),
30-
rep_history=dict(argstr="-HH '%s'",
30+
rep_history=dict(argstr='-HH "%s"',
3131
xor=[u'add_history'],
3232
),
3333
ses=dict(argstr='-ses',

0 commit comments

Comments
 (0)