Skip to content

Commit

Permalink
Added missing type hints
Browse files Browse the repository at this point in the history
  • Loading branch information
gentlegiantJGC committed Nov 12, 2023
1 parent 7790ed0 commit fa4849f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
8 changes: 7 additions & 1 deletion amulet_nbt/_compound.pyi
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -52,3 +52,9 @@ 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:...
7 changes: 6 additions & 1 deletion amulet_nbt/_list.pyi
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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:...

0 comments on commit fa4849f

Please sign in to comment.