From 3b05794ba99cfef48e04c7e7565fefa13aa5597e Mon Sep 17 00:00:00 2001 From: Nikita Sobolev Date: Sat, 12 Feb 2022 20:24:18 +0300 Subject: [PATCH] Improve `poplib` with `Literal` values (#7180) --- stdlib/poplib.pyi | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/stdlib/poplib.pyi b/stdlib/poplib.pyi index 028af4128..565d261b4 100644 --- a/stdlib/poplib.pyi +++ b/stdlib/poplib.pyi @@ -1,16 +1,18 @@ import socket import ssl from typing import Any, BinaryIO, Pattern, overload +from typing_extensions import Literal _LongResp = tuple[bytes, list[bytes], int] class error_proto(Exception): ... -POP3_PORT: int -POP3_SSL_PORT: int -CR: bytes -LF: bytes -CRLF: bytes +POP3_PORT: Literal[110] +POP3_SSL_PORT: Literal[995] +CR: Literal[b"\r"] +LF: Literal[b"\n"] +CRLF: Literal[b"\r\n"] +HAVE_SSL: bool _list = list # conflicts with a method named "list"