Skip to content

Commit

Permalink
[3.15] Add SimpleRouter use_regex_path argument
Browse files Browse the repository at this point in the history
  • Loading branch information
intgr committed Feb 7, 2023
1 parent 4fb7adf commit 28fa59b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion rest_framework-stubs/routers.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class BaseRouter(metaclass=RenameRouterMethods):
class SimpleRouter(BaseRouter):
routes: list[Route | DynamicRoute]
trailing_slash: str
def __init__(self, trailing_slash: bool = ...) -> None: ...
def __init__(self, trailing_slash: bool = ..., use_regex_path: bool = ...) -> None: ...
def get_routes(self, viewset: type[ViewSetMixin]) -> list[Route]: ...
def _get_dynamic_route(self, route: DynamicRoute, action: Any) -> Route: ...
def get_method_map(self, viewset: type[ViewSetMixin], method_map: Mapping[str, str]) -> dict[str, str]: ...
Expand Down
1 change: 0 additions & 1 deletion scripts/typecheck_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,6 @@
'Item "URLResolver" of "Union[URLPattern, URLResolver]" has no attribute "name"',
'"None" not callable',
'"BasenameTestCase" has no attribute "router"',
'Unexpected keyword argument "use_regex_path" for "SimpleRouter"',
],
"test_reverse.py": [
'Incompatible types in assignment (expression has type "MockVersioningScheme", variable has type "Optional[BaseVersioning]', # noqa: E501
Expand Down

0 comments on commit 28fa59b

Please sign in to comment.