Skip to content

Commit

Permalink
Updating code to pass all tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ayushjariyal committed Feb 14, 2025
1 parent ce6f8ea commit 71a6017
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/aiida/orm/nodes/data/array/xy.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,10 +186,6 @@ def get_y(self) -> list[tuple[str, 'ndarray', str]]:
def get_y_arraynames(self) -> list[str]:
"""Returns the user-provided names of the y-arrays."""

try:
y_names = self.base.attributes.get('y_names')
if y_names is None:
raise KeyError
return y_names
except (KeyError, AttributeError):
raise NotExistent(f'No y names been set yet!')
y_names = getattr(self.base.attributes, 'y_names', None)
if y_names is None:
raise NotExistent('No y names have been set yet!')

0 comments on commit 71a6017

Please sign in to comment.