Coverage for faststream/_internal/constants.py: 93%
15 statements
« prev ^ index » next coverage.py v7.17.3, created at 2026-11-17 21:20 +0000
« prev ^ index » next coverage.py v7.17.3, created at 2026-11-17 21:20 +0000
1from enum import Enum
2from typing import Any
4ContentType = str
7class ContentTypes(str, Enum):
8 """A class to represent content types."""
10 TEXT = "text/plain"
11 JSON = "application/json"
14class EmptyPlaceholder:
15 __slots__ = ()
17 def __repr__(self) -> str:
18 return "EMPTY"
20 def __bool__(self) -> bool:
21 return False
23 def __eq__(self, other: object) -> bool:
24 return isinstance(other, EmptyPlaceholder)
26 def __hash__(self) -> int:
27 return hash(EmptyPlaceholder)
30EMPTY: Any = EmptyPlaceholder()
32PATH_CONTEXT_PREFIX = "message.path."
33"""Where a `Path()` parameter reads from: the Path parameters an Address captured."""