Add type and parameter fields to MediaType (#1103)

This commit is contained in:
Yannik Rödel
2022-09-09 15:48:24 +02:00
committed by GitHub
parent 3c942483d4
commit abd0609f80
2 changed files with 4 additions and 1 deletions

View File

@@ -55,4 +55,4 @@ class Parser:
def __init__(self, stream: LazyStream, boundary: bytes) -> None: ...
def __iter__(self) -> Iterator[Tuple[str, Dict[str, Tuple[str, Dict[str, Union[bytes, str]]]], LazyStream]]: ...
def parse_header(line: bytes) -> Tuple[str, Dict[str, Any]]: ...
def parse_header(line: bytes) -> Tuple[str, Dict[str, bytes]]: ...

View File

@@ -200,6 +200,9 @@ class _ImmutableQueryDict(QueryDict):
def dict(self) -> Dict[str, str]: ... # type: ignore[override]
class MediaType:
main_type: str
sub_type: str
params: Dict[str, bytes]
def __init__(self, media_type_raw_line: str) -> None: ...
@property
def is_all_types(self) -> bool: ...