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 None type hints #65

Merged
merged 1 commit into from
Mar 13, 2024
Merged
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
18 changes: 9 additions & 9 deletions src/amulet_nbt/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ class AbstractBaseTag(AbstractBase):
def to_nbt(
self,
*,
preset: EncodingPreset = None,
preset: EncodingPreset | None = None,
compressed: bool = True,
little_endian: bool = False,
string_encoding: StringEncoding = mutf8_encoding,
Expand All @@ -146,7 +146,7 @@ class AbstractBaseTag(AbstractBase):
self,
filepath_or_buffer: bytes | str | BinaryIO | memoryview | None = None,
*,
preset: EncodingPreset = None,
preset: EncodingPreset | None = None,
compressed: bool = True,
little_endian: bool = False,
string_encoding: StringEncoding = mutf8_encoding,
Expand Down Expand Up @@ -926,7 +926,7 @@ TAG_Int_Array = IntArrayTag
TAG_Long_Array = LongArrayTag

class NamedTag(AbstractBase):
def __init__(self, tag: AnyNBT = None, name: str | bytes = "") -> None: ...
def __init__(self, tag: AnyNBT | None = None, name: str | bytes = "") -> None: ...
@property
def tag(self) -> AnyNBT: ...
@tag.setter
Expand All @@ -938,7 +938,7 @@ class NamedTag(AbstractBase):
def to_nbt(
self,
*,
preset: EncodingPreset = None,
preset: EncodingPreset | None = None,
compressed: bool = True,
little_endian: bool = False,
string_encoding: StringEncoding = mutf8_encoding,
Expand All @@ -956,7 +956,7 @@ class NamedTag(AbstractBase):
self,
filepath_or_buffer: bytes | str | BinaryIO | memoryview | None = None,
*,
preset: EncodingPreset = None,
preset: EncodingPreset | None = None,
compressed: bool = True,
little_endian: bool = False,
string_encoding: StringEncoding = mutf8_encoding,
Expand Down Expand Up @@ -1016,11 +1016,11 @@ class ReadOffset:
def load(
filepath_or_buffer: str | bytes | BinaryIO | memoryview | None,
*,
preset: EncodingPreset = None,
preset: EncodingPreset | None = None,
compressed: bool = True,
little_endian: bool = False,
string_encoding: StringEncoding = mutf8_encoding,
read_offset: ReadOffset = None,
read_offset: ReadOffset | None = None,
) -> NamedTag:
"""Load one binary NBT object.

Expand All @@ -1037,11 +1037,11 @@ def load_array(
filepath_or_buffer: str | bytes | BinaryIO | memoryview | None,
*,
count: int = 1,
preset: EncodingPreset = None,
preset: EncodingPreset | None = None,
compressed: bool = True,
little_endian: bool = False,
string_encoding: StringEncoding = mutf8_encoding,
read_offset: ReadOffset = None,
read_offset: ReadOffset | None = None,
) -> list[NamedTag]:
"""Load an array of binary NBT objects from a contiguous buffer.

Expand Down
Loading