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

RF: Add tree attribute to FileTreeQuery for convenience

parent f78690dd
No related branches found
No related tags found
No related merge requests found
......@@ -149,6 +149,7 @@ class FileTreeQuery(object):
tarr[tuple(idx)] = match
self.__tree = tree
self.__allvars = allvars
self.__templatevars = templatevars
self.__matches = matches
......@@ -179,6 +180,14 @@ class FileTreeQuery(object):
return {var : list(self.__allvars[var]) for var in varnames}
@property
def tree(self):
"""Returns the :class:`.FileTree` associated with this
``FileTreeQuery``.
"""
return self.__tree
@property
def templates(self) -> List[str]:
"""Returns a list containing all templates of the ``FileTree`` that
......
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