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
136136
137137 The number of seconds to process each image for.
138138
139- Default: ``2 ``
139+ Default: ``2.0 ``
140140
141141.. envvar :: DUPLICATES_IMAGE_MATCHER
142142
Original file line number Diff line number Diff line change 1212import uuid
1313from enum import StrEnum , auto
1414from http import HTTPMethod , HTTPStatus
15- from typing import SupportsFloat
1615
1716import requests
1817from flask import Flask , Response , request
@@ -67,7 +66,7 @@ class VWSSettings(BaseSettings):
6766 """Settings for the VWS Flask app."""
6867
6968 target_manager_base_url : str
70- processing_time_seconds : SupportsFloat = 2
69+ processing_time_seconds : float = 2.0
7170 vws_host : str = ""
7271 duplicates_image_matcher : _ImageMatcherChoice = (
7372 _ImageMatcherChoice .STRUCTURAL_SIMILARITY
Original file line number Diff line number Diff line change 44
55import re
66from contextlib import ContextDecorator
7- from typing import Literal , Self , SupportsFloat
7+ from typing import Literal , Self
88from urllib .parse import urljoin , urlparse
99
1010import requests
@@ -39,7 +39,7 @@ def __init__(
3939 base_vwq_url : str = "https://cloudreco.vuforia.com" ,
4040 duplicate_match_checker : ImageMatcher = _STRUCTURAL_SIMILARITY_MATCHER ,
4141 query_match_checker : ImageMatcher = _STRUCTURAL_SIMILARITY_MATCHER ,
42- processing_time_seconds : SupportsFloat = 2 ,
42+ processing_time_seconds : float = 2.0 ,
4343 target_tracking_rater : TargetTrackingRater = _BRISQUE_TRACKING_RATER ,
4444 * ,
4545 real_http : bool = False ,
Original file line number Diff line number Diff line change 1313import uuid
1414from collections .abc import Callable
1515from http import HTTPMethod , HTTPStatus
16- from typing import Any , SupportsFloat
16+ from typing import Any
1717from zoneinfo import ZoneInfo
1818
1919from requests .models import PreparedRequest
@@ -101,7 +101,7 @@ def __init__(
101101 self ,
102102 * ,
103103 target_manager : TargetManager ,
104- processing_time_seconds : SupportsFloat ,
104+ processing_time_seconds : float ,
105105 duplicate_match_checker : ImageMatcher ,
106106 target_tracking_rater : TargetTrackingRater ,
107107 ) -> None :
Original file line number Diff line number Diff line change 88import statistics
99import uuid
1010from dataclasses import dataclass , field
11- from typing import Self , SupportsFloat , TypedDict
11+ from typing import Self , TypedDict
1212from zoneinfo import ZoneInfo
1313
1414from PIL import Image , ImageStat
@@ -29,7 +29,7 @@ class TargetDict(TypedDict):
2929 width : float
3030 image_base64 : str
3131 active_flag : bool
32- processing_time_seconds : SupportsFloat
32+ processing_time_seconds : float
3333 application_metadata : str | None
3434 target_id : str
3535 last_modified_date : str
@@ -64,7 +64,7 @@ class Target:
6464 application_metadata : str | None
6565 image_value : bytes
6666 name : str
67- processing_time_seconds : SupportsFloat
67+ processing_time_seconds : float
6868 width : float
6969 target_tracking_rater : TargetTrackingRater = field (compare = False )
7070 current_month_recos : int = 0
Original file line number Diff line number Diff line change @@ -90,7 +90,7 @@ def test_custom(
9090 """
9191 It is possible to set a custom processing time.
9292 """
93- seconds = 5
93+ seconds = 5.0
9494 monkeypatch .setenv (
9595 name = "PROCESSING_TIME_SECONDS" ,
9696 value = str (seconds ),
You can’t perform that action at this time.
0 commit comments