Skip to content

Commit 8cf27b7

Browse files
adamtheturtleclaude
andcommitted
Remove unused compiled_url_patterns variable
The variable was accumulated in both route-processing loops but never read, so it served no purpose. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
1 parent c9fd996 commit 8cf27b7

File tree

1 file changed

+1
-14
lines changed

1 file changed

+1
-14
lines changed

src/mock_vws/_requests_mock_server/decorators.py

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import re
44
from contextlib import ContextDecorator
5-
from typing import TYPE_CHECKING, Literal, Self
5+
from typing import Literal, Self
66
from urllib.parse import urljoin, urlparse
77

88
from beartype import BeartypeConf, beartype
@@ -22,9 +22,6 @@
2222
from .mock_web_query_api import MockVuforiaWebQueryAPI
2323
from .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

Comments
 (0)