Skip to content

Commit 96fed54

Browse files
AlwxSinsobolevn
authored andcommitted
add list type for Exception.details (#57)
closes #56
1 parent ed6939f commit 96fed54

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

rest_framework-stubs/exceptions.pyi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from typing import Any, Union, Dict, Optional, Sequence
1+
from typing import Any, Union, List, Dict, Optional, Sequence
22

33
from django.http import JsonResponse, HttpRequest
44
from rest_framework.renderers import BaseRenderer
@@ -11,7 +11,7 @@ class ErrorDetail(str):
1111
code: Optional[str] = None
1212
def __new__(cls, string: str, code: Optional[str] = ...): ...
1313

14-
_Detail = Union[str, Dict[str, Any]]
14+
_Detail = Union[str, List[Any], Dict[str, Any]]
1515

1616
class APIException(Exception):
1717
status_code: int = ...

0 commit comments

Comments
 (0)