stdlib: add argument default values (#9501)

This commit is contained in:
Jelle Zijlstra
2023-01-18 00:37:34 -08:00
committed by GitHub
parent 6cb934291f
commit ddfaca3200
272 changed files with 2529 additions and 2467 deletions

View File

@@ -1,20 +1,20 @@
def make_archive(
base_name: str,
format: str,
root_dir: str | None = ...,
base_dir: str | None = ...,
verbose: int = ...,
dry_run: int = ...,
owner: str | None = ...,
group: str | None = ...,
root_dir: str | None = None,
base_dir: str | None = None,
verbose: int = 0,
dry_run: int = 0,
owner: str | None = None,
group: str | None = None,
) -> str: ...
def make_tarball(
base_name: str,
base_dir: str,
compress: str | None = ...,
verbose: int = ...,
dry_run: int = ...,
owner: str | None = ...,
group: str | None = ...,
compress: str | None = "gzip",
verbose: int = 0,
dry_run: int = 0,
owner: str | None = None,
group: str | None = None,
) -> str: ...
def make_zipfile(base_name: str, base_dir: str, verbose: int = ..., dry_run: int = ...) -> str: ...
def make_zipfile(base_name: str, base_dir: str, verbose: int = 0, dry_run: int = 0) -> str: ...

View File

@@ -8,9 +8,9 @@ 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: str | None = ..., platform: str | None = ...) -> str: ...
def get_default_compiler(osname: str | None = None, platform: str | None = None) -> str: ...
def new_compiler(
plat: str | None = ..., compiler: str | None = ..., verbose: int = ..., dry_run: int = ..., force: int = ...
plat: str | None = None, compiler: str | None = None, verbose: int = 0, dry_run: int = 0, force: int = 0
) -> CCompiler: ...
def show_compilers() -> None: ...
@@ -25,7 +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 = 0, dry_run: int = 0, force: int = 0) -> 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: ...
@@ -34,7 +34,7 @@ class CCompiler:
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: str | None = ...) -> None: ...
def define_macro(self, name: str, value: str | None = None) -> 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: ...
@@ -43,10 +43,10 @@ class CCompiler:
def has_function(
self,
funcname: str,
includes: list[str] | None = ...,
include_dirs: list[str] | None = ...,
libraries: list[str] | None = ...,
library_dirs: list[str] | None = ...,
includes: list[str] | None = None,
include_dirs: list[str] | None = None,
libraries: list[str] | None = None,
library_dirs: list[str] | None = None,
) -> bool: ...
def library_dir_option(self, dir: str) -> str: ...
def library_option(self, lib: str) -> str: ...
@@ -55,98 +55,98 @@ class CCompiler:
def compile(
self,
sources: list[str],
output_dir: str | None = ...,
macros: _Macro | None = ...,
include_dirs: list[str] | None = ...,
output_dir: str | None = None,
macros: _Macro | None = None,
include_dirs: list[str] | None = None,
debug: bool = ...,
extra_preargs: list[str] | None = ...,
extra_postargs: list[str] | None = ...,
depends: list[str] | None = ...,
extra_preargs: list[str] | None = None,
extra_postargs: list[str] | None = None,
depends: list[str] | None = None,
) -> list[str]: ...
def create_static_lib(
self,
objects: list[str],
output_libname: str,
output_dir: str | None = ...,
output_dir: str | None = None,
debug: bool = ...,
target_lang: str | None = ...,
target_lang: str | None = None,
) -> None: ...
def link(
self,
target_desc: str,
objects: list[str],
output_filename: str,
output_dir: str | None = ...,
libraries: list[str] | None = ...,
library_dirs: list[str] | None = ...,
runtime_library_dirs: list[str] | None = ...,
export_symbols: list[str] | None = ...,
output_dir: str | None = None,
libraries: list[str] | None = None,
library_dirs: list[str] | None = None,
runtime_library_dirs: list[str] | None = None,
export_symbols: list[str] | None = None,
debug: bool = ...,
extra_preargs: list[str] | None = ...,
extra_postargs: list[str] | None = ...,
build_temp: str | None = ...,
target_lang: str | None = ...,
extra_preargs: list[str] | None = None,
extra_postargs: list[str] | None = None,
build_temp: str | None = None,
target_lang: str | None = None,
) -> None: ...
def link_executable(
self,
objects: list[str],
output_progname: str,
output_dir: str | None = ...,
libraries: list[str] | None = ...,
library_dirs: list[str] | None = ...,
runtime_library_dirs: list[str] | None = ...,
output_dir: str | None = None,
libraries: list[str] | None = None,
library_dirs: list[str] | None = None,
runtime_library_dirs: list[str] | None = None,
debug: bool = ...,
extra_preargs: list[str] | None = ...,
extra_postargs: list[str] | None = ...,
target_lang: str | None = ...,
extra_preargs: list[str] | None = None,
extra_postargs: list[str] | None = None,
target_lang: str | None = None,
) -> None: ...
def link_shared_lib(
self,
objects: list[str],
output_libname: str,
output_dir: str | None = ...,
libraries: list[str] | None = ...,
library_dirs: list[str] | None = ...,
runtime_library_dirs: list[str] | None = ...,
export_symbols: list[str] | None = ...,
output_dir: str | None = None,
libraries: list[str] | None = None,
library_dirs: list[str] | None = None,
runtime_library_dirs: list[str] | None = None,
export_symbols: list[str] | None = None,
debug: bool = ...,
extra_preargs: list[str] | None = ...,
extra_postargs: list[str] | None = ...,
build_temp: str | None = ...,
target_lang: str | None = ...,
extra_preargs: list[str] | None = None,
extra_postargs: list[str] | None = None,
build_temp: str | None = None,
target_lang: str | None = None,
) -> None: ...
def link_shared_object(
self,
objects: list[str],
output_filename: str,
output_dir: str | None = ...,
libraries: list[str] | None = ...,
library_dirs: list[str] | None = ...,
runtime_library_dirs: list[str] | None = ...,
export_symbols: list[str] | None = ...,
output_dir: str | None = None,
libraries: list[str] | None = None,
library_dirs: list[str] | None = None,
runtime_library_dirs: list[str] | None = None,
export_symbols: list[str] | None = None,
debug: bool = ...,
extra_preargs: list[str] | None = ...,
extra_postargs: list[str] | None = ...,
build_temp: str | None = ...,
target_lang: str | None = ...,
extra_preargs: list[str] | None = None,
extra_postargs: list[str] | None = None,
build_temp: str | None = None,
target_lang: str | None = None,
) -> None: ...
def preprocess(
self,
source: str,
output_file: str | None = ...,
macros: list[_Macro] | None = ...,
include_dirs: list[str] | None = ...,
extra_preargs: list[str] | None = ...,
extra_postargs: list[str] | None = ...,
output_file: str | None = None,
macros: list[_Macro] | None = None,
include_dirs: list[str] | None = None,
extra_preargs: list[str] | None = None,
extra_postargs: list[str] | None = None,
) -> 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[..., object], args: tuple[Any, ...], msg: str | None = ..., level: int = ...) -> None: ...
def executable_filename(self, basename: str, strip_dir: int = 0, output_dir: str = "") -> str: ...
def library_filename(self, libname: str, lib_type: str = "static", strip_dir: int = 0, output_dir: str = "") -> str: ...
def object_filenames(self, source_filenames: list[str], strip_dir: int = 0, output_dir: str = "") -> list[str]: ...
def shared_object_filename(self, basename: str, strip_dir: int = 0, output_dir: str = "") -> str: ...
def execute(self, func: Callable[..., object], args: tuple[Any, ...], msg: str | None = None, level: int = 1) -> None: ...
def spawn(self, cmd: list[str]) -> None: ...
def mkpath(self, name: str, mode: int = ...) -> None: ...
def mkpath(self, name: str, mode: int = 511) -> None: ...
def move_file(self, src: str, dst: str) -> str: ...
def announce(self, msg: str, level: int = ...) -> None: ...
def announce(self, msg: str, level: int = 1) -> None: ...
def warn(self, msg: str) -> None: ...
def debug_print(self, msg: str) -> None: ...

