Browse Source

Replace `dict` by `Mapping` on `HTTPException.headers` (#12997)

Co-authored-by: Alejandra <[email protected]>
Co-authored-by: Motov Yurii <[email protected]>
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
pull/14884/head
rijenkii 4 months ago
committed by GitHub
parent
commit
66dc695071
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 4
      fastapi/exceptions.py

4
fastapi/exceptions.py

@ -1,4 +1,4 @@
from collections.abc import Sequence
from collections.abc import Mapping, Sequence
from typing import Annotated, Any, Optional, TypedDict, Union
from annotated_doc import Doc
@ -68,7 +68,7 @@ class HTTPException(StarletteHTTPException):
),
] = None,
headers: Annotated[
Optional[dict[str, str]],
Optional[Mapping[str, str]],
Doc(
"""
Any headers to send to the client in the response.

Loading…
Cancel
Save