File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed
Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change 33"""
44
55import datetime
6+ import io
67import json
78from http import HTTPMethod , HTTPStatus
8- from io import BufferedRandom , BytesIO
99from typing import Any
1010from urllib .parse import urljoin
1111
2929from vws .reports import QueryResult , TargetData
3030
3131
32- def _get_image_data (image : BytesIO | BufferedRandom ) -> bytes :
32+ def _get_image_data (image : io . BytesIO | io . BufferedRandom ) -> bytes :
3333 """Get the data of an image file."""
3434 original_tell = image .tell ()
3535 image .seek (0 )
@@ -61,7 +61,7 @@ def __init__(
6161
6262 def query (
6363 self ,
64- image : BytesIO | BufferedRandom ,
64+ image : io . BytesIO | io . BufferedRandom ,
6565 max_num_results : int = 1 ,
6666 include_target_data : CloudRecoIncludeTargetData = (
6767 CloudRecoIncludeTargetData .TOP
Original file line number Diff line number Diff line change 88import time
99from datetime import date
1010from http import HTTPMethod , HTTPStatus
11- from io import BufferedRandom , BytesIO
11+ from io import BufferedRandom
1212from urllib .parse import urljoin
1313
1414import requests
4949from .exceptions .response import Response
5050
5151
52- def _get_image_data (image : BytesIO | BufferedRandom ) -> bytes :
52+ def _get_image_data (image : io . BytesIO | BufferedRandom ) -> bytes :
5353 """Get the data of an image file."""
5454 original_tell = image .tell ()
5555 image .seek (0 )
@@ -234,7 +234,7 @@ def add_target(
234234 self ,
235235 name : str ,
236236 width : float ,
237- image : BytesIO | BufferedRandom ,
237+ image : io . BytesIO | io . BufferedRandom ,
238238 application_metadata : str | None ,
239239 * ,
240240 active_flag : bool ,
You can’t perform that action at this time.
0 commit comments