Skip to content

Commit 6a0c753

Browse files
committed
add UnityPyBoost type stubs
1 parent 42e1320 commit 6a0c753

File tree

2 files changed

+38
-0
lines changed

2 files changed

+38
-0
lines changed

UnityPy/UnityPyBoost.pyi

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
from __future__ import annotations
2+
from typing import Union, TYPE_CHECKING, Literal, Optional, List, Any
3+
4+
if TYPE_CHECKING:
5+
from .files.SerializedFile import SerializedFile
6+
from .classes import Object
7+
8+
def unpack_vertexdata(
9+
data: Union[bytes, bytearray],
10+
vertex_count: int,
11+
stream_offset: int,
12+
stream_stride: int,
13+
channel_offset: int,
14+
channel_dimension: int,
15+
swap: bool,
16+
) -> bytes: ...
17+
def read_typetree(
18+
data: Union[bytes, bytearray],
19+
node: TypeTreeNode,
20+
endian: Literal["<", ">"],
21+
as_dict: bool,
22+
assetsfile: SerializedFile,
23+
classes: dict,
24+
) -> Union[dict[str, Any], Object]: ...
25+
26+
class TypeTreeNode:
27+
m_Level: int
28+
m_Type: str
29+
m_Name: str
30+
m_ByteSize: int
31+
m_Version: int
32+
m_Children: List[TypeTreeNode]
33+
m_TypeFlags: Optional[int] = None
34+
m_VariableCount: Optional[int] = None
35+
m_Index: Optional[int] = None
36+
m_MetaFlag: Optional[int] = None
37+
m_RefTypeHash: Optional[int] = None
38+
_clean_name: str

UnityPy/py.typed

Whitespace-only changes.

0 commit comments

Comments
 (0)