Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion stdlib/_msi.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ if sys.platform == "win32":
__init__: None # type: ignore[assignment]

def UuidCreate() -> str: ...
def FCICreate(cabname: str, files: list[str], /) -> None: ...
def FCICreate(cabname: str, files: list[tuple[str, str]], /) -> None: ...
def OpenDatabase(path: str, persist: int, /) -> _Database: ...
def CreateRecord(count: int, /) -> _Record: ...

Expand Down
23 changes: 12 additions & 11 deletions stdlib/msilib/__init__.pyi
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
import sys
from collections.abc import Container, Iterable, Sequence
from collections.abc import Container, Iterable
from types import ModuleType
from typing import Any, Final

if sys.platform == "win32":
from _msi import *
from _msi import _Database

from .sequence import _SequenceType

AMD64: Final[bool]
Win64: Final[bool]

Expand All @@ -33,10 +35,7 @@ if sys.platform == "win32":
class _Unspecified: ...

def change_sequence(
seq: Sequence[tuple[str, str | None, int]],
action: str,
seqno: int | type[_Unspecified] = ...,
cond: str | type[_Unspecified] = ...,
seq: _SequenceType, action: str, seqno: int | type[_Unspecified] = ..., cond: str | type[_Unspecified] = ...
) -> None: ...
def add_data(db: _Database, table: str, values: Iterable[tuple[Any, ...]]) -> None: ...
def add_stream(db: _Database, name: str, path: str) -> None: ...
Expand All @@ -54,15 +53,15 @@ if sys.platform == "win32":
index: int
def __init__(self, name: str) -> None: ...
def gen_id(self, file: str) -> str: ...
def append(self, full: str, file: str, logical: str) -> tuple[int, str]: ...
def append(self, full: str, file: str, logical: str | None) -> tuple[int, str] | None: ...
def commit(self, db: _Database) -> None: ...

_directories: set[str]

class Directory:
db: _Database
cab: CAB
basedir: str
basedir: Directory | None
physical: str
logical: str
component: str | None
Expand All @@ -75,7 +74,7 @@ if sys.platform == "win32":
self,
db: _Database,
cab: CAB,
basedir: str,
basedir: Directory | None,
physical: str,
_logical: str,
default: str,
Expand All @@ -90,7 +89,9 @@ if sys.platform == "win32":
uuid: str | None = None,
) -> None: ...
def make_short(self, file: str) -> str: ...
def add_file(self, file: str, src: str | None = None, version: str | None = None, language: str | None = None) -> str: ...
def add_file(
self, file: str, src: str | None = None, version: str | None = None, language: str | None = None
) -> str | None: ...
def glob(self, pattern: str, exclude: Container[str] | None = None) -> list[str]: ...
def remove_pyc(self) -> None: ...

Expand Down Expand Up @@ -146,8 +147,8 @@ if sys.platform == "win32":
attr: int,
title: str,
first: str,
default: str,
cancel: str,
default: str | None,
cancel: str | None,
) -> None: ...
def control(
self,
Expand Down
Loading