View File

@@ -12,49 +12,43 @@ class Command:
def finalize_options(self) -> None: ...
@abstractmethod
def run(self) -> None: ...
def announce(self, msg: str, level: int = ...) -> None: ...
def announce(self, msg: str, level: int = 1) -> None: ...
def debug_print(self, msg: str) -> None: ...
def ensure_string(self, option: str, default: str | None = ...) -> None: ...
def ensure_string(self, option: str, default: str | None = None) -> None: ...
def ensure_string_list(self, option: 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: str, *option_pairs: tuple[str, str]) -> None: ...
def get_finalized_command(self, command: str, create: int = ...) -> Command: ...
def reinitialize_command(self, command: Command | str, reinit_subcommands: int = ...) -> Command: ...
def get_finalized_command(self, command: str, create: int = 1) -> Command: ...
def reinitialize_command(self, command: Command | str, reinit_subcommands: int = 0) -> Command: ...
def run_command(self, command: str) -> None: ...
def get_sub_commands(self) -> list[str]: ...
def warn(self, msg: str) -> None: ...
def execute(self, func: Callable[..., object], args: Iterable[Any], msg: str | None = ..., level: int = ...) -> None: ...
def mkpath(self, name: str, mode: int = ...) -> None: ...
def execute(self, func: Callable[..., object], args: Iterable[Any], msg: str | None = None, level: int = 1) -> None: ...
def mkpath(self, name: str, mode: int = 511) -> None: ...
def copy_file(
self,
infile: str,
outfile: str,
preserve_mode: int = ...,
preserve_times: int = ...,
link: str | None = ...,
level: Any = ...,
self, infile: str, outfile: str, preserve_mode: int = 1, preserve_times: int = 1, link: str | None = None, level: Any = 1
) -> 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 = ...,
preserve_mode: int = 1,
preserve_times: int = 1,
preserve_symlinks: int = 0,
level: Any = 1,
) -> 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 move_file(self, src: str, dst: str, level: Any = 1) -> str: ... # level is not used
def spawn(self, cmd: Iterable[str], search_path: int = 1, level: Any = 1) -> None: ... # level is not used
def make_archive(
self,
base_name: str,
format: str,
root_dir: str | None = ...,
base_dir: str | None = ...,
owner: str | None = ...,
group: str | None = ...,
root_dir: str | None = None,
base_dir: str | None = None,
owner: str | None = None,
group: str | None = None,
) -> str: ...
def make_file(
self,
@@ -62,7 +56,7 @@ class Command:
outfile: str,
func: Callable[..., object],
args: list[Any],
exec_msg: str | None = ...,
skip_msg: str | None = ...,
level: Any = ...,
exec_msg: str | None = None,
skip_msg: str | None = None,
level: Any = 1,
) -> None: ... # level is not used

