Skip to content

Commit

Permalink
rd
Browse files Browse the repository at this point in the history
  • Loading branch information
unkcpz committed Nov 23, 2024
1 parent ac5473e commit 59112fd
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/aiida/orm/nodes/data/list.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
"""`Data` sub class to represent a list."""

from collections.abc import MutableSequence
from typing import Any

from .base import to_aiida_type
from .data import Data
Expand Down Expand Up @@ -82,15 +81,15 @@ def remove(self, value):
self.set_list(data)
return item

def pop(self, index: int = -1) -> Any:
def pop(self, **kwargs): # type: ignore[override]
"""Remove and return item at index (default last)."""
data = self.get_list()
item = data.pop(index)
item = data.pop(**kwargs)
if not self._using_list_reference():
self.set_list(data)
return item

def index(self, value: Any, start: int = 0, stop: int = 0) -> int:
def index(self, value): # type: ignore[override]
"""Return first index of value.."""
return self.get_list().index(value)

Expand Down

0 comments on commit 59112fd

Please sign in to comment.