Skip to content

Commit 3707833

Browse files
committed
SYNTAX: raise an error on Axis.id
since I think (hope), nobody uses this, go directly to the exception step instead of a warning
1 parent fb0535e commit 3707833

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

larray/core/axis.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1027,13 +1027,9 @@ def index(self, key) -> Union[int, np.ndarray, slice]:
10271027

10281028
translate = renamed_to(index, 'translate', raise_error=True)
10291029

1030-
# FIXME: remove id
10311030
@property
10321031
def id(self) -> str:
1033-
if self.name is not None:
1034-
return self.name
1035-
else:
1036-
raise ValueError('Axis has no name, so no id')
1032+
raise NotImplementedError('Axis.id is deprecated. Please use Axis.name instead.')
10371033

10381034
def __str__(self) -> str:
10391035
name = str(self.name) if self.name is not None else '{?}'

0 commit comments

Comments
 (0)