View File

@@ -32,7 +32,7 @@ class build_py(Command):
def find_all_modules(self): ...
def get_source_files(self): ...
def get_module_outfile(self, build_dir, package, module): ...
def get_outputs(self, include_bytecode: int = ...): ...
def get_outputs(self, include_bytecode: int = 1): ...
def build_module(self, module, module_file, package): ...
def build_modules(self) -> None: ...
def build_packages(self) -> None: ...

View File

@@ -24,60 +24,60 @@ class config(Command):
def run(self) -> None: ...
def try_cpp(
self,
body: str | None = ...,
headers: Sequence[str] | None = ...,
include_dirs: Sequence[str] | None = ...,
lang: str = ...,
body: str | None = None,
headers: Sequence[str] | None = None,
include_dirs: Sequence[str] | None = None,
lang: str = "c",
) -> bool: ...
def search_cpp(
self,
pattern: Pattern[str] | str,
body: str | None = ...,
headers: Sequence[str] | None = ...,
include_dirs: Sequence[str] | None = ...,
lang: str = ...,
body: str | None = None,
headers: Sequence[str] | None = None,
include_dirs: Sequence[str] | None = None,
lang: str = "c",
) -> bool: ...
def try_compile(
self, body: str, headers: Sequence[str] | None = ..., include_dirs: Sequence[str] | None = ..., lang: str = ...
self, body: str, headers: Sequence[str] | None = None, include_dirs: Sequence[str] | None = None, lang: str = "c"
) -> bool: ...
def try_link(
self,
body: str,
headers: Sequence[str] | None = ...,
include_dirs: Sequence[str] | None = ...,
libraries: Sequence[str] | None = ...,
library_dirs: Sequence[str] | None = ...,
lang: str = ...,
headers: Sequence[str] | None = None,
include_dirs: Sequence[str] | None = None,
libraries: Sequence[str] | None = None,
library_dirs: Sequence[str] | None = None,
lang: str = "c",
) -> bool: ...
def try_run(
self,
body: str,
headers: Sequence[str] | None = ...,
include_dirs: Sequence[str] | None = ...,
libraries: Sequence[str] | None = ...,
library_dirs: Sequence[str] | None = ...,
lang: str = ...,
headers: Sequence[str] | None = None,
include_dirs: Sequence[str] | None = None,
libraries: Sequence[str] | None = None,
library_dirs: Sequence[str] | None = None,
lang: str = "c",
) -> bool: ...
def check_func(
self,
func: str,
headers: Sequence[str] | None = ...,
include_dirs: Sequence[str] | None = ...,
libraries: Sequence[str] | None = ...,
library_dirs: Sequence[str] | None = ...,
decl: int = ...,
call: int = ...,
headers: Sequence[str] | None = None,
include_dirs: Sequence[str] | None = None,
libraries: Sequence[str] | None = None,
library_dirs: Sequence[str] | None = None,
decl: int = 0,
call: int = 0,
) -> bool: ...
def check_lib(
self,
library: str,
library_dirs: Sequence[str] | None = ...,
headers: Sequence[str] | None = ...,
include_dirs: Sequence[str] | None = ...,
library_dirs: Sequence[str] | None = None,
headers: Sequence[str] | None = None,
include_dirs: Sequence[str] | None = None,
other_libraries: list[str] = ...,
) -> bool: ...
def check_header(
self, header: str, include_dirs: Sequence[str] | None = ..., library_dirs: Sequence[str] | None = ..., lang: str = ...
self, header: str, include_dirs: Sequence[str] | None = None, library_dirs: Sequence[str] | None = None, lang: str = "c"
) -> bool: ...
def dump_file(filename: str, head: Any | None = ...) -> None: ...
def dump_file(filename: str, head: Any | None = None) -> None: ...

