Skip to content

Commit 159c159

Browse files
committed
[3.15] Add SimpleRouter use_regex_path argument
1 parent 21818bc commit 159c159

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

Diff for: rest_framework-stubs/routers.pyi

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class BaseRouter(metaclass=RenameRouterMethods):
4343
class SimpleRouter(BaseRouter):
4444
routes: list[Route | DynamicRoute]
4545
trailing_slash: str
46-
def __init__(self, trailing_slash: bool = ...) -> None: ...
46+
def __init__(self, trailing_slash: bool = ..., use_regex_path: bool = ...) -> None: ...
4747
def get_routes(self, viewset: type[ViewSetMixin]) -> list[Route]: ...
4848
def _get_dynamic_route(self, route: DynamicRoute, action: Any) -> Route: ...
4949
def get_method_map(self, viewset: type[ViewSetMixin], method_map: Mapping[str, str]) -> dict[str, str]: ...

Diff for: scripts/typecheck_tests.py

-1
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,6 @@
185185
'Item "URLResolver" of "Union[URLPattern, URLResolver]" has no attribute "name"',
186186
'"None" not callable',
187187
'"BasenameTestCase" has no attribute "router"',
188-
'Unexpected keyword argument "use_regex_path" for "SimpleRouter"',
189188
],
190189
"test_serializer.py": [
191190
"base class",

0 commit comments

Comments
 (0)