From 96c836fc411b5c4773e007aaae3edc8011ecb211 Mon Sep 17 00:00:00 2001 From: Nikita Sobolev Date: Mon, 3 Jan 2022 12:23:29 +0300 Subject: [PATCH] Use `Literal` types in `windows_events` (#6792) --- stdlib/asyncio/windows_events.pyi | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/stdlib/asyncio/windows_events.pyi b/stdlib/asyncio/windows_events.pyi index 6d17bada3..a97f147db 100644 --- a/stdlib/asyncio/windows_events.pyi +++ b/stdlib/asyncio/windows_events.pyi @@ -2,6 +2,7 @@ import socket import sys from _typeshed import WriteableBuffer from typing import IO, Any, Callable, ClassVar, NoReturn, Type +from typing_extensions import Literal from . import events, futures, proactor_events, selector_events, streams, windows_utils @@ -17,10 +18,10 @@ if sys.version_info >= (3, 7): else: __all__ = ["SelectorEventLoop", "ProactorEventLoop", "IocpProactor", "DefaultEventLoopPolicy"] -NULL: int -INFINITE: int -ERROR_CONNECTION_REFUSED: int -ERROR_CONNECTION_ABORTED: int +NULL: Literal[0] +INFINITE: Literal[0xFFFFFFFF] +ERROR_CONNECTION_REFUSED: Literal[1225] +ERROR_CONNECTION_ABORTED: Literal[1236] CONNECT_PIPE_INIT_DELAY: float CONNECT_PIPE_MAX_DELAY: float