Skip to content

Commit f272056

Browse files
authored
Update headers.py
1 parent d93c63a commit f272056

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

litestar/datastructures/headers.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
Any,
1111
ClassVar,
1212
Optional,
13-
TypeVar,
1413
Union,
1514
cast,
1615
overload,
@@ -424,9 +423,6 @@ def match(self, other: "MediaTypeHeader") -> bool:
424423
)
425424

426425

427-
_DefaultT = TypeVar("_DefaultT", bound=Optional[str])
428-
429-
430426
class Accept:
431427
"""An ``Accept`` header."""
432428

@@ -449,9 +445,9 @@ def __iter__(self) -> Iterator[str]:
449445
def best_match(self, provided_types: list[str], default: None = None) -> Optional[str]: ...
450446

451447
@overload
452-
def best_match(self, provided_types: list[str], default: _DefaultT) -> Union[str, _DefaultT]: ...
448+
def best_match(self, provided_types: list[str], default: str) -> str: ...
453449

454-
def best_match(self, provided_types: list[str], default: Optional[_DefaultT] = None) -> Union[str, _DefaultT]:
450+
def best_match(self, provided_types: list[str], default: Optional[str] = None) -> Optional[str]:
455451
"""Find the best matching media type for the request.
456452
457453
Args:

0 commit comments

Comments
 (0)