@@ -84,11 +84,20 @@ class IMAP4:
8484 if sys .version_info >= (3 , 14 ):
8585 def idle (self , duration : float | None = None ) -> Idler : ...
8686
87- def list (self , directory : str = '""' , pattern : str = "*" ) -> tuple [str , _AnyResponseData ]: ...
87+ if sys .version_info >= (3 , 15 ):
88+ def list (self , directory : str = "" , pattern : str = "*" ) -> tuple [str , _AnyResponseData ]: ...
89+ else :
90+ def list (self , directory : str = '""' , pattern : str = "*" ) -> tuple [str , _AnyResponseData ]: ...
91+
8892 def login (self , user : str , password : str ) -> tuple [Literal ["OK" ], _list [bytes ]]: ...
8993 def login_cram_md5 (self , user : str , password : str ) -> _CommandResults : ...
9094 def logout (self ) -> tuple [str , _AnyResponseData ]: ...
91- def lsub (self , directory : str = '""' , pattern : str = "*" ) -> _CommandResults : ...
95+
96+ if sys .version_info >= (3 , 15 ):
97+ def lsub (self , directory : str = "" , pattern : str = "*" ) -> _CommandResults : ...
98+ else :
99+ def lsub (self , directory : str = '""' , pattern : str = "*" ) -> _CommandResults : ...
100+
92101 def myrights (self , mailbox : str ) -> _CommandResults : ...
93102 def namespace (self ) -> _CommandResults : ...
94103 def noop (self ) -> tuple [str , _list [bytes ]]: ...
@@ -98,7 +107,12 @@ class IMAP4:
98107 def search (self , charset : str | None , * criteria : str ) -> _CommandResults : ...
99108 def select (self , mailbox : str = "INBOX" , readonly : bool = False ) -> tuple [str , _list [bytes | None ]]: ...
100109 def setacl (self , mailbox : str , who : str , what : str ) -> _CommandResults : ...
101- def setannotation (self , * args : str ) -> _CommandResults : ...
110+
111+ if sys .version_info >= (3 , 15 ):
112+ def setannotation (self , mailbox : str | bytes , * args : str ) -> _CommandResults : ...
113+ else :
114+ def setannotation (self , * args : str ) -> _CommandResults : ...
115+
102116 def setquota (self , root : str , limits : str ) -> _CommandResults : ...
103117 def sort (self , sort_criteria : str , charset : str , * search_criteria : str ) -> _CommandResults : ...
104118 def starttls (self , ssl_context : Any | None = None ) -> tuple [Literal ["OK" ], _list [None ]]: ...
0 commit comments