Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
fslpy
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Analyze
Contributor analytics
CI/CD 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
FSL
fslpy
Commits
f456f6bd
Commit
f456f6bd
authored
6 years ago
by
Paul McCarthy
Browse files
Options
Downloads
Patches
Plain Diff
DOC: Query method docs, changed MAtch string repr
parent
6bd0d7c2
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/utils/filetree/query.py
+11
-3
11 additions, 3 deletions
fsl/utils/filetree/query.py
with
11 additions
and
3 deletions
fsl/utils/filetree/query.py
+
11
−
3
View file @
f456f6bd
...
@@ -148,11 +148,19 @@ class FileTreeQuery(object):
...
@@ -148,11 +148,19 @@ class FileTreeQuery(object):
def
query
(
self
,
short_name
,
**
variables
):
def
query
(
self
,
short_name
,
**
variables
):
"""
Search for files of the given ``short_name``, which match
"""
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.
: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
())
varnames
=
list
(
variables
.
keys
())
...
@@ -260,7 +268,7 @@ class Match(object):
...
@@ -260,7 +268,7 @@ class Match(object):
def
__repr__
(
self
):
def
__repr__
(
self
):
"""
Returns a string representation of this ``Match``.
"""
"""
Returns a string representation of this ``Match``.
"""
return
'
Match({})
{}
'
.
format
(
self
.
filename
,
self
.
variables
)
return
'
Match({})
'
.
format
(
self
.
filename
)
def
__str__
(
self
):
def
__str__
(
self
):
...
...
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