Skip to content

Commit

Permalink
fix: πŸš‘ invalid exc_response return type hint
Browse files Browse the repository at this point in the history
  • Loading branch information
lucas-labs committed Jan 26, 2024
1 parent 8079101 commit b6c100a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions pest/exceptions/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
UnauthorizedException,
UnprocessableEntityException,
UnsupportedMediaTypeException,
exc_response,
)

__all__ = [
Expand Down Expand Up @@ -50,4 +51,5 @@
'GatewayTimeoutException',
'HttpVersionNotSupportedException',
'PestException',
'exc_response',
]
2 changes: 1 addition & 1 deletion pest/exceptions/http/http.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def example(code: int) -> 'ExceptionResponse':
)


def exc_response(*codes: int) -> Dict[int, Dict[str, Any]]:
def exc_response(*codes: int) -> Dict[Union[int, str], Dict[str, Any]]:
"""πŸ€ ⇝ Generate a dict of error responses for the given status codes for use in OpenAPI docs"""

responses = {}
Expand Down

0 comments on commit b6c100a

Please sign in to comment.