Skip to content

Commit

Permalink
Allow user arg in APIClient.force_authenticate to be None (#367)
Browse files Browse the repository at this point in the history
* Allow user arg in `APIClient.force_authenticate` to be `None`

* [pre-commit.ci] auto fixes from pre-commit.com hooks

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
joshuadavidthomas and pre-commit-ci[bot] authored Feb 24, 2023
1 parent 919b125 commit ce22166
Showing 1 changed file with 3 additions and 1 deletion.
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

0 comments on commit ce22166

Please sign in to comment.