Skip to content

Commit b121578

Browse files
fix: update type for image translation.
1 parent 33c895e commit b121578

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

jigsawstack/translate.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,17 +146,17 @@ async def text(self, params: TranslateParams) -> TranslateResponse:
146146
return resp
147147

148148
@overload
149-
async def image(self, params: TranslateImageParams) -> TranslateImageResponse: ...
149+
async def image(self, params: TranslateImageParams) -> Union[TranslateImageResponse, bytes]: ...
150150
@overload
151151
async def image(
152152
self, blob: bytes, options: TranslateImageParams = None
153-
) -> TranslateImageParams: ...
153+
) -> Union[TranslateImageResponse, bytes]: ...
154154

155155
async def image(
156156
self,
157157
blob: Union[TranslateImageParams, bytes],
158158
options: TranslateImageParams = None,
159-
) -> TranslateImageResponse:
159+
) -> Union[TranslateImageResponse, bytes]:
160160
if isinstance(blob, dict):
161161
resp = await AsyncRequest(
162162
config=self.config,

0 commit comments

Comments
 (0)