File tree Expand file tree Collapse file tree 6 files changed +10
-11
lines changed Expand file tree Collapse file tree 6 files changed +10
-11
lines changed Original file line number Diff line number Diff line change @@ -136,7 +136,7 @@ VWS container
136
136
137
137
The number of seconds to process each image for.
138
138
139
- Default: ``2 ``
139
+ Default: ``2.0 ``
140
140
141
141
.. envvar :: DUPLICATES_IMAGE_MATCHER
142
142
Original file line number Diff line number Diff line change 12
12
import uuid
13
13
from enum import StrEnum , auto
14
14
from http import HTTPMethod , HTTPStatus
15
- from typing import SupportsFloat
16
15
17
16
import requests
18
17
from flask import Flask , Response , request
@@ -67,7 +66,7 @@ class VWSSettings(BaseSettings):
67
66
"""Settings for the VWS Flask app."""
68
67
69
68
target_manager_base_url : str
70
- processing_time_seconds : SupportsFloat = 2
69
+ processing_time_seconds : float = 2.0
71
70
vws_host : str = ""
72
71
duplicates_image_matcher : _ImageMatcherChoice = (
73
72
_ImageMatcherChoice .STRUCTURAL_SIMILARITY
Original file line number Diff line number Diff line change 4
4
5
5
import re
6
6
from contextlib import ContextDecorator
7
- from typing import Literal , Self , SupportsFloat
7
+ from typing import Literal , Self
8
8
from urllib .parse import urljoin , urlparse
9
9
10
10
import requests
@@ -39,7 +39,7 @@ def __init__(
39
39
base_vwq_url : str = "https://cloudreco.vuforia.com" ,
40
40
duplicate_match_checker : ImageMatcher = _STRUCTURAL_SIMILARITY_MATCHER ,
41
41
query_match_checker : ImageMatcher = _STRUCTURAL_SIMILARITY_MATCHER ,
42
- processing_time_seconds : SupportsFloat = 2 ,
42
+ processing_time_seconds : float = 2.0 ,
43
43
target_tracking_rater : TargetTrackingRater = _BRISQUE_TRACKING_RATER ,
44
44
* ,
45
45
real_http : bool = False ,
Original file line number Diff line number Diff line change 12
12
import uuid
13
13
from collections .abc import Callable
14
14
from http import HTTPMethod , HTTPStatus
15
- from typing import TYPE_CHECKING , SupportsFloat
15
+ from typing import TYPE_CHECKING
16
16
from zoneinfo import ZoneInfo
17
17
18
18
from mock_vws ._constants import ResultCodes , TargetStatuses
@@ -103,7 +103,7 @@ def __init__(
103
103
self ,
104
104
* ,
105
105
target_manager : TargetManager ,
106
- processing_time_seconds : SupportsFloat ,
106
+ processing_time_seconds : float ,
107
107
duplicate_match_checker : ImageMatcher ,
108
108
target_tracking_rater : TargetTrackingRater ,
109
109
) -> None :
Original file line number Diff line number Diff line change 8
8
import statistics
9
9
import uuid
10
10
from dataclasses import dataclass , field
11
- from typing import Self , SupportsFloat , TypedDict
11
+ from typing import Self , TypedDict
12
12
from zoneinfo import ZoneInfo
13
13
14
14
from PIL import Image , ImageStat
@@ -29,7 +29,7 @@ class TargetDict(TypedDict):
29
29
width : float
30
30
image_base64 : str
31
31
active_flag : bool
32
- processing_time_seconds : SupportsFloat
32
+ processing_time_seconds : float
33
33
application_metadata : str | None
34
34
target_id : str
35
35
last_modified_date : str
@@ -64,7 +64,7 @@ class Target:
64
64
application_metadata : str | None
65
65
image_value : bytes
66
66
name : str
67
- processing_time_seconds : SupportsFloat
67
+ processing_time_seconds : float
68
68
width : float
69
69
target_tracking_rater : TargetTrackingRater = field (compare = False )
70
70
current_month_recos : int = 0
Original file line number Diff line number Diff line change @@ -89,7 +89,7 @@ def test_custom(
89
89
"""
90
90
It is possible to set a custom processing time.
91
91
"""
92
- seconds = 5
92
+ seconds = 5.0
93
93
monkeypatch .setenv (
94
94
name = "PROCESSING_TIME_SECONDS" ,
95
95
value = str (seconds ),
You can’t perform that action at this time.
0 commit comments