View File

@@ -15,4 +15,4 @@ class register(PyPIRCCommand):
def verify_metadata(self) -> None: ...
def send_metadata(self) -> None: ...
def build_post_data(self, action): ...
def post_to_server(self, data, auth: Any | None = ...): ...
def post_to_server(self, data, auth: Any | None = None): ...

View File

@@ -46,4 +46,4 @@ def setup(
fullname: str = ...,
**attrs: Any,
) -> None: ...
def run_setup(script_name: str, script_args: list[str] | None = ..., stop_after: str = ...) -> Distribution: ...
def run_setup(script_name: str, script_args: list[str] | None = None, stop_after: str = "run") -> Distribution: ...

View File

@@ -1,3 +1,3 @@
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: ...
def newer_group(sources: list[str], target: str, missing: str = "error") -> bool: ...

View File

@@ -1,13 +1,13 @@
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 mkpath(name: str, mode: int = 511, verbose: int = 1, dry_run: int = 0) -> list[str]: ...
def create_tree(base_dir: str, files: list[str], mode: int = 511, verbose: int = 1, dry_run: int = 0) -> None: ...
def copy_tree(
src: str,
dst: str,
preserve_mode: int = ...,
preserve_times: int = ...,
preserve_symlinks: int = ...,
update: int = ...,
verbose: int = ...,
dry_run: int = ...,
preserve_mode: int = 1,
preserve_times: int = 1,
preserve_symlinks: int = 0,
update: int = 0,
verbose: int = 1,
dry_run: int = 0,
) -> list[str]: ...
def remove_tree(directory: str, verbose: int = ..., dry_run: int = ...) -> None: ...
def remove_tree(directory: str, verbose: int = 1, dry_run: int = 0) -> None: ...

View File

@@ -4,7 +4,7 @@ from distutils.cmd import Command
from typing import IO, Any
class DistributionMetadata:
def __init__(self, path: FileDescriptorOrPath | None = ...) -> None: ...
def __init__(self, path: FileDescriptorOrPath | None = None) -> None: ...
name: str | None
version: str | None
author: str | None
@@ -53,7 +53,7 @@ class DistributionMetadata:
class Distribution:
cmdclass: dict[str, type[Command]]
metadata: DistributionMetadata
def __init__(self, attrs: Mapping[str, Any] | None = ...) -> None: ...
def __init__(self, attrs: Mapping[str, Any] | None = None) -> None: ...
def get_option_dict(self, command: str) -> dict[str, tuple[str, str]]: ...
def parse_config_files(self, filenames: Iterable[str] | None = ...) -> None: ...
def parse_config_files(self, filenames: Iterable[str] | None = None) -> None: ...
def get_command_obj(self, command: str, create: bool = ...) -> Command | None: ...

View File

@@ -11,14 +11,14 @@ def fancy_getopt(
def wrap_text(text: str, width: int) -> list[str]: ...
class FancyGetopt:
def __init__(self, option_table: list[_Option] | None = ...) -> None: ...
def __init__(self, option_table: list[_Option] | None = None) -> None: ...
# TODO kinda wrong, `getopt(object=object())` is invalid
@overload
def getopt(self, args: list[str] | None = ...) -> _GR: ...
@overload
def getopt(self, args: list[str] | None, object: Any) -> list[str]: ...
def get_option_order(self) -> list[tuple[str, str]]: ...
def generate_help(self, header: str | None = ...) -> list[str]: ...
def generate_help(self, header: str | None = None) -> list[str]: ...
class OptionDummy:
def __init__(self, options: Iterable[str] = ...) -> None: ...

View File

@@ -6,7 +6,7 @@ def copy_file(
preserve_mode: bool = ...,
preserve_times: bool = ...,
update: bool = ...,
link: str | None = ...,
link: str | None = None,
verbose: bool = ...,
dry_run: bool = ...,
) -> tuple[str, str]: ...

View File

@@ -7,9 +7,9 @@ from typing_extensions import Literal
class FileList:
allfiles: Iterable[str] | None
files: list[str]
def __init__(self, warn: None = ..., debug_print: None = ...) -> None: ...
def __init__(self, warn: None = None, debug_print: None = None) -> None: ...
def set_allfiles(self, allfiles: Iterable[str]) -> None: ...
def findall(self, dir: str = ...) -> None: ...
def findall(self, dir: str = ".") -> None: ...
def debug_print(self, msg: str) -> None: ...
def append(self, item: str) -> None: ...
def extend(self, items: Iterable[str]) -> None: ...
@@ -37,7 +37,7 @@ class FileList:
self, pattern: str | Pattern[str], anchor: bool | Literal[0, 1] = ..., prefix: str | None = ..., is_regex: int = ...
) -> bool: ...
def findall(dir: str = ...) -> list[str]: ...
def findall(dir: str = ".") -> list[str]: ...
def glob_to_re(pattern: str) -> str: ...
@overload
def translate_pattern(

View File

@@ -7,7 +7,7 @@ ERROR: int
FATAL: int
class Log:
def __init__(self, threshold: int = ...) -> None: ...
def __init__(self, threshold: int = 3) -> None: ...
def log(self, level: int, msg: str, *args: Any) -> None: ...
def debug(self, msg: str, *args: Any) -> None: ...
def info(self, msg: str, *args: Any) -> None: ...

View File

@@ -1,2 +1,2 @@
def spawn(cmd: list[str], search_path: bool = ..., verbose: bool = ..., dry_run: bool = ...) -> None: ...
def find_executable(executable: str, path: str | None = ...) -> str | None: ...
def find_executable(executable: str, path: str | None = None) -> str | None: ...

View File

@@ -8,6 +8,6 @@ def get_config_var(name: str) -> int | str | None: ...
def get_config_vars(*args: str) -> Mapping[str, int | str]: ...
def get_config_h_filename() -> str: ...
def get_makefile_filename() -> str: ...
def get_python_inc(plat_specific: bool = ..., prefix: str | None = ...) -> str: ...
def get_python_lib(plat_specific: bool = ..., standard_lib: bool = ..., prefix: str | None = ...) -> str: ...
def get_python_inc(plat_specific: bool = ..., prefix: str | None = None) -> str: ...
def get_python_lib(plat_specific: bool = ..., standard_lib: bool = ..., prefix: str | None = None) -> str: ...
def customize_compiler(compiler: CCompiler) -> None: ...

View File

@@ -3,8 +3,8 @@ from typing import IO
class TextFile:
def __init__(
self,
filename: str | None = ...,
file: IO[str] | None = ...,
filename: str | None = None,
file: IO[str] | None = None,
*,
strip_comments: bool = ...,
lstrip_ws: bool = ...,
@@ -15,7 +15,7 @@ class TextFile:
) -> None: ...
def open(self, filename: str) -> None: ...
def close(self) -> None: ...
def warn(self, msg: str, line: list[int] | tuple[int, int] | int | None = ...) -> None: ...
def warn(self, msg: str, line: list[int] | tuple[int, int] | int | None = None) -> None: ...
def readline(self) -> str | None: ...
def readlines(self) -> list[str]: ...
def unreadline(self, line: str) -> str: ...

View File

@@ -10,18 +10,18 @@ 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[..., object], args: tuple[Any, ...], msg: str | None = ..., verbose: bool = ..., dry_run: bool = ...
func: Callable[..., object], args: tuple[Any, ...], msg: str | None = None, verbose: bool = ..., dry_run: bool = ...
) -> None: ...
def strtobool(val: str) -> Literal[0, 1]: ...
def byte_compile(
py_files: list[str],
optimize: int = ...,
optimize: int = 0,
force: bool = ...,
prefix: str | None = ...,
base_dir: str | None = ...,
prefix: str | None = None,
base_dir: str | None = None,
verbose: bool = ...,
dry_run: bool = ...,
direct: bool | None = ...,
direct: bool | None = None,
) -> None: ...
def rfc822_escape(header: str) -> str: ...
def run_2to3(

View File

@@ -9,7 +9,7 @@ class Version:
def __gt__(self: Self, other: Self | str) -> bool: ...
def __ge__(self: Self, other: Self | str) -> bool: ...
@abstractmethod
def __init__(self, vstring: str | None = ...) -> None: ...
def __init__(self, vstring: str | None = None) -> None: ...
@abstractmethod
def parse(self: Self, vstring: str) -> Self: ...
@abstractmethod
@@ -21,7 +21,7 @@ class StrictVersion(Version):
version_re: Pattern[str]
version: tuple[int, int, int]
prerelease: tuple[str, int] | None
def __init__(self, vstring: str | None = ...) -> None: ...
def __init__(self, vstring: str | None = None) -> None: ...
def parse(self: Self, vstring: str) -> Self: ...
def __str__(self) -> str: ... # noqa: Y029
def _cmp(self: Self, other: Self | str) -> bool: ...
@@ -30,7 +30,7 @@ class LooseVersion(Version):
component_re: Pattern[str]
vstring: str
version: tuple[str | int, ...]
def __init__(self, vstring: str | None = ...) -> None: ...
def __init__(self, vstring: str | None = None) -> None: ...
def parse(self: Self, vstring: str) -> Self: ...
def __str__(self) -> str: ... # noqa: Y029
def _cmp(self: Self, other: Self | str) -> bool: ...