diff --git a/amulet_nbt/_compound.pyi b/amulet_nbt/_compound.pyi index 1799fe6d..23071b9e 100644 --- a/amulet_nbt/_compound.pyi +++ b/amulet_nbt/_compound.pyi @@ -1,4 +1,4 @@ -from typing import Any, Dict, Iterable +from typing import Any, Dict, Iterable, Iterator from collections.abc import MutableMapping from ._value import AbstractBaseMutableTag, AbstractBaseTag @@ -52,3 +52,8 @@ class CompoundTag(AbstractBaseMutableTag, MutableMapping[str, AnyNBT]): def setdefault_long_array( self, key: str, default: LongArrayTag = None ) -> LongArrayTag: ... + def __getitem__(self, item: str) -> AnyNBT: ... + def __setitem__(self, key: str, value: AnyNBT) -> None: ... + def __delitem__(self, item: str) -> None: ... + def __iter__(self) -> Iterator[str]: ... + def __len__(self) -> int: ... diff --git a/amulet_nbt/_list.pyi b/amulet_nbt/_list.pyi index 6a098d32..8dd627bb 100644 --- a/amulet_nbt/_list.pyi +++ b/amulet_nbt/_list.pyi @@ -1,4 +1,4 @@ -from typing import Iterable, overload, List, TypeVar +from typing import Iterable, overload, List, TypeVar, overload from collections.abc import MutableSequence from ._value import AbstractBaseMutableTag @@ -33,3 +33,8 @@ class ListTag(AbstractBaseMutableTag, MutableSequence[AnyNBTT]): def get_byte_array(self, index: int) -> ByteArrayTag: ... def get_int_array(self, index: int) -> IntArrayTag: ... def get_long_array(self, index: int) -> LongArrayTag: ... + def __getitem__(self, item: int) -> AnyNBTT: ... + def __setitem__(self, key: int, value: AnyNBTT) -> None: ... + def __delitem__(self, key: int) -> None: ... + def __len__(self) -> int: ... + def insert(self, index: int, item: AnyNBTT) -> None: ...