Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow user arg in APIClient.force_authenticate to be None #367

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion rest_framework-stubs/test.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,9 @@ class ForceAuthClientHandler(ClientHandler):

class APIClient(APIRequestFactory, DjangoClient):
def credentials(self, **kwargs: Any): ...
def force_authenticate(self, user: AnonymousUser | AbstractBaseUser = ..., token: Token | None = ...) -> None: ...
def force_authenticate(
self, user: AnonymousUser | AbstractBaseUser | None = ..., token: Token | None = ...
) -> None: ...
def request(self, **kwargs: Any) -> _MonkeyPatchedResponse: ... # type: ignore[override]
def get(self, path: str, data: _GetDataType = ..., follow: bool = ..., **extra: Any) -> _MonkeyPatchedResponse: ... # type: ignore[override]
def post(self, path: str, data: Any | None = ..., format: str | None = ..., content_type: str | None = ..., follow: bool = ..., **extra: Any) -> _MonkeyPatchedResponse: ... # type: ignore[override]
Expand Down