diff --git a/rest_framework-stubs/test.pyi b/rest_framework-stubs/test.pyi index 62cc38b3d..b5dca1581 100644 --- a/rest_framework-stubs/test.pyi +++ b/rest_framework-stubs/test.pyi @@ -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]