Skip to content

Commit 28fa59b

Browse files
committed
[3.15] Add SimpleRouter use_regex_path argument
1 parent 4fb7adf commit 28fa59b

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

rest_framework-stubs/routers.pyi

Lines changed: 1 addition & 1 deletion
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]: ...

scripts/typecheck_tests.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,6 @@
174174
'Item "URLResolver" of "Union[URLPattern, URLResolver]" has no attribute "name"',
175175
'"None" not callable',
176176
'"BasenameTestCase" has no attribute "router"',
177-
'Unexpected keyword argument "use_regex_path" for "SimpleRouter"',
178177
],
179178
"test_reverse.py": [
180179
'Incompatible types in assignment (expression has type "MockVersioningScheme", variable has type "Optional[BaseVersioning]', # noqa: E501

0 commit comments

Comments
 (0)