Skip to content
Snippets Groups Projects
Commit f456f6bd authored by Paul McCarthy's avatar Paul McCarthy :mountain_bicyclist:
Browse files

DOC: Query method docs, changed MAtch string repr

parent 6bd0d7c2
No related branches found
No related tags found
No related merge requests found
...@@ -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):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment