mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-21 19:32:13 +08:00
[PyInstaller] TOCs are not often lists of TOCs (#10366)
This commit is contained in:
@@ -10,7 +10,7 @@ from typing_extensions import Final, Literal, TypeAlias
|
||||
|
||||
from PyInstaller.building import _PyiBlockCipher
|
||||
from PyInstaller.building.build_main import Analysis
|
||||
from PyInstaller.building.datastruct import TOC, Target, _TOCTuple
|
||||
from PyInstaller.building.datastruct import Target, _TOCTuple
|
||||
from PyInstaller.building.splash import Splash
|
||||
from PyInstaller.utils.win32.versioninfo import VSVersionInfo
|
||||
from PyInstaller.utils.win32.winmanifest import Manifest
|
||||
@@ -51,14 +51,14 @@ class PYZ(Target):
|
||||
name: str
|
||||
cipher: _PyiBlockCipher
|
||||
dependencies: list[_TOCTuple] # type: ignore[assignment]
|
||||
toc: TOC
|
||||
toc: list[_TOCTuple]
|
||||
code_dict: dict[str, CodeType]
|
||||
def __init__(self, *tocs: TOC, name: str | None = None, cipher: _PyiBlockCipher = None) -> None: ...
|
||||
def __init__(self, *tocs: Iterable[_TOCTuple], name: str | None = None, cipher: _PyiBlockCipher = None) -> None: ...
|
||||
def assemble(self) -> None: ...
|
||||
|
||||
class PKG(Target):
|
||||
xformdict: ClassVar[dict[str, str]]
|
||||
toc: TOC
|
||||
toc: list[_TOCTuple]
|
||||
cdict: Mapping[str, bool]
|
||||
name: str
|
||||
exclude_binaries: bool
|
||||
@@ -70,7 +70,7 @@ class PKG(Target):
|
||||
entitlements_file: FileDescriptorOrPath | None
|
||||
def __init__(
|
||||
self,
|
||||
toc: TOC,
|
||||
toc: Iterable[_TOCTuple],
|
||||
name: str | None = None,
|
||||
cdict: Mapping[str, bool] | None = None,
|
||||
exclude_binaries: bool = False,
|
||||
@@ -107,10 +107,10 @@ class EXE(Target):
|
||||
entitlements_file: FileDescriptorOrPath | None
|
||||
upx: bool
|
||||
pkgname: str
|
||||
toc: TOC
|
||||
toc: list[_TOCTuple]
|
||||
pkg: PKG
|
||||
dependencies: TOC
|
||||
exefiles: TOC
|
||||
dependencies: list[_TOCTuple]
|
||||
exefiles: list[_TOCTuple]
|
||||
def __init__(
|
||||
self,
|
||||
*args: Iterable[_TOCTuple] | PYZ | Splash,
|
||||
@@ -150,7 +150,7 @@ class COLLECT(Target):
|
||||
entitlements_file: FileDescriptorOrPath | None
|
||||
upx_binaries: bool
|
||||
name: str
|
||||
toc: TOC
|
||||
toc: list[_TOCTuple]
|
||||
def __init__(
|
||||
self,
|
||||
*args: Iterable[_TOCTuple] | EXE,
|
||||
|
||||
@@ -3,7 +3,7 @@ from collections.abc import Iterable
|
||||
from typing import Any
|
||||
|
||||
from PyInstaller.building import _PyiBlockCipher
|
||||
from PyInstaller.building.datastruct import TOC, Target
|
||||
from PyInstaller.building.datastruct import Target, _TOCTuple
|
||||
|
||||
# Referenced in: https://pyinstaller.org/en/stable/hooks.html#PyInstaller.utils.hooks.get_hook_config
|
||||
# Not to be imported during runtime, but is the type reference for hooks and analysis configuration
|
||||
@@ -14,21 +14,21 @@ class Analysis(Target):
|
||||
hooksconfig: dict[str, dict[str, object]]
|
||||
# https://pyinstaller.org/en/stable/spec-files.html#spec-file-operation
|
||||
# https://pyinstaller.org/en/stable/feature-notes.html
|
||||
pure: TOC
|
||||
zipped_data: TOC
|
||||
pure: list[_TOCTuple]
|
||||
zipped_data: list[_TOCTuple]
|
||||
# https://pyinstaller.org/en/stable/spec-files.html#giving-run-time-python-options
|
||||
# https://pyinstaller.org/en/stable/spec-files.html#the-splash-target
|
||||
scripts: TOC
|
||||
scripts: list[_TOCTuple]
|
||||
# https://pyinstaller.org/en/stable/feature-notes.html#practical-examples
|
||||
binaries: TOC
|
||||
zipfiles: TOC
|
||||
datas: TOC
|
||||
binaries: list[_TOCTuple]
|
||||
zipfiles: list[_TOCTuple]
|
||||
datas: list[_TOCTuple]
|
||||
def __init__(
|
||||
self,
|
||||
scripts: Iterable[StrPath],
|
||||
pathex: Incomplete | None = None,
|
||||
binaries: Incomplete | None = None,
|
||||
datas: Incomplete | None = None,
|
||||
binaries: Iterable[tuple[StrPath, StrPath]] | None = None,
|
||||
datas: Iterable[tuple[StrPath, StrPath]] | None = None,
|
||||
hiddenimports: Incomplete | None = None,
|
||||
hookspath: Incomplete | None = None,
|
||||
hooksconfig: dict[str, dict[str, Any]] | None = None,
|
||||
|
||||
@@ -24,11 +24,11 @@ class Target:
|
||||
invcnum: ClassVar[int]
|
||||
tocfilename: LiteralString
|
||||
tocbasename: LiteralString
|
||||
dependencies: TOC
|
||||
dependencies: list[_TOCTuple]
|
||||
def __init__(self) -> None: ...
|
||||
def __postinit__(self) -> None: ...
|
||||
|
||||
class Tree(Target, TOC):
|
||||
class Tree(Target, list[_TOCTuple]):
|
||||
root: str | None
|
||||
prefix: str | None
|
||||
excludes: Sequence[str]
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
from _typeshed import Incomplete, StrPath
|
||||
from collections.abc import Iterable
|
||||
|
||||
from PyInstaller.building.datastruct import TOC, Target, _TOCTuple
|
||||
from PyInstaller.building.datastruct import Target, _TOCTuple
|
||||
|
||||
splash_requirements: list[str]
|
||||
|
||||
@@ -24,8 +23,8 @@ class Splash(Target):
|
||||
uses_tkinter: Incomplete
|
||||
script: Incomplete
|
||||
splash_requirements: Incomplete
|
||||
binaries: TOC
|
||||
def __init__(self, image_file: StrPath, binaries: TOC, datas: Iterable[_TOCTuple], **kwargs: Incomplete) -> None: ...
|
||||
binaries: list[_TOCTuple]
|
||||
def __init__(self, image_file: StrPath, binaries: list[_TOCTuple], datas: list[_TOCTuple], **kwargs: Incomplete) -> None: ...
|
||||
def assemble(self) -> None: ...
|
||||
def test_tk_version(self) -> None: ...
|
||||
def generate_script(self) -> str: ...
|
||||
|
||||
Reference in New Issue
Block a user