email.header: Make decode_header also accept str. (#333)

decode_header accepts a parameter of type str or Header, but the
stub for decode_header types the parameter as Header.  Change
that to Union[Header, str].
This commit is contained in:
Eklavya Sharma
2016-07-05 06:41:49 +05:30
committed by Guido van Rossum
parent a424eeb1f8
commit df1a655858

View File

@@ -18,7 +18,7 @@ class Header:
def __eq__(self, other: Any) -> bool: ...
def __ne__(self, other: Any) -> bool: ...
def decode_header(header: Header) -> List[Tuple[bytes, Optional[str]]]: ...
def decode_header(header: Union[Header, str]) -> List[Tuple[bytes, Optional[str]]]: ...
def make_header(decoded_seq: List[Tuple[bytes, Optional[str]]],
maxlinelen: Optional[int] =...,
header_name: Optional[str] = ...,