@@ -4,7 +4,7 @@ import logging
4
4
from _typeshed import StrOrBytesPath , StrPath
5
5
from collections .abc import Callable , Iterable
6
6
from typing import Any
7
- from typing_extensions import Literal
7
+ from typing_extensions import Final , Literal
8
8
9
9
import pkg_resources
10
10
from PyInstaller import HOMEPATH as HOMEPATH
@@ -15,14 +15,14 @@ from PyInstaller.utils.hooks.win32 import get_pywin32_module_file_attribute as g
15
15
conda_support = conda
16
16
17
17
logger : logging .Logger
18
- PY_IGNORE_EXTENSIONS : set [str ]
18
+ PY_IGNORE_EXTENSIONS : Final [ set [str ] ]
19
19
hook_variables : dict [str , str ]
20
20
21
21
def exec_statement (statement : str ) -> str | int : ...
22
22
def exec_statement_rc (statement : str ) -> str | int : ...
23
23
def eval_statement (statement : str ) -> Any | Literal ["" ]: ...
24
24
def get_pyextension_imports (module_name : str ) -> list [str ]: ...
25
- def get_homebrew_path (formula : str = ... ) -> str | None : ...
25
+ def get_homebrew_path (formula : str = "" ) -> str | None : ...
26
26
def remove_prefix (string : str , prefix : str ) -> str : ...
27
27
def remove_suffix (string : str , suffix : str ) -> str : ...
28
28
def remove_file_extension (filename : str ) -> str : ...
@@ -31,52 +31,52 @@ def get_module_attribute(module_name: str, attr_name: str) -> Any: ...
31
31
def get_module_file_attribute (package : str ) -> str | None : ...
32
32
def is_module_satisfies (
33
33
requirements : Iterable [str ] | pkg_resources .Requirement ,
34
- version : str | pkg_resources .Distribution | None = ... ,
35
- version_attr : str = ... ,
34
+ version : str | pkg_resources .Distribution | None = None ,
35
+ version_attr : str = "__version__" ,
36
36
) -> bool : ...
37
37
def is_package (module_name : str ) -> bool : ...
38
38
def get_all_package_paths (package : str ) -> list [str ]: ...
39
39
def package_base_path (package_path : str , package : str ) -> str : ...
40
40
def get_package_paths (package : str ) -> tuple [str , str ]: ...
41
41
def collect_submodules (
42
- package : str , filter : Callable [[str ], bool ] = ..., on_error : Literal ["ignore" , "warn once" , "warn" , "raise" ] = ...
42
+ package : str , filter : Callable [[str ], bool ] = ..., on_error : Literal ["ignore" , "warn once" , "warn" , "raise" ] = "warn once"
43
43
) -> list [str ]: ...
44
44
def is_module_or_submodule (name : str , mod_or_submod : str ) -> bool : ...
45
45
46
- PY_DYLIB_PATTERNS : list [str ]
46
+ PY_DYLIB_PATTERNS : Final [ list [str ] ]
47
47
48
- def collect_dynamic_libs (package : str , destdir : object = ... ) -> list [tuple [str , str ]]: ...
48
+ def collect_dynamic_libs (package : str , destdir : object = None ) -> list [tuple [str , str ]]: ...
49
49
def collect_data_files (
50
50
package : str ,
51
- include_py_files : bool = ... ,
52
- subdir : StrPath | None = ... ,
53
- excludes : Iterable [str ] | None = ... ,
54
- includes : Iterable [str ] | None = ... ,
51
+ include_py_files : bool = False ,
52
+ subdir : StrPath | None = None ,
53
+ excludes : Iterable [str ] | None = None ,
54
+ includes : Iterable [str ] | None = None ,
55
55
) -> list [tuple [str , str ]]: ...
56
56
def collect_system_data_files (
57
- path : str , destdir : StrPath | None = ... , include_py_files : bool = ...
57
+ path : str , destdir : StrPath | None = None , include_py_files : bool = False
58
58
) -> list [tuple [str , str ]]: ...
59
- def copy_metadata (package_name : str , recursive : bool = ... ) -> list [tuple [str , str ]]: ...
59
+ def copy_metadata (package_name : str , recursive : bool = False ) -> list [tuple [str , str ]]: ...
60
60
def get_installer (module : str ) -> str | None : ...
61
61
def requirements_for_package (package_name : str ) -> list [str ]: ...
62
62
def collect_all (
63
63
package_name : str ,
64
- include_py_files : bool = ... ,
65
- filter_submodules : Callable [[str ], bool ] | None = ... ,
66
- exclude_datas : Iterable [str ] | None = ... ,
67
- include_datas : Iterable [str ] | None = ... ,
68
- on_error : Literal ["ignore" , "warn once" , "warn" , "raise" ] = ... ,
64
+ include_py_files : bool = True ,
65
+ filter_submodules : Callable [[str ], bool ] | None = None ,
66
+ exclude_datas : Iterable [str ] | None = None ,
67
+ include_datas : Iterable [str ] | None = None ,
68
+ on_error : Literal ["ignore" , "warn once" , "warn" , "raise" ] = "warn once" ,
69
69
) -> tuple [list [tuple [str , str ]], list [tuple [str , str ]], list [str ]]: ...
70
70
def collect_entry_point (name : str ) -> tuple [tuple [str , str ], list [str ]]: ...
71
71
def get_hook_config (hook_api : PostGraphAPI , module_name : str , key : str ) -> None : ...
72
72
def include_or_exclude_file (
73
73
filename : StrOrBytesPath ,
74
- include_list : Iterable [StrOrBytesPath ] | None = ... ,
75
- exclude_list : Iterable [StrOrBytesPath ] | None = ... ,
74
+ include_list : Iterable [StrOrBytesPath ] | None = None ,
75
+ exclude_list : Iterable [StrOrBytesPath ] | None = None ,
76
76
) -> bool : ...
77
77
def collect_delvewheel_libs_directory (
78
78
package_name : str ,
79
- libdir_name : StrPath | None = ... ,
80
- datas : list [tuple [str , str ]] | None = ... ,
81
- binaries : list [tuple [str , str ]] | None = ... ,
79
+ libdir_name : StrPath | None = None ,
80
+ datas : list [tuple [str , str ]] | None = None ,
81
+ binaries : list [tuple [str , str ]] | None = None ,
82
82
) -> tuple [list [tuple [str , str ]], list [tuple [str , str ]]]: ...
0 commit comments