Add some missing Windows constants (#8346)

This commit is contained in:
Alex Waygood
2022-07-20 17:45:36 +01:00
committed by GitHub
parent 73fbb53475
commit d1e80a724a
4 changed files with 46 additions and 12 deletions

View File

@@ -46,3 +46,43 @@ if sys.platform == "win32":
def FCICreate(__cabname: str, __files: list[str]) -> None: ...
def OpenDatabase(__path: str, __persist: int) -> _Database: ...
def CreateRecord(__count: int) -> _Record: ...
MSICOLINFO_NAMES: int
MSICOLINFO_TYPES: int
MSIDBOPEN_CREATE: int
MSIDBOPEN_CREATEDIRECT: int
MSIDBOPEN_DIRECT: int
MSIDBOPEN_PATCHFILE: int
MSIDBOPEN_READONLY: int
MSIDBOPEN_TRANSACT: int
MSIMODIFY_ASSIGN: int
MSIMODIFY_DELETE: int
MSIMODIFY_INSERT: int
MSIMODIFY_INSERT_TEMPORARY: int
MSIMODIFY_MERGE: int
MSIMODIFY_REFRESH: int
MSIMODIFY_REPLACE: int
MSIMODIFY_SEEK: int
MSIMODIFY_UPDATE: int
MSIMODIFY_VALIDATE: int
MSIMODIFY_VALIDATE_DELETE: int
MSIMODIFY_VALIDATE_FIELD: int
MSIMODIFY_VALIDATE_NEW: int
PID_APPNAME: int
PID_AUTHOR: int
PID_CHARCOUNT: int
PID_CODEPAGE: int
PID_COMMENTS: int
PID_CREATE_DTM: int
PID_KEYWORDS: int
PID_LASTAUTHOR: int
PID_LASTPRINTED: int
PID_LASTSAVE_DTM: int
PID_PAGECOUNT: int
PID_REVNUMBER: int
PID_SECURITY: int
PID_SUBJECT: int
PID_TEMPLATE: int
PID_TITLE: int
PID_WORDCOUNT: int

View File

@@ -5,13 +5,8 @@ from typing import Any
from typing_extensions import Literal
if sys.platform == "win32":
from _msi import (
CreateRecord as CreateRecord,
FCICreate as FCICreate,
OpenDatabase as OpenDatabase,
UuidCreate as UuidCreate,
_Database,
)
from _msi import *
from _msi import _Database
AMD64: bool
Win64: bool

View File

@@ -8,6 +8,10 @@ if sys.platform == "win32":
LK_NBLCK: Literal[2]
LK_RLCK: Literal[3]
LK_NBRLCK: Literal[4]
SEM_FAILCRITICALERRORS: int
SEM_NOALIGNMENTFAULTEXCEPT: int
SEM_NOGPFAULTERRORBOX: int
SEM_NOOPENFILEERRORBOX: int
def locking(__fd: int, __mode: int, __nbytes: int) -> None: ...
def setmode(__fd: int, __mode: int) -> int: ...
def open_osfhandle(__handle: int, __flags: int) -> int: ...

View File

@@ -1,5 +1,3 @@
_msi.MSI[A-Z_]+
_msi.PID_[A-Z_]+
ctypes.GetLastError # Is actually a pointer
distutils.archive_util.getgrnam
distutils.archive_util.getpwnam
@@ -10,11 +8,8 @@ mmap.PAGESIZE
# alias for a class defined elsewhere,
# mypy infers the variable has type `(*args) -> DupHandle` but stubtest infers the runtime type as <class DupHandle>
multiprocessing.reduction.AbstractReducer.DupHandle
msilib.MSI[A-Z_]+
msilib.text.dirname
msilib.PID_[A-Z_]+
msvcrt.CRT_ASSEMBLY_VERSION
msvcrt.SEM_[A-Z]+
selectors.KqueueSelector
signal.SIGEMT
signal.SIGINFO