Re-organize directory structure (#4971)

See discussion in #2491

Co-authored-by: Ivan Levkivskyi <ilevkivskyi@dropbox.com>
This commit is contained in:
Ivan Levkivskyi
2021-01-27 12:00:39 +00:00
committed by GitHub
parent 869238e587
commit 16ae4c6120
1399 changed files with 601 additions and 97 deletions

View File

View File

@@ -0,0 +1,12 @@
from typing import Optional
def make_archive(
base_name: str,
format: str,
root_dir: Optional[str] = ...,
base_dir: Optional[str] = ...,
verbose: int = ...,
dry_run: int = ...,
) -> str: ...
def make_tarball(base_name: str, base_dir: str, compress: Optional[str] = ..., verbose: int = ..., dry_run: int = ...) -> str: ...
def make_zipfile(base_name: str, base_dir: str, verbose: int = ..., dry_run: int = ...) -> str: ...

View File

@@ -0,0 +1,3 @@
from distutils.ccompiler import CCompiler
class BCPPCompiler(CCompiler): ...

View File

@@ -0,0 +1,150 @@
from typing import Any, Callable, List, Optional, Tuple, Union
_Macro = Union[Tuple[str], Tuple[str, Optional[str]]]
def gen_lib_options(
compiler: CCompiler, library_dirs: List[str], runtime_library_dirs: List[str], libraries: List[str]
) -> List[str]: ...
def gen_preprocess_options(macros: List[_Macro], include_dirs: List[str]) -> List[str]: ...
def get_default_compiler(osname: Optional[str] = ..., platform: Optional[str] = ...) -> str: ...
def new_compiler(
plat: Optional[str] = ..., compiler: Optional[str] = ..., verbose: int = ..., dry_run: int = ..., force: int = ...
) -> CCompiler: ...
def show_compilers() -> None: ...
class CCompiler:
dry_run: bool
force: bool
verbose: bool
output_dir: Optional[str]
macros: List[_Macro]
include_dirs: List[str]
libraries: List[str]
library_dirs: List[str]
runtime_library_dirs: List[str]
objects: List[str]
def __init__(self, verbose: int = ..., dry_run: int = ..., force: int = ...) -> None: ...
def add_include_dir(self, dir: str) -> None: ...
def set_include_dirs(self, dirs: List[str]) -> None: ...
def add_library(self, libname: str) -> None: ...
def set_libraries(self, libnames: List[str]) -> None: ...
def add_library_dir(self, dir: str) -> None: ...
def set_library_dirs(self, dirs: List[str]) -> None: ...
def add_runtime_library_dir(self, dir: str) -> None: ...
def set_runtime_library_dirs(self, dirs: List[str]) -> None: ...
def define_macro(self, name: str, value: Optional[str] = ...) -> None: ...
def undefine_macro(self, name: str) -> None: ...
def add_link_object(self, object: str) -> None: ...
def set_link_objects(self, objects: List[str]) -> None: ...
def detect_language(self, sources: Union[str, List[str]]) -> Optional[str]: ...
def find_library_file(self, dirs: List[str], lib: str, debug: bool = ...) -> Optional[str]: ...
def has_function(
self,
funcname: str,
includes: Optional[List[str]] = ...,
include_dirs: Optional[List[str]] = ...,
libraries: Optional[List[str]] = ...,
library_dirs: Optional[List[str]] = ...,
) -> bool: ...
def library_dir_option(self, dir: str) -> str: ...
def library_option(self, lib: str) -> str: ...
def runtime_library_dir_option(self, dir: str) -> str: ...
def set_executables(self, **args: str) -> None: ...
def compile(
self,
sources: List[str],
output_dir: Optional[str] = ...,
macros: Optional[_Macro] = ...,
include_dirs: Optional[List[str]] = ...,
debug: bool = ...,
extra_preargs: Optional[List[str]] = ...,
extra_postargs: Optional[List[str]] = ...,
depends: Optional[List[str]] = ...,
) -> List[str]: ...
def create_static_lib(
self,
objects: List[str],
output_libname: str,
output_dir: Optional[str] = ...,
debug: bool = ...,
target_lang: Optional[str] = ...,
) -> None: ...
def link(
self,
target_desc: str,
objects: List[str],
output_filename: str,
output_dir: Optional[str] = ...,
libraries: Optional[List[str]] = ...,
library_dirs: Optional[List[str]] = ...,
runtime_library_dirs: Optional[List[str]] = ...,
export_symbols: Optional[List[str]] = ...,
debug: bool = ...,
extra_preargs: Optional[List[str]] = ...,
extra_postargs: Optional[List[str]] = ...,
build_temp: Optional[str] = ...,
target_lang: Optional[str] = ...,
) -> None: ...
def link_executable(
self,
objects: List[str],
output_progname: str,
output_dir: Optional[str] = ...,
libraries: Optional[List[str]] = ...,
library_dirs: Optional[List[str]] = ...,
runtime_library_dirs: Optional[List[str]] = ...,
debug: bool = ...,
extra_preargs: Optional[List[str]] = ...,
extra_postargs: Optional[List[str]] = ...,
target_lang: Optional[str] = ...,
) -> None: ...
def link_shared_lib(
self,
objects: List[str],
output_libname: str,
output_dir: Optional[str] = ...,
libraries: Optional[List[str]] = ...,
library_dirs: Optional[List[str]] = ...,
runtime_library_dirs: Optional[List[str]] = ...,
export_symbols: Optional[List[str]] = ...,
debug: bool = ...,
extra_preargs: Optional[List[str]] = ...,
extra_postargs: Optional[List[str]] = ...,
build_temp: Optional[str] = ...,
target_lang: Optional[str] = ...,
) -> None: ...
def link_shared_object(
self,
objects: List[str],
output_filename: str,
output_dir: Optional[str] = ...,
libraries: Optional[List[str]] = ...,
library_dirs: Optional[List[str]] = ...,
runtime_library_dirs: Optional[List[str]] = ...,
export_symbols: Optional[List[str]] = ...,
debug: bool = ...,
extra_preargs: Optional[List[str]] = ...,
extra_postargs: Optional[List[str]] = ...,
build_temp: Optional[str] = ...,
target_lang: Optional[str] = ...,
) -> None: ...
def preprocess(
self,
source: str,
output_file: Optional[str] = ...,
macros: Optional[List[_Macro]] = ...,
include_dirs: Optional[List[str]] = ...,
extra_preargs: Optional[List[str]] = ...,
extra_postargs: Optional[List[str]] = ...,
) -> None: ...
def executable_filename(self, basename: str, strip_dir: int = ..., output_dir: str = ...) -> str: ...
def library_filename(self, libname: str, lib_type: str = ..., strip_dir: int = ..., output_dir: str = ...) -> str: ...
def object_filenames(self, source_filenames: List[str], strip_dir: int = ..., output_dir: str = ...) -> List[str]: ...
def shared_object_filename(self, basename: str, strip_dir: int = ..., output_dir: str = ...) -> str: ...
def execute(self, func: Callable[..., None], args: Tuple[Any, ...], msg: Optional[str] = ..., level: int = ...) -> None: ...
def spawn(self, cmd: List[str]) -> None: ...
def mkpath(self, name: str, mode: int = ...) -> None: ...
def move_file(self, src: str, dst: str) -> str: ...
def announce(self, msg: str, level: int = ...) -> None: ...
def warn(self, msg: str) -> None: ...
def debug_print(self, msg: str) -> None: ...

View File

@@ -0,0 +1,67 @@
from abc import abstractmethod
from distutils.dist import Distribution
from typing import Any, Callable, Iterable, List, Optional, Text, Tuple, Union
class Command:
sub_commands: List[Tuple[str, Optional[Callable[[Command], bool]]]]
def __init__(self, dist: Distribution) -> None: ...
@abstractmethod
def initialize_options(self) -> None: ...
@abstractmethod
def finalize_options(self) -> None: ...
@abstractmethod
def run(self) -> None: ...
def announce(self, msg: Text, level: int = ...) -> None: ...
def debug_print(self, msg: Text) -> None: ...
def ensure_string(self, option: str, default: Optional[str] = ...) -> None: ...
def ensure_string_list(self, option: Union[str, List[str]]) -> None: ...
def ensure_filename(self, option: str) -> None: ...
def ensure_dirname(self, option: str) -> None: ...
def get_command_name(self) -> str: ...
def set_undefined_options(self, src_cmd: Text, *option_pairs: Tuple[str, str]) -> None: ...
def get_finalized_command(self, command: Text, create: int = ...) -> Command: ...
def reinitialize_command(self, command: Union[Command, Text], reinit_subcommands: int = ...) -> Command: ...
def run_command(self, command: Text) -> None: ...
def get_sub_commands(self) -> List[str]: ...
def warn(self, msg: Text) -> None: ...
def execute(self, func: Callable[..., Any], args: Iterable[Any], msg: Optional[Text] = ..., level: int = ...) -> None: ...
def mkpath(self, name: str, mode: int = ...) -> None: ...
def copy_file(
self,
infile: str,
outfile: str,
preserve_mode: int = ...,
preserve_times: int = ...,
link: Optional[str] = ...,
level: Any = ...,
) -> Tuple[str, bool]: ... # level is not used
def copy_tree(
self,
infile: str,
outfile: str,
preserve_mode: int = ...,
preserve_times: int = ...,
preserve_symlinks: int = ...,
level: Any = ...,
) -> List[str]: ... # level is not used
def move_file(self, src: str, dst: str, level: Any = ...) -> str: ... # level is not used
def spawn(self, cmd: Iterable[str], search_path: int = ..., level: Any = ...) -> None: ... # level is not used
def make_archive(
self,
base_name: str,
format: str,
root_dir: Optional[str] = ...,
base_dir: Optional[str] = ...,
owner: Optional[str] = ...,
group: Optional[str] = ...,
) -> str: ...
def make_file(
self,
infiles: Union[str, List[str], Tuple[str]],
outfile: str,
func: Callable[..., Any],
args: List[Any],
exec_msg: Optional[str] = ...,
skip_msg: Optional[str] = ...,
level: Any = ...,
) -> None: ... # level is not used

View File

@@ -0,0 +1,6 @@
from distutils.cmd import Command
class bdist_msi(Command):
def initialize_options(self) -> None: ...
def finalize_options(self) -> None: ...
def run(self) -> None: ...

View File

@@ -0,0 +1,6 @@
from distutils.cmd import Command
class build_py(Command):
def initialize_options(self) -> None: ...
def finalize_options(self) -> None: ...
def run(self) -> None: ...

View File

@@ -0,0 +1,87 @@
from distutils import log as log
from distutils.ccompiler import CCompiler
from distutils.core import Command as Command
from distutils.errors import DistutilsExecError as DistutilsExecError
from distutils.sysconfig import customize_compiler as customize_compiler
from typing import Dict, List, Optional, Pattern, Sequence, Tuple, Union
LANG_EXT: Dict[str, str]
class config(Command):
description: str = ...
# Tuple is full name, short name, description
user_options: Sequence[Tuple[str, Optional[str], str]] = ...
compiler: Optional[Union[str, CCompiler]] = ...
cc: Optional[str] = ...
include_dirs: Optional[Sequence[str]] = ...
libraries: Optional[Sequence[str]] = ...
library_dirs: Optional[Sequence[str]] = ...
noisy: int = ...
dump_source: int = ...
temp_files: Sequence[str] = ...
def initialize_options(self) -> None: ...
def finalize_options(self) -> None: ...
def run(self) -> None: ...
def try_cpp(
self,
body: Optional[str] = ...,
headers: Optional[Sequence[str]] = ...,
include_dirs: Optional[Sequence[str]] = ...,
lang: str = ...,
) -> bool: ...
def search_cpp(
self,
pattern: Union[Pattern[str], str],
body: Optional[str] = ...,
headers: Optional[Sequence[str]] = ...,
include_dirs: Optional[Sequence[str]] = ...,
lang: str = ...,
) -> bool: ...
def try_compile(
self, body: str, headers: Optional[Sequence[str]] = ..., include_dirs: Optional[Sequence[str]] = ..., lang: str = ...
) -> bool: ...
def try_link(
self,
body: str,
headers: Optional[Sequence[str]] = ...,
include_dirs: Optional[Sequence[str]] = ...,
libraries: Optional[Sequence[str]] = ...,
library_dirs: Optional[Sequence[str]] = ...,
lang: str = ...,
) -> bool: ...
def try_run(
self,
body: str,
headers: Optional[Sequence[str]] = ...,
include_dirs: Optional[Sequence[str]] = ...,
libraries: Optional[Sequence[str]] = ...,
library_dirs: Optional[Sequence[str]] = ...,
lang: str = ...,
) -> bool: ...
def check_func(
self,
func: str,
headers: Optional[Sequence[str]] = ...,
include_dirs: Optional[Sequence[str]] = ...,
libraries: Optional[Sequence[str]] = ...,
library_dirs: Optional[Sequence[str]] = ...,
decl: int = ...,
call: int = ...,
) -> bool: ...
def check_lib(
self,
library: str,
library_dirs: Optional[Sequence[str]] = ...,
headers: Optional[Sequence[str]] = ...,
include_dirs: Optional[Sequence[str]] = ...,
other_libraries: List[str] = ...,
) -> bool: ...
def check_header(
self,
header: str,
include_dirs: Optional[Sequence[str]] = ...,
library_dirs: Optional[Sequence[str]] = ...,
lang: str = ...,
) -> bool: ...
def dump_file(filename: str, head: Optional[str] = ...) -> None: ...

View File

@@ -0,0 +1,12 @@
from distutils.cmd import Command
from typing import Optional, Text
class install(Command):
user: bool
prefix: Optional[Text]
home: Optional[Text]
root: Optional[Text]
install_lib: Optional[Text]
def initialize_options(self) -> None: ...
def finalize_options(self) -> None: ...
def run(self) -> None: ...

View File

@@ -0,0 +1,10 @@
from distutils.cmd import Command
from typing import ClassVar, List, Optional, Tuple
class install_egg_info(Command):
description: ClassVar[str]
user_options: ClassVar[List[Tuple[str, Optional[str], str]]]
def initialize_options(self) -> None: ...
def finalize_options(self) -> None: ...
def run(self) -> None: ...
def get_outputs(self) -> List[str]: ...

View File

@@ -0,0 +1,8 @@
from distutils.config import PyPIRCCommand
from typing import ClassVar, List, Optional, Tuple
class upload(PyPIRCCommand):
description: ClassVar[str]
boolean_options: ClassVar[List[str]]
def run(self) -> None: ...
def upload_file(self, command, pyversion, filename) -> None: ...

View File

@@ -0,0 +1,17 @@
from abc import abstractmethod
from distutils.cmd import Command
from typing import ClassVar, List, Optional, Tuple
DEFAULT_PYPIRC: str
class PyPIRCCommand(Command):
DEFAULT_REPOSITORY: ClassVar[str]
DEFAULT_REALM: ClassVar[str]
repository: None
realm: None
user_options: ClassVar[List[Tuple[str, Optional[str], str]]]
boolean_options: ClassVar[List[str]]
def initialize_options(self) -> None: ...
def finalize_options(self) -> None: ...
@abstractmethod
def run(self) -> None: ...

View File

@@ -0,0 +1,48 @@
from distutils.cmd import Command as Command
from distutils.dist import Distribution as Distribution
from distutils.extension import Extension as Extension
from typing import Any, List, Mapping, Optional, Tuple, Type, Union
def setup(
*,
name: str = ...,
version: str = ...,
description: str = ...,
long_description: str = ...,
author: str = ...,
author_email: str = ...,
maintainer: str = ...,
maintainer_email: str = ...,
url: str = ...,
download_url: str = ...,
packages: List[str] = ...,
py_modules: List[str] = ...,
scripts: List[str] = ...,
ext_modules: List[Extension] = ...,
classifiers: List[str] = ...,
distclass: Type[Distribution] = ...,
script_name: str = ...,
script_args: List[str] = ...,
options: Mapping[str, Any] = ...,
license: str = ...,
keywords: Union[List[str], str] = ...,
platforms: Union[List[str], str] = ...,
cmdclass: Mapping[str, Type[Command]] = ...,
data_files: List[Tuple[str, List[str]]] = ...,
package_dir: Mapping[str, str] = ...,
obsoletes: List[str] = ...,
provides: List[str] = ...,
requires: List[str] = ...,
command_packages: List[str] = ...,
command_options: Mapping[str, Mapping[str, Tuple[Any, Any]]] = ...,
package_data: Mapping[str, List[str]] = ...,
include_package_data: bool = ...,
libraries: List[str] = ...,
headers: List[str] = ...,
ext_package: str = ...,
include_dirs: List[str] = ...,
password: str = ...,
fullname: str = ...,
**attrs: Any,
) -> None: ...
def run_setup(script_name: str, script_args: Optional[List[str]] = ..., stop_after: str = ...) -> Distribution: ...

View File

@@ -0,0 +1,4 @@
from distutils.unixccompiler import UnixCCompiler
class CygwinCCompiler(UnixCCompiler): ...
class Mingw32CCompiler(CygwinCCompiler): ...

View File

@@ -0,0 +1 @@
DEBUG: bool

View File

@@ -0,0 +1,5 @@
from typing import List, Tuple
def newer(source: str, target: str) -> bool: ...
def newer_pairwise(sources: List[str], targets: List[str]) -> List[Tuple[str, str]]: ...
def newer_group(sources: List[str], target: str, missing: str = ...) -> bool: ...

View File

@@ -0,0 +1,15 @@
from typing import List
def mkpath(name: str, mode: int = ..., verbose: int = ..., dry_run: int = ...) -> List[str]: ...
def create_tree(base_dir: str, files: List[str], mode: int = ..., verbose: int = ..., dry_run: int = ...) -> None: ...
def copy_tree(
src: str,
dst: str,
preserve_mode: int = ...,
preserve_times: int = ...,
preserve_symlinks: int = ...,
update: int = ...,
verbose: int = ...,
dry_run: int = ...,
) -> List[str]: ...
def remove_tree(directory: str, verbose: int = ..., dry_run: int = ...) -> None: ...

View File

@@ -0,0 +1,9 @@
from distutils.cmd import Command
from typing import Any, Dict, Iterable, Mapping, Optional, Text, Tuple, Type
class Distribution:
cmdclass: Dict[str, Type[Command]]
def __init__(self, attrs: Optional[Mapping[str, Any]] = ...) -> None: ...
def get_option_dict(self, command: str) -> Dict[str, Tuple[str, Text]]: ...
def parse_config_files(self, filenames: Optional[Iterable[Text]] = ...) -> None: ...
def get_command_obj(self, command: str, create: bool = ...) -> Optional[Command]: ...

View File

@@ -0,0 +1,3 @@
from distutils.unixccompiler import UnixCCompiler
class EMXCCompiler(UnixCCompiler): ...

View File

@@ -0,0 +1,19 @@
class DistutilsError(Exception): ...
class DistutilsModuleError(DistutilsError): ...
class DistutilsClassError(DistutilsError): ...
class DistutilsGetoptError(DistutilsError): ...
class DistutilsArgError(DistutilsError): ...
class DistutilsFileError(DistutilsError): ...
class DistutilsOptionError(DistutilsError): ...
class DistutilsSetupError(DistutilsError): ...
class DistutilsPlatformError(DistutilsError): ...
class DistutilsExecError(DistutilsError): ...
class DistutilsInternalError(DistutilsError): ...
class DistutilsTemplateError(DistutilsError): ...
class DistutilsByteCompileError(DistutilsError): ...
class CCompilerError(Exception): ...
class PreprocessError(CCompilerError): ...
class CompileError(CCompilerError): ...
class LibError(CCompilerError): ...
class LinkError(CCompilerError): ...
class UnknownFileError(CCompilerError): ...

View File

@@ -0,0 +1,21 @@
from typing import List, Optional, Tuple
class Extension:
def __init__(
self,
name: str,
sources: List[str],
include_dirs: List[str] = ...,
define_macros: List[Tuple[str, Optional[str]]] = ...,
undef_macros: List[str] = ...,
library_dirs: List[str] = ...,
libraries: List[str] = ...,
runtime_library_dirs: List[str] = ...,
extra_objects: List[str] = ...,
extra_compile_args: List[str] = ...,
extra_link_args: List[str] = ...,
export_symbols: List[str] = ...,
swig_opts: Optional[str] = ..., # undocumented
depends: List[str] = ...,
language: str = ...,
) -> None: ...

View File

@@ -0,0 +1,21 @@
from typing import Any, List, Mapping, Optional, Tuple, Union, overload
_Option = Tuple[str, Optional[str], str]
_GR = Tuple[List[str], OptionDummy]
def fancy_getopt(
options: List[_Option], negative_opt: Mapping[_Option, _Option], object: Any, args: Optional[List[str]]
) -> Union[List[str], _GR]: ...
def wrap_text(text: str, width: int) -> List[str]: ...
class FancyGetopt:
def __init__(self, option_table: Optional[List[_Option]] = ...) -> None: ...
# TODO kinda wrong, `getopt(object=object())` is invalid
@overload
def getopt(self, args: Optional[List[str]] = ...) -> _GR: ...
@overload
def getopt(self, args: Optional[List[str]], object: Any) -> List[str]: ...
def get_option_order(self) -> List[Tuple[str, str]]: ...
def generate_help(self, header: Optional[str] = ...) -> List[str]: ...
class OptionDummy: ...

View File

@@ -0,0 +1,14 @@
from typing import Optional, Sequence, Tuple
def copy_file(
src: str,
dst: str,
preserve_mode: bool = ...,
preserve_times: bool = ...,
update: bool = ...,
link: Optional[str] = ...,
verbose: bool = ...,
dry_run: bool = ...,
) -> Tuple[str, str]: ...
def move_file(src: str, dst: str, verbose: bool = ..., dry_run: bool = ...) -> str: ...
def write_file(filename: str, contents: Sequence[str]) -> None: ...

View File

@@ -0,0 +1 @@
class FileList: ...

View File

@@ -0,0 +1,25 @@
from typing import Any, Text
DEBUG: int
INFO: int
WARN: int
ERROR: int
FATAL: int
class Log:
def __init__(self, threshold: int = ...) -> None: ...
def log(self, level: int, msg: Text, *args: Any) -> None: ...
def debug(self, msg: Text, *args: Any) -> None: ...
def info(self, msg: Text, *args: Any) -> None: ...
def warn(self, msg: Text, *args: Any) -> None: ...
def error(self, msg: Text, *args: Any) -> None: ...
def fatal(self, msg: Text, *args: Any) -> None: ...
def log(level: int, msg: Text, *args: Any) -> None: ...
def debug(msg: Text, *args: Any) -> None: ...
def info(msg: Text, *args: Any) -> None: ...
def warn(msg: Text, *args: Any) -> None: ...
def error(msg: Text, *args: Any) -> None: ...
def fatal(msg: Text, *args: Any) -> None: ...
def set_threshold(level: int) -> int: ...
def set_verbosity(v: int) -> None: ...

View File

@@ -0,0 +1,3 @@
from distutils.ccompiler import CCompiler
class MSVCCompiler(CCompiler): ...

View File

@@ -0,0 +1,4 @@
from typing import List, Optional
def spawn(cmd: List[str], search_path: bool = ..., verbose: bool = ..., dry_run: bool = ...) -> None: ...
def find_executable(executable: str, path: Optional[str] = ...) -> Optional[str]: ...

View File

@@ -0,0 +1,14 @@
from distutils.ccompiler import CCompiler
from typing import Mapping, Optional, Union
PREFIX: str
EXEC_PREFIX: str
def get_config_var(name: str) -> Union[int, str, None]: ...
def get_config_vars(*args: str) -> Mapping[str, Union[int, str]]: ...
def get_config_h_filename() -> str: ...
def get_makefile_filename() -> str: ...
def get_python_inc(plat_specific: bool = ..., prefix: Optional[str] = ...) -> str: ...
def get_python_lib(plat_specific: bool = ..., standard_lib: bool = ..., prefix: Optional[str] = ...) -> str: ...
def customize_compiler(compiler: CCompiler) -> None: ...
def set_python_build() -> None: ...

View File

@@ -0,0 +1,21 @@
from typing import IO, List, Optional, Tuple, Union
class TextFile:
def __init__(
self,
filename: Optional[str] = ...,
file: Optional[IO[str]] = ...,
*,
strip_comments: bool = ...,
lstrip_ws: bool = ...,
rstrip_ws: bool = ...,
skip_blanks: bool = ...,
join_lines: bool = ...,
collapse_join: bool = ...,
) -> None: ...
def open(self, filename: str) -> None: ...
def close(self) -> None: ...
def warn(self, msg: str, line: Union[List[int], Tuple[int, int], int] = ...) -> None: ...
def readline(self) -> Optional[str]: ...
def readlines(self) -> List[str]: ...
def unreadline(self, line: str) -> str: ...

View File

@@ -0,0 +1,3 @@
from distutils.ccompiler import CCompiler
class UnixCCompiler(CCompiler): ...

View File

@@ -0,0 +1,23 @@
from typing import Any, Callable, List, Mapping, Optional, Tuple
def get_platform() -> str: ...
def convert_path(pathname: str) -> str: ...
def change_root(new_root: str, pathname: str) -> str: ...
def check_environ() -> None: ...
def subst_vars(s: str, local_vars: Mapping[str, str]) -> None: ...
def split_quoted(s: str) -> List[str]: ...
def execute(
func: Callable[..., None], args: Tuple[Any, ...], msg: Optional[str] = ..., verbose: bool = ..., dry_run: bool = ...
) -> None: ...
def strtobool(val: str) -> bool: ...
def byte_compile(
py_files: List[str],
optimize: int = ...,
force: bool = ...,
prefix: Optional[str] = ...,
base_dir: Optional[str] = ...,
verbose: bool = ...,
dry_run: bool = ...,
direct: Optional[bool] = ...,
) -> None: ...
def rfc822_escape(header: str) -> str: ...

View File

@@ -0,0 +1,33 @@
from abc import abstractmethod
from typing import Optional, Pattern, Text, Tuple, TypeVar, Union
_T = TypeVar("_T", bound=Version)
class Version:
def __repr__(self) -> str: ...
@abstractmethod
def __init__(self, vstring: Optional[Text] = ...) -> None: ...
@abstractmethod
def parse(self: _T, vstring: Text) -> _T: ...
@abstractmethod
def __str__(self) -> str: ...
@abstractmethod
def __cmp__(self: _T, other: Union[_T, str]) -> bool: ...
class StrictVersion(Version):
version_re: Pattern[str]
version: Tuple[int, int, int]
prerelease: Optional[Tuple[Text, int]]
def __init__(self, vstring: Optional[Text] = ...) -> None: ...
def parse(self: _T, vstring: Text) -> _T: ...
def __str__(self) -> str: ...
def __cmp__(self: _T, other: Union[_T, str]) -> bool: ...
class LooseVersion(Version):
component_re: Pattern[str]
vstring: Text
version: Tuple[Union[Text, int], ...]
def __init__(self, vstring: Optional[Text] = ...) -> None: ...
def parse(self: _T, vstring: Text) -> _T: ...
def __str__(self) -> str: ...
def __cmp__(self: _T, other: Union[_T, str]) -> bool: ...