Skip to content
Snippets Groups Projects
Commit a7e7244b authored by Tamas Gal's avatar Tamas Gal :speech_balloon:
Browse files

Add tab completion

parent 09b87761
No related branches found
No related tags found
1 merge request!47Resolve "uproot4 integration"
Pipeline #16346 failed
......@@ -111,6 +111,10 @@ class EventReader:
self.nested_branches = valid_nested_branches
self._keys = keys
def __dir__(self):
"""Tab completion in IPython"""
return list(self.keys()) + ["header"]
def keys(self):
"""Returns all accessible branch keys, without the skipped ones."""
return self._keys
......@@ -320,6 +324,10 @@ class Branch:
self._aliases = aliases
self._index_chain = index_chain
def __dir__(self):
"""Tab completion in IPython"""
return list(self.fields)
def __getattr__(self, attr):
if attr not in self._aliases:
raise AttributeError(
......
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