File tree Expand file tree Collapse file tree 2 files changed +2
-6
lines changed
src/mock_vws/_requests_mock_server Expand file tree Collapse file tree 2 files changed +2
-6
lines changed Original file line number Diff line number Diff line change 7
7
import email .utils
8
8
from collections .abc import Callable , Iterable , Mapping
9
9
from http import HTTPMethod , HTTPStatus
10
- from types import MethodType
11
10
12
11
from beartype import beartype
13
12
from requests .models import PreparedRequest
@@ -53,9 +52,8 @@ def decorator(
53
52
The given `method` with multiple changes, including added
54
53
validators.
55
54
"""
56
- route_name = method .__name__ if isinstance (method , MethodType ) else ""
57
55
new_route = Route (
58
- route_name = route_name ,
56
+ route_name = method . __name__ ,
59
57
path_pattern = path_pattern ,
60
58
http_methods = frozenset (http_methods ),
61
59
)
Original file line number Diff line number Diff line change 12
12
import uuid
13
13
from collections .abc import Callable , Iterable , Mapping
14
14
from http import HTTPMethod , HTTPStatus
15
- from types import MethodType
16
15
from typing import Any
17
16
from zoneinfo import ZoneInfo
18
17
@@ -68,9 +67,8 @@ def decorator(
68
67
The given `method` with multiple changes, including added
69
68
validators.
70
69
"""
71
- route_name = method .__name__ if isinstance (method , MethodType ) else ""
72
70
new_route = Route (
73
- route_name = route_name ,
71
+ route_name = method . __name__ ,
74
72
path_pattern = path_pattern ,
75
73
http_methods = frozenset (http_methods ),
76
74
)
You can’t perform that action at this time.
0 commit comments