Skip to content

Commit 440b003

Browse files
isHarryhK0lb3
authored andcommitted
fix: incorrect type hint in Texture2DConverter
1 parent 8a1f527 commit 440b003

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

UnityPy/export/Texture2DConverter.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ def image_to_texture2d(
7676
)
7777

7878
config = astc_encoder.ASTCConfig(
79-
astc_encoder.ASTCProfile.LDR, *block_size, 1, 100
79+
astc_encoder.ASTCProfile.LDR, *block_size, block_z=1, quality=100
8080
)
8181
context = astc_encoder.ASTCContext(config)
8282
raw_img = astc_encoder.ASTCImage(
@@ -166,7 +166,7 @@ def parse_image_data(
166166
texture_format: Union[int, TextureFormat],
167167
version: tuple,
168168
platform: int,
169-
platform_blob: bytes = None,
169+
platform_blob: Union[bytes, None] = None,
170170
flip: bool = True,
171171
) -> Image.Image:
172172
image_data = copy(bytes(image_data))
@@ -230,7 +230,7 @@ def pillow(
230230
mode: str,
231231
codec: str,
232232
args,
233-
swap: tuple = None,
233+
swap: Union[tuple, None] = None,
234234
) -> Image.Image:
235235
img = (
236236
Image.frombytes(mode, (width, height), image_data, codec, args)
@@ -327,7 +327,7 @@ def half(
327327
mode: str,
328328
codec: str,
329329
args,
330-
swap: tuple = None,
330+
swap: Union[tuple, None] = None,
331331
) -> Image.Image:
332332
# convert half-float to int8
333333
stream = BytesIO(image_data)

0 commit comments

Comments
 (0)