Skip to content

Commit

Permalink
Merge pull request #201 from rayosborn:fix-ipython-calltips
Browse files Browse the repository at this point in the history
Fixes compatibility with IPython 8.12.
  • Loading branch information
rayosborn authored Jun 29, 2023
2 parents a3e3140 + cd99fbb commit 76813cf
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/nexusformat/nexus/tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -4488,7 +4488,7 @@ def __getattr__(self, name):
return self.entries[name]
elif name in self.attrs:
return self.attrs[name]
raise NeXusError("'"+name+"' not in "+self.nxpath)
raise AttributeError("'"+name+"' not in "+self.nxpath)

def __setattr__(self, name, value):
"""Set an attribute as an object or regular Python attribute.
Expand Down Expand Up @@ -5285,7 +5285,8 @@ def __getattr__(self, name):
try:
return getattr(self.nxlink, name)
except Exception:
raise NeXusError(f"Cannot resolve the link to '{self._target}'")
raise AttributeError(
f"Cannot resolve the link to '{self._target}'")

def __setattr__(self, name, value):
"""Set an attribute of the link target.
Expand Down

0 comments on commit 76813cf

Please sign in to comment.