@@ -38,27 +38,52 @@ class Message:
38
38
def keys (self ) -> list [str ]: ...
39
39
def values (self ) -> list [_HeaderType ]: ...
40
40
def items (self ) -> list [tuple [str , _HeaderType ]]: ...
41
- def get (self , name : str , failobj : _T = ...) -> _HeaderType | _T : ...
42
- def get_all (self , name : str , failobj : _T = ...) -> list [_HeaderType ] | _T : ...
41
+ @overload
42
+ def get (self , name : str , failobj : None = None ) -> _HeaderType | None : ...
43
+ @overload
44
+ def get (self , name : str , failobj : _T ) -> _HeaderType | _T : ...
45
+ @overload
46
+ def get_all (self , name : str , failobj : None = None ) -> list [_HeaderType ] | None : ...
47
+ @overload
48
+ def get_all (self , name : str , failobj : _T ) -> list [_HeaderType ] | _T : ...
43
49
def add_header (self , _name : str , _value : str , ** _params : _ParamsType ) -> None : ...
44
50
def replace_header (self , _name : str , _value : _HeaderType ) -> None : ...
45
51
def get_content_type (self ) -> str : ...
46
52
def get_content_maintype (self ) -> str : ...
47
53
def get_content_subtype (self ) -> str : ...
48
54
def get_default_type (self ) -> str : ...
49
55
def set_default_type (self , ctype : str ) -> None : ...
50
- def get_params (self , failobj : _T = ..., header : str = "content-type" , unquote : bool = True ) -> list [tuple [str , str ]] | _T : ...
51
- def get_param (self , param : str , failobj : _T = ..., header : str = "content-type" , unquote : bool = True ) -> _T | _ParamType : ...
56
+ @overload
57
+ def get_params (
58
+ self , failobj : None = None , header : str = "content-type" , unquote : bool = True
59
+ ) -> list [tuple [str , str ]] | None : ...
60
+ @overload
61
+ def get_params (self , failobj : _T , header : str = "content-type" , unquote : bool = True ) -> list [tuple [str , str ]] | _T : ...
62
+ @overload
63
+ def get_param (
64
+ self , param : str , failobj : None = None , header : str = "content-type" , unquote : bool = True
65
+ ) -> _ParamType | None : ...
66
+ @overload
67
+ def get_param (self , param : str , failobj : _T , header : str = "content-type" , unquote : bool = True ) -> _ParamType | _T : ...
52
68
def del_param (self , param : str , header : str = "content-type" , requote : bool = True ) -> None : ...
53
69
def set_type (self , type : str , header : str = "Content-Type" , requote : bool = True ) -> None : ...
54
- def get_filename (self , failobj : _T = ...) -> _T | str : ...
55
- def get_boundary (self , failobj : _T = ...) -> _T | str : ...
70
+ @overload
71
+ def get_filename (self , failobj : None = None ) -> str | None : ...
72
+ @overload
73
+ def get_filename (self , failobj : _T ) -> str | _T : ...
74
+ @overload
75
+ def get_boundary (self , failobj : None = None ) -> str | None : ...
76
+ @overload
77
+ def get_boundary (self , failobj : _T ) -> str | _T : ...
56
78
def set_boundary (self , boundary : str ) -> None : ...
57
79
@overload
58
80
def get_content_charset (self ) -> str | None : ...
59
81
@overload
60
82
def get_content_charset (self , failobj : _T ) -> str | _T : ...
61
- def get_charsets (self , failobj : _T = ...) -> _T | list [str ]: ...
83
+ @overload
84
+ def get_charsets (self , failobj : None = None ) -> list [str ] | None : ...
85
+ @overload
86
+ def get_charsets (self , failobj : _T ) -> list [str ] | _T : ...
62
87
def walk (self : Self ) -> Generator [Self , None , None ]: ...
63
88
def get_content_disposition (self ) -> str | None : ...
64
89
def as_string (self , unixfrom : bool = False , maxheaderlen : int = 0 , policy : Policy | None = None ) -> str : ...
0 commit comments