mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-12 23:16:31 +08:00
Add type and parameter fields to MediaType (#1103)
This commit is contained in:
@@ -55,4 +55,4 @@ class Parser:
|
|||||||
def __init__(self, stream: LazyStream, boundary: bytes) -> None: ...
|
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 __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]]: ...
|
||||||
|
|||||||
@@ -200,6 +200,9 @@ class _ImmutableQueryDict(QueryDict):
|
|||||||
def dict(self) -> Dict[str, str]: ... # type: ignore[override]
|
def dict(self) -> Dict[str, str]: ... # type: ignore[override]
|
||||||
|
|
||||||
class MediaType:
|
class MediaType:
|
||||||
|
main_type: str
|
||||||
|
sub_type: str
|
||||||
|
params: Dict[str, bytes]
|
||||||
def __init__(self, media_type_raw_line: str) -> None: ...
|
def __init__(self, media_type_raw_line: str) -> None: ...
|
||||||
@property
|
@property
|
||||||
def is_all_types(self) -> bool: ...
|
def is_all_types(self) -> bool: ...
|
||||||
|
|||||||
Reference in New Issue
Block a user