(value: t.Any)
| 593 | |
| 594 | |
| 595 | def _str_header_value(value: t.Any) -> str: |
| 596 | if not isinstance(value, str): |
| 597 | value = str(value) |
| 598 | |
| 599 | if _newline_re.search(value) is not None: |
| 600 | raise ValueError("Header values must not contain newline characters.") |
| 601 | |
| 602 | return value # type: ignore[no-any-return] |
| 603 | |
| 604 | |
| 605 | class EnvironHeaders(ImmutableHeadersMixin, Headers): # type: ignore[misc] |
no outgoing calls
no test coverage detected