From 3854a2f056b8c5cd7615b264e4ed9d063432bc0a Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Fri, 18 Jul 2025 16:57:32 +0100 Subject: [PATCH 1/4] Avoid ty error on method name --- src/mock_vws/_requests_mock_server/mock_web_query_api.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/mock_vws/_requests_mock_server/mock_web_query_api.py b/src/mock_vws/_requests_mock_server/mock_web_query_api.py index f22cd9c69..26c2442c4 100644 --- a/src/mock_vws/_requests_mock_server/mock_web_query_api.py +++ b/src/mock_vws/_requests_mock_server/mock_web_query_api.py @@ -7,6 +7,7 @@ import email.utils from collections.abc import Callable, Iterable, Mapping from http import HTTPMethod, HTTPStatus +from types import MethodType from beartype import beartype from requests.models import PreparedRequest @@ -52,8 +53,9 @@ def decorator( The given `method` with multiple changes, including added validators. """ + route_name = method.__name__ if isinstance(method, MethodType) else "" new_route = Route( - route_name=method.__name__, + route_name=route_name, path_pattern=path_pattern, http_methods=frozenset(http_methods), ) From 70368d762650288cfed6b8fef5bd94e64de03e48 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Fri, 18 Jul 2025 17:01:12 +0100 Subject: [PATCH 2/4] No ty errors on src/ --- src/mock_vws/_requests_mock_server/mock_web_services_api.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/mock_vws/_requests_mock_server/mock_web_services_api.py b/src/mock_vws/_requests_mock_server/mock_web_services_api.py index 9a6b30a8d..96e996f70 100644 --- a/src/mock_vws/_requests_mock_server/mock_web_services_api.py +++ b/src/mock_vws/_requests_mock_server/mock_web_services_api.py @@ -12,6 +12,7 @@ import uuid from collections.abc import Callable, Iterable, Mapping from http import HTTPMethod, HTTPStatus +from types import MethodType from typing import Any from zoneinfo import ZoneInfo @@ -67,8 +68,9 @@ def decorator( The given `method` with multiple changes, including added validators. """ + route_name = method.__name__ if isinstance(method, MethodType) else "" new_route = Route( - route_name=method.__name__, + route_name=route_name, path_pattern=path_pattern, http_methods=frozenset(http_methods), ) From 034b4ac65433ff6814ffb4381ae8aa6c35b48fce Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 24 Aug 2025 17:13:44 +0100 Subject: [PATCH 3/4] Use new way of specifying license --- LICENSE | 19 ------------------- pyproject.toml | 3 +-- 2 files changed, 1 insertion(+), 21 deletions(-) delete mode 100644 LICENSE diff --git a/LICENSE b/LICENSE deleted file mode 100644 index ef26969f8..000000000 --- a/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -The MIT License - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/pyproject.toml b/pyproject.toml index a2a0e2d8a..f9777608c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -16,7 +16,7 @@ keywords = [ "vuforia", "vws", ] -license = { file = "LICENSE" } +license = "MIT" authors = [ { name = "Adam Dangoor", email = "adamdangoor@gmail.com" }, ] @@ -25,7 +25,6 @@ classifiers = [ "Development Status :: 5 - Production/Stable", "Environment :: Web Environment", "Framework :: Pytest", - "License :: OSI Approved :: MIT License", "Operating System :: Microsoft :: Windows", "Operating System :: POSIX", "Programming Language :: Python :: 3 :: Only", From 40c90feea30c23fc2155d8c244c98920d33af81a Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Sun, 24 Aug 2025 17:15:29 +0100 Subject: [PATCH 4/4] Undo unnecessary change --- src/mock_vws/_requests_mock_server/mock_web_query_api.py | 4 +--- src/mock_vws/_requests_mock_server/mock_web_services_api.py | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/mock_vws/_requests_mock_server/mock_web_query_api.py b/src/mock_vws/_requests_mock_server/mock_web_query_api.py index 26c2442c4..f22cd9c69 100644 --- a/src/mock_vws/_requests_mock_server/mock_web_query_api.py +++ b/src/mock_vws/_requests_mock_server/mock_web_query_api.py @@ -7,7 +7,6 @@ import email.utils from collections.abc import Callable, Iterable, Mapping from http import HTTPMethod, HTTPStatus -from types import MethodType from beartype import beartype from requests.models import PreparedRequest @@ -53,9 +52,8 @@ def decorator( The given `method` with multiple changes, including added validators. """ - route_name = method.__name__ if isinstance(method, MethodType) else "" new_route = Route( - route_name=route_name, + route_name=method.__name__, path_pattern=path_pattern, http_methods=frozenset(http_methods), ) diff --git a/src/mock_vws/_requests_mock_server/mock_web_services_api.py b/src/mock_vws/_requests_mock_server/mock_web_services_api.py index 96e996f70..9a6b30a8d 100644 --- a/src/mock_vws/_requests_mock_server/mock_web_services_api.py +++ b/src/mock_vws/_requests_mock_server/mock_web_services_api.py @@ -12,7 +12,6 @@ import uuid from collections.abc import Callable, Iterable, Mapping from http import HTTPMethod, HTTPStatus -from types import MethodType from typing import Any from zoneinfo import ZoneInfo @@ -68,9 +67,8 @@ def decorator( The given `method` with multiple changes, including added validators. """ - route_name = method.__name__ if isinstance(method, MethodType) else "" new_route = Route( - route_name=route_name, + route_name=method.__name__, path_pattern=path_pattern, http_methods=frozenset(http_methods), )