From c1971fb44396ad2a2b214b2ce1909a7b862969f2 Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Sat, 25 Nov 2017 13:23:57 -0800 Subject: [PATCH] imaplib: Fix annotation for search. (#1762) * imaplib: Fix annotation for search. https://docs.python.org/3/library/imaplib.html#imaplib.IMAP4.search shows that IMAP4.search takes a number of str args, not a number of List[str] args (I can see how one would be confused, though, because of the *criteria). * imaplib: Fix annotation for store. While it's called "flag_list", https://docs.python.org/3/library/imaplib.html#imaplib.IMAP4.store clearly shows it's expecting a string with a list of flags in it, not a Python list. --- stdlib/2and3/imaplib.pyi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stdlib/2and3/imaplib.pyi b/stdlib/2and3/imaplib.pyi index 8157b6701..4f53146ab 100644 --- a/stdlib/2and3/imaplib.pyi +++ b/stdlib/2and3/imaplib.pyi @@ -69,7 +69,7 @@ class IMAP4: def partial(self, message_num: str, message_part: str, start: str, length: str) -> CommandResults: ... def proxyauth(self, user: str) -> CommandResults: ... def rename(self, oldmailbox: str, newmailbox: str) -> CommandResults: ... - def search(self, charset: str, *criteria: List[str]) -> CommandResults: ... + def search(self, charset: str, *criteria: str) -> CommandResults: ... def select(self, mailbox: str = ..., readonly: bool = ...) -> CommandResults: ... def setacl(self, mailbox: str, who: str, what: str) -> CommandResults: ... def setannotation(self, *args: List[str]) -> CommandResults: ... @@ -78,7 +78,7 @@ class IMAP4: if sys.version_info >= (3,): def starttls(self, ssl_context: Optional[Any] = ...) -> CommandResults: ... def status(self, mailbox: str, names: str) -> CommandResults: ... - def store(self, message_set: str, command: str, flags: List[str]) -> CommandResults: ... + def store(self, message_set: str, command: str, flags: str) -> CommandResults: ... def subscribe(self, mailbox: str) -> CommandResults: ... def thread(self, threading_algorithm: str, charset: str, *search_criteria: List[str]) -> CommandResults: ... def uid(self, command: str, *args: List[str]) -> CommandResults: ...