We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d442d98 commit a0323b9Copy full SHA for a0323b9
rest_framework-stubs/exceptions.pyi
@@ -4,6 +4,7 @@ from typing import Any
4
from typing_extensions import TypeAlias
5
6
from django.http import HttpRequest, JsonResponse
7
+from django.utils.functional import _StrPromise
8
from rest_framework.renderers import BaseRenderer
9
from rest_framework.request import Request
10
@@ -15,7 +16,7 @@ class ErrorDetail(str):
15
16
code: str | None
17
def __new__(cls, string: str, code: str | None = ...): ...
18
-_Detail: TypeAlias = str | list[Any] | dict[str, Any]
19
+_Detail: TypeAlias = str | _StrPromise | list[Any] | dict[str, Any]
20
21
class APIException(Exception):
22
status_code: int
0 commit comments