summaryrefslogtreecommitdiff
path: root/venv/lib/python3.11/site-packages/litestar/_layers
diff options
context:
space:
mode:
Diffstat (limited to 'venv/lib/python3.11/site-packages/litestar/_layers')
-rw-r--r--venv/lib/python3.11/site-packages/litestar/_layers/__init__.py0
-rw-r--r--venv/lib/python3.11/site-packages/litestar/_layers/__pycache__/__init__.cpython-311.pycbin200 -> 0 bytes
-rw-r--r--venv/lib/python3.11/site-packages/litestar/_layers/__pycache__/utils.cpython-311.pycbin2457 -> 0 bytes
-rw-r--r--venv/lib/python3.11/site-packages/litestar/_layers/utils.py34
4 files changed, 0 insertions, 34 deletions
diff --git a/venv/lib/python3.11/site-packages/litestar/_layers/__init__.py b/venv/lib/python3.11/site-packages/litestar/_layers/__init__.py
deleted file mode 100644
index e69de29..0000000
--- a/venv/lib/python3.11/site-packages/litestar/_layers/__init__.py
+++ /dev/null
diff --git a/venv/lib/python3.11/site-packages/litestar/_layers/__pycache__/__init__.cpython-311.pyc b/venv/lib/python3.11/site-packages/litestar/_layers/__pycache__/__init__.cpython-311.pyc
deleted file mode 100644
index 7b7425e..0000000
--- a/venv/lib/python3.11/site-packages/litestar/_layers/__pycache__/__init__.cpython-311.pyc
+++ /dev/null
Binary files differ
diff --git a/venv/lib/python3.11/site-packages/litestar/_layers/__pycache__/utils.cpython-311.pyc b/venv/lib/python3.11/site-packages/litestar/_layers/__pycache__/utils.cpython-311.pyc
deleted file mode 100644
index d772e10..0000000
--- a/venv/lib/python3.11/site-packages/litestar/_layers/__pycache__/utils.cpython-311.pyc
+++ /dev/null
Binary files differ
diff --git a/venv/lib/python3.11/site-packages/litestar/_layers/utils.py b/venv/lib/python3.11/site-packages/litestar/_layers/utils.py
deleted file mode 100644
index 61afd61..0000000
--- a/venv/lib/python3.11/site-packages/litestar/_layers/utils.py
+++ /dev/null
@@ -1,34 +0,0 @@
-from __future__ import annotations
-
-from typing import TYPE_CHECKING, Mapping, Sequence
-
-from litestar.datastructures.cookie import Cookie
-from litestar.datastructures.response_header import ResponseHeader
-
-__all__ = ("narrow_response_cookies", "narrow_response_headers")
-
-
-if TYPE_CHECKING:
- from litestar.types.composite_types import ResponseCookies, ResponseHeaders
-
-
-def narrow_response_headers(headers: ResponseHeaders | None) -> Sequence[ResponseHeader] | None:
- """Given :class:`.types.ResponseHeaders` as a :class:`typing.Mapping`, create a list of
- :class:`.datastructures.response_header.ResponseHeader` from it, otherwise return ``headers`` unchanged
- """
- return (
- tuple(ResponseHeader(name=name, value=value) for name, value in headers.items())
- if isinstance(headers, Mapping)
- else headers
- )
-
-
-def narrow_response_cookies(cookies: ResponseCookies | None) -> Sequence[Cookie] | None:
- """Given :class:`.types.ResponseCookies` as a :class:`typing.Mapping`, create a list of
- :class:`.datastructures.cookie.Cookie` from it, otherwise return ``cookies`` unchanged
- """
- return (
- tuple(Cookie(key=key, value=value) for key, value in cookies.items())
- if isinstance(cookies, Mapping)
- else cookies
- )