File: header.pyi

package info (click to toggle)
mypy 0.470-complete-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 5,864 kB
  • ctags: 3,264
  • sloc: python: 21,838; makefile: 18
file content (25 lines) | stat: -rw-r--r-- 1,142 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# Stubs for email.header (Python 3.4)

from typing import Union, Optional, Any, List, Tuple
from email.charset import Charset

class Header:
    def __init__(self, s: Union[bytes, str, None] = ...,
                 charset: Union[Charset, str, None] = ...,
                 maxlinelen: Optional[int] = ...,
                 header_name: Optional[str] = ..., continuation_ws: str = ...,
                 errors: str = ...) -> None: ...
    def append(self, s: Union[bytes, str],
               charset: Union[Charset, str, None] = ...,
               errors: str = ...) -> None: ...
    def encode(self, splitchars: str = ..., maxlinelen: Optional[int] = ...,
               linesep: str = ...) -> str: ...
    def __str__(self) -> str: ...
    def __eq__(self, other: Any) -> bool: ...
    def __ne__(self, other: Any) -> bool: ...

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] = ...,
                continuation_ws: str = ...) -> Header: ...