From f456f6bd12c7b9102ce6145512e5916fe7498486 Mon Sep 17 00:00:00 2001 From: Paul McCarthy <pauldmccarthy@gmail.com> Date: Wed, 6 Mar 2019 14:16:36 +1030 Subject: [PATCH] DOC: Query method docs, changed MAtch string repr --- fsl/utils/filetree/query.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/fsl/utils/filetree/query.py b/fsl/utils/filetree/query.py index 2be755657..10c86374d 100644 --- a/fsl/utils/filetree/query.py +++ b/fsl/utils/filetree/query.py @@ -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): -- GitLab