22
33import re
44from contextlib import ContextDecorator
5- from typing import TYPE_CHECKING , Literal , Self
5+ from typing import Literal , Self
66from urllib .parse import urljoin , urlparse
77
88from beartype import BeartypeConf , beartype
2222from .mock_web_query_api import MockVuforiaWebQueryAPI
2323from .mock_web_services_api import MockVuforiaWebServicesAPI
2424
25- if TYPE_CHECKING :
26- from collections .abc import Iterable
27-
2825_STRUCTURAL_SIMILARITY_MATCHER = StructuralSimilarityMatcher ()
2926_BRISQUE_TRACKING_RATER = BrisqueTargetTrackingRater ()
3027
@@ -130,19 +127,13 @@ def __enter__(self) -> Self:
130127 Returns:
131128 ``self``.
132129 """
133- compiled_url_patterns : Iterable [re .Pattern [str ]] = set ()
134-
135130 mock = RequestsMock (assert_all_requests_are_fired = False )
136131 for vws_route in self ._mock_vws_api .routes :
137132 url_pattern = urljoin (
138133 base = self ._base_vws_url ,
139134 url = f"{ vws_route .path_pattern } $" ,
140135 )
141136 compiled_url_pattern = re .compile (pattern = url_pattern )
142- compiled_url_patterns = {
143- * compiled_url_patterns ,
144- compiled_url_pattern ,
145- }
146137
147138 for vws_http_method in vws_route .http_methods :
148139 mock .add_callback (
@@ -158,10 +149,6 @@ def __enter__(self) -> Self:
158149 url = f"{ vwq_route .path_pattern } $" ,
159150 )
160151 compiled_url_pattern = re .compile (pattern = url_pattern )
161- compiled_url_patterns = {
162- * compiled_url_patterns ,
163- compiled_url_pattern ,
164- }
165152
166153 for vwq_http_method in vwq_route .http_methods :
167154 mock .add_callback (
0 commit comments