We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a0ab8f5 commit b642829Copy full SHA for b642829
astc_encoder/pil_codec.py
@@ -4,7 +4,7 @@
4
"""
5
6
import struct
7
-from typing import Any, List
+from typing import Any, List, Union
8
9
from PIL import Image, ImageFile
10
@@ -100,7 +100,9 @@ def init(self, args: List[Any]): # noqa: D102
100
)
101
self.context = ASTCContext(config)
102
103
- def decode(self, buffer: bytes | Image.SupportsArrayInterface) -> tuple[int, int]: # noqa: D102
+ def decode(
104
+ self, buffer: Union[bytes, Image.SupportsArrayInterface]
105
+ ) -> tuple[int, int]: # noqa: D102
106
assert self.state.xoff == 0 and self.state.yoff == 0, "Cannot handle offsets"
107
108
config = self.context.config
0 commit comments