diff --git a/stdlib/_msi.pyi b/stdlib/_msi.pyi index edceed51bf9d..e5b408811ee7 100644 --- a/stdlib/_msi.pyi +++ b/stdlib/_msi.pyi @@ -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: ... diff --git a/stdlib/msilib/__init__.pyi b/stdlib/msilib/__init__.pyi index 622f585f5bee..259370f222c2 100644 --- a/stdlib/msilib/__init__.pyi +++ b/stdlib/msilib/__init__.pyi @@ -1,5 +1,5 @@ import sys -from collections.abc import Container, Iterable, Sequence +from collections.abc import Container, Iterable from types import ModuleType from typing import Any, Final @@ -7,6 +7,8 @@ if sys.platform == "win32": from _msi import * from _msi import _Database + from .sequence import _SequenceType + AMD64: Final[bool] Win64: Final[bool] @@ -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: ... @@ -54,7 +53,7 @@ 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] @@ -62,7 +61,7 @@ if sys.platform == "win32": class Directory: db: _Database cab: CAB - basedir: str + basedir: Directory | None physical: str logical: str component: str | None @@ -75,7 +74,7 @@ if sys.platform == "win32": self, db: _Database, cab: CAB, - basedir: str, + basedir: Directory | None, physical: str, _logical: str, default: str, @@ -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: ... @@ -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,