Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
fslpy
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Michiel Cottaar
fslpy
Commits
daf308f5
Commit
daf308f5
authored
6 years ago
by
Paul McCarthy
Browse files
Options
Downloads
Patches
Plain Diff
BF: Fix py2 syntax error.
parent
da6d3389
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
fsl/wrappers/wrapperutils.py
+14
-12
14 additions, 12 deletions
fsl/wrappers/wrapperutils.py
with
14 additions
and
12 deletions
fsl/wrappers/wrapperutils.py
+
14
−
12
View file @
daf308f5
...
@@ -511,8 +511,8 @@ class _FileOrThing(object):
...
@@ -511,8 +511,8 @@ class _FileOrThing(object):
prepOut
,
prepOut
,
load
,
load
,
removeExt
,
removeExt
,
*
thin
gs
,
*
ar
gs
,
outprefix
=
None
):
**
kwargs
):
"""
Initialise a ``_FileOrThing`` decorator.
"""
Initialise a ``_FileOrThing`` decorator.
:arg func: The function to be decorated.
:arg func: The function to be decorated.
...
@@ -530,15 +530,17 @@ class _FileOrThing(object):
...
@@ -530,15 +530,17 @@ class _FileOrThing(object):
:arg removeExt: Function which can remove a file extension from a file
:arg removeExt: Function which can remove a file extension from a file
path.
path.
:arg things: Names of all arguments which will be handled by
:arg outprefix: Must be passed as a keyword argument. The name of a
this ``_FileOrThing`` decorator. If not provided,
positional or keyword argument to the function, which
*all* arguments passed to the function will be
specifies an output file name prefix. All other
handled.
arguments with names that begin with this prefix may
be interpreted as things to ``LOAD``.
All other positional arguments are interpreted as the names of the
arguments to the function which will be handled by this
``_FileOrThing`` decorator. If not provided, *all* arguments passed to
the function will be handled.
:arg outprefix: The name of a positional or keyword argument to the
function, which specifies an output file name prefix.
All other arguments with names that begin with this
prefix may be interpreted as things to ``LOAD``.
The ``prepIn`` and ``prepOut`` functions must accept the following
The ``prepIn`` and ``prepOut`` functions must accept the following
positional arguments:
positional arguments:
...
@@ -555,8 +557,8 @@ class _FileOrThing(object):
...
@@ -555,8 +557,8 @@ class _FileOrThing(object):
self
.
__prepOut
=
prepOut
self
.
__prepOut
=
prepOut
self
.
__load
=
load
self
.
__load
=
load
self
.
__removeExt
=
removeExt
self
.
__removeExt
=
removeExt
self
.
__things
=
thin
gs
self
.
__things
=
ar
gs
self
.
__outprefix
=
outprefix
self
.
__outprefix
=
kwargs
.
get
(
'
outprefix
'
,
None
)
def
__call__
(
self
,
*
args
,
**
kwargs
):
def
__call__
(
self
,
*
args
,
**
kwargs
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment