From fa0ba1eda8672b3da089ae6cc0bd253dfa88d657 Mon Sep 17 00:00:00 2001 From: Peter Law Date: Thu, 8 Oct 2020 21:20:48 +0100 Subject: [PATCH] Add various undocumented functions from ftplib (#4633) Fixes #4632 --- stdlib/2and3/ftplib.pyi | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/stdlib/2and3/ftplib.pyi b/stdlib/2and3/ftplib.pyi index 17bfaccfc..0661301c0 100644 --- a/stdlib/2and3/ftplib.pyi +++ b/stdlib/2and3/ftplib.pyi @@ -4,6 +4,7 @@ from socket import socket from ssl import SSLContext from types import TracebackType from typing import Any, BinaryIO, Callable, Dict, Iterable, Iterator, List, Optional, Text, TextIO, Tuple, Type, TypeVar, Union +from typing_extensions import Literal _T = TypeVar("_T") _IntOrStr = Union[int, Text] @@ -150,3 +151,15 @@ if sys.version_info < (3,): def get_account(self, host: Text) -> Tuple[Optional[str], Optional[str], Optional[str]]: ... def get_macros(self) -> List[str]: ... def get_macro(self, macro: Text) -> Tuple[str, ...]: ... + +def parse150(resp: str) -> Optional[int]: ... # undocumented +def parse227(resp: str) -> Tuple[str, int]: ... # undocumented +def parse229(resp: str, peer: Any) -> Tuple[str, int]: ... # undocumented +def parse257(resp: str) -> str: ... # undocumented +def ftpcp( + source: FTP, + sourcename: str, + target: FTP, + targetname: str = ..., + type: Literal["A", "I"] = ..., +) -> None: ... # undocumented