Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
FSL
fslpy
Commits
f456f6bd
Commit
f456f6bd
authored
Mar 06, 2019
by
Paul McCarthy
🚵
Browse files
DOC: Query method docs, changed MAtch string repr
parent
6bd0d7c2
Changes
1
Hide whitespace changes
Inline
Side-by-side
fsl/utils/filetree/query.py
View file @
f456f6bd
...
...
@@ -148,11 +148,19 @@ class FileTreeQuery(object):
def
query
(
self
,
short_name
,
**
variables
):
"""Search for files of the given ``short_name``, which match
the specified ``variables``.
the specified ``variables``. All hits are returned for variables
that are unspecified.
:arg short_name: Short name of files to search for.
All other arguments are
All other arguments are assumed to be ``variable=value`` pairs,
used to restrict which matches are returned. All values are returned
for variables that are not specified, or variables which are given a
value of ``'*'``.
:returns: A ``numpy.array`` of ``Match`` objects, with axes
corresponding to the labels returned by the :meth:`axes`
method.
"""
varnames
=
list
(
variables
.
keys
())
...
...
@@ -260,7 +268,7 @@ class Match(object):
def
__repr__
(
self
):
"""Returns a string representation of this ``Match``. """
return
'Match({})
{}
'
.
format
(
self
.
filename
,
self
.
variables
)
return
'Match({})'
.
format
(
self
.
filename
)
def
__str__
(
self
):
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment