Skip to content

Commit

Permalink
Fix APIRequestFactory method signatures (#634)
Browse files Browse the repository at this point in the history
  • Loading branch information
DongwookKim0823 authored Jul 3, 2024
1 parent cce59b5 commit 2c27b50
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
12 changes: 6 additions & 6 deletions rest_framework-stubs/test.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,12 @@ class APIRequestFactory(DjangoRequestFactory):
renderer_classes: Any
def __init__(self, enforce_csrf_checks: bool = ..., **defaults: Any) -> None: ...
def request(self, **kwargs: Any) -> Request: ... # type: ignore[override]
def get(self, path: str, data: _GetDataType = ..., follow: bool = ..., **extra: Any) -> Request: ... # type: ignore[override]
def post(self, path: str, data: Any | None = ..., format: str | None = ..., content_type: str | None = ..., follow: bool = ..., **extra: Any) -> Request: ... # type: ignore[override]
def put(self, path: str, data: Any | None = ..., format: str | None = ..., content_type: str | None = ..., follow: bool = ..., **extra: Any) -> Request: ... # type: ignore[override]
def patch(self, path: str, data: Any | None = ..., format: str | None = ..., content_type: str | None = ..., follow: bool = ..., **extra: Any) -> Request: ... # type: ignore[override]
def delete(self, path: str, data: Any | None = ..., format: str | None = ..., content_type: str | None = ..., follow: bool = ..., **extra: Any) -> Request: ... # type: ignore[override]
def options(self, path: str, data: dict[str, str] | str = ..., format: str | None = ..., content_type: Any | None = ..., follow: bool = ..., **extra: Any) -> Request: ... # type: ignore[override]
def get(self, path: str, data: _GetDataType = ..., **extra: Any) -> Request: ... # type: ignore[override]
def post(self, path: str, data: Any | None = ..., format: str | None = ..., content_type: str | None = ..., **extra: Any) -> Request: ... # type: ignore[override]
def put(self, path: str, data: Any | None = ..., format: str | None = ..., content_type: str | None = ..., **extra: Any) -> Request: ... # type: ignore[override]
def patch(self, path: str, data: Any | None = ..., format: str | None = ..., content_type: str | None = ..., **extra: Any) -> Request: ... # type: ignore[override]
def delete(self, path: str, data: Any | None = ..., format: str | None = ..., content_type: str | None = ..., **extra: Any) -> Request: ... # type: ignore[override]
def options(self, path: str, data: dict[str, str] | str | None = ..., format: str | None = ..., content_type: Any | None = ..., **extra: Any) -> Request: ... # type: ignore[override]
def generic( # type: ignore[override]
self, method: str, path: str, data: str = ..., content_type: str = ..., secure: bool = ..., **extra: Any
) -> Request: ...
Expand Down
6 changes: 0 additions & 6 deletions scripts/stubtest/allowlist_todo.txt
Original file line number Diff line number Diff line change
Expand Up @@ -103,12 +103,6 @@ rest_framework.settings.DefaultsSettings
rest_framework.settings.api_settings
rest_framework.templatetags.rest_framework.urlize_quoted_links
rest_framework.test.APIClient.options
rest_framework.test.APIRequestFactory.delete
rest_framework.test.APIRequestFactory.get
rest_framework.test.APIRequestFactory.options
rest_framework.test.APIRequestFactory.patch
rest_framework.test.APIRequestFactory.post
rest_framework.test.APIRequestFactory.put
rest_framework.test.RequestsClient.__init__
rest_framework.throttling.SimpleRateThrottle.cache
rest_framework.utils.encoders.JSONEncoder.default
Expand Down

0 comments on commit 2c27b50

Please sign in to comment.