Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added missing type hints #55

Merged
merged 2 commits into from
Nov 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 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,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: ...
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: ...