apply black and isort (#4287)

* apply black and isort

* move some type ignores
This commit is contained in:
Jelle Zijlstra
2020-06-28 13:31:00 -07:00
committed by GitHub
parent fe58699ca5
commit 5d553c9584
800 changed files with 13875 additions and 10332 deletions

View File

@@ -2,11 +2,13 @@
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: ...
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

@@ -2,5 +2,4 @@
from distutils.ccompiler import CCompiler
class BCPPCompiler(CCompiler): ...

View File

@@ -2,20 +2,16 @@
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 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:
@@ -29,8 +25,7 @@ class CCompiler:
library_dirs: List[str]
runtime_library_dirs: List[str]
objects: List[str]
def __init__(self, verbose: int = ..., dry_run: int = ...,
force: int = ...) -> None: ...
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: ...
@@ -44,83 +39,111 @@ class CCompiler:
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 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 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: ...

View File

@@ -1,8 +1,8 @@
# Stubs for distutils.cmd
from typing import Callable, List, Tuple, Union, Optional, Iterable, Any, Text
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]]]]
@@ -13,28 +13,57 @@ class Command:
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 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
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

@@ -1,10 +1,9 @@
from distutils.cmd import Command
import sys
from distutils.cmd import Command
if sys.version_info >= (3,):
class build_py(Command):
def initialize_options(self) -> None: ...
def finalize_options(self) -> None: ...
def run(self) -> None: ...
class build_py_2to3(build_py): ...

View File

@@ -1,14 +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

@@ -1,9 +1,9 @@
# Stubs for distutils.core
from typing import Any, List, Mapping, Optional, Tuple, Type, Union
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(
*,

View File

@@ -2,6 +2,5 @@
from distutils.unixccompiler import UnixCCompiler
class CygwinCCompiler(UnixCCompiler): ...
class Mingw32CCompiler(CygwinCCompiler): ...

View File

@@ -3,6 +3,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_pairwise(sources: List[str], targets: List[str]) -> List[Tuple[str, str]]: ...
def newer_group(sources: List[str], target: str, missing: str = ...) -> bool: ...

View File

@@ -2,14 +2,16 @@
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: ...
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

@@ -1,9 +1,7 @@
# Stubs for distutils.dist
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: ...

View File

@@ -1,41 +1,45 @@
# Stubs for distutils.extension
from typing import List, Optional, Tuple
import sys
from typing import List, Optional, Tuple
class Extension:
if sys.version_info >= (3,):
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 = ...,
optional: bool = ...) -> None: ...
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 = ...,
optional: bool = ...,
) -> None: ...
else:
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: ...
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

@@ -1,17 +1,13 @@
# Stubs for distutils.fancy_getopt
from typing import (
Any, List, Mapping, Optional, Tuple, Union,
TypeVar, overload,
)
from typing import Any, List, Mapping, Optional, Tuple, TypeVar, 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 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:

View File

@@ -2,11 +2,15 @@
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 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

@@ -2,5 +2,4 @@
from distutils.ccompiler import CCompiler
class MSVCCompiler(CCompiler): ...

View File

@@ -2,7 +2,5 @@
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]: ...
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

@@ -1,7 +1,7 @@
# Stubs for distutils.sysconfig
from typing import Mapping, Optional, Union
from distutils.ccompiler import CCompiler
from typing import Mapping, Optional, Union
PREFIX: str
EXEC_PREFIX: str
@@ -10,10 +10,7 @@ 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 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

@@ -3,16 +3,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 __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 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

@@ -2,5 +2,4 @@
from distutils.ccompiler import CCompiler
class UnixCCompiler(CCompiler): ...

View File

@@ -2,19 +2,24 @@
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 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 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

@@ -1,19 +1,17 @@
import sys
from abc import abstractmethod
from typing import Any, Optional, TypeVar, Union, Pattern, Text, Tuple
from typing import Any, Optional, Pattern, Text, Tuple, TypeVar, Union
_T = TypeVar('_T', bound=Version)
_T = TypeVar("_T", bound=Version)
class Version:
def __repr__(self) -> str: ...
if sys.version_info >= (3,):
def __eq__(self, other: object) -> bool: ...
def __lt__(self: _T, other: Union[_T, str]) -> bool: ...
def __le__(self: _T, other: Union[_T, str]) -> bool: ...
def __gt__(self: _T, other: Union[_T, str]) -> bool: ...
def __ge__(self: _T, other: Union[_T, str]) -> bool: ...
@abstractmethod
def __init__(self, vstring: Optional[Text] = ...) -> None: ...
@abstractmethod
@@ -31,7 +29,6 @@ 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: ...
@@ -44,7 +41,6 @@ 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: ...