Skip to content

Commit

Permalink
updating code to pass all checks
Browse files Browse the repository at this point in the history
  • Loading branch information
ayushjariyal committed Feb 14, 2025
1 parent 71a6017 commit fb66e7d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/aiida/orm/nodes/data/array/xy.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,8 @@ 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."""

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

0 comments on commit fb66e7d

Please sign in to comment.