Skip to content

Commit 70368d7

Browse files
committed
No ty errors on src/
1 parent 3854a2f commit 70368d7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/mock_vws/_requests_mock_server/mock_web_services_api.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
import uuid
1313
from collections.abc import Callable, Iterable, Mapping
1414
from http import HTTPMethod, HTTPStatus
15+
from types import MethodType
1516
from typing import Any
1617
from zoneinfo import ZoneInfo
1718

@@ -67,8 +68,9 @@ def decorator(
6768
The given `method` with multiple changes, including added
6869
validators.
6970
"""
71+
route_name = method.__name__ if isinstance(method, MethodType) else ""
7072
new_route = Route(
71-
route_name=method.__name__,
73+
route_name=route_name,
7274
path_pattern=path_pattern,
7375
http_methods=frozenset(http_methods),
7476
)

0 commit comments

Comments
 (0)