Use Literal type in msvcrt (#7257)

This commit is contained in:
Nikita Sobolev
2022-02-18 12:27:28 +03:00
committed by GitHub
parent 644d5540bc
commit 2ada15c4e4

View File

@@ -1,12 +1,13 @@
import sys
from typing_extensions import Literal
# This module is only available on Windows
if sys.platform == "win32":
LK_LOCK: int
LK_NBLCK: int
LK_NBRLCK: int
LK_RLCK: int
LK_UNLCK: int
LK_UNLCK: Literal[0]
LK_LOCK: Literal[1]
LK_NBLCK: Literal[2]
LK_RLCK: Literal[3]
LK_NBRLCK: Literal[4]
def locking(__fd: int, __mode: int, __nbytes: int) -> None: ...
def setmode(__fd: int, __mode: int) -> int: ...
def open_osfhandle(__handle: int, __flags: int) -> int: ...