From ef887b7beb37b7a5422fe67cab21d26f540bccef Mon Sep 17 00:00:00 2001 From: Peter Pentchev Date: Sun, 22 May 2022 00:31:31 +0300 Subject: [PATCH] More setuptools.command.easy_install definitions. (#7145) Co-authored-by: Sebastian Rittau Co-authored-by: Akuli --- .../setuptools/command/easy_install.pyi | 25 ++++++++++--------- 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/stubs/setuptools/setuptools/command/easy_install.pyi b/stubs/setuptools/setuptools/command/easy_install.pyi index 6d7bc390a..0336bfe0d 100644 --- a/stubs/setuptools/setuptools/command/easy_install.pyi +++ b/stubs/setuptools/setuptools/command/easy_install.pyi @@ -1,3 +1,4 @@ +from collections.abc import Iterator from typing import Any from pkg_resources import Environment @@ -110,15 +111,15 @@ class CommandSpec(list[str]): options: Any split_args: Any @classmethod - def best(cls): ... + def best(cls) -> type[CommandSpec]: ... @classmethod - def from_param(cls, param): ... + def from_param(cls, param) -> CommandSpec: ... @classmethod - def from_environment(cls): ... + def from_environment(cls) -> CommandSpec: ... @classmethod - def from_string(cls, string): ... - def install_options(self, script_text) -> None: ... - def as_header(self): ... + def from_string(cls, string: str) -> CommandSpec: ... + def install_options(self, script_text: str) -> None: ... + def as_header(self) -> str: ... class WindowsCommandSpec(CommandSpec): split_args: Any @@ -127,17 +128,17 @@ class ScriptWriter: template: Any command_spec_class: Any @classmethod - def get_script_args(cls, dist, executable: Any | None = ..., wininst: bool = ...): ... + def get_script_args(cls, dist, executable: Any | None = ..., wininst: bool = ...) -> Iterator[tuple[str, str]]: ... @classmethod - def get_script_header(cls, script_text, executable: Any | None = ..., wininst: bool = ...): ... + def get_script_header(cls, script_text, executable: Any | None = ..., wininst: bool = ...) -> str: ... @classmethod - def get_args(cls, dist, header: Any | None = ...) -> None: ... + def get_args(cls, dist, header: Any | None = ...) -> Iterator[tuple[str, str]]: ... @classmethod - def get_writer(cls, force_windows): ... + def get_writer(cls, force_windows: bool) -> type[ScriptWriter]: ... @classmethod - def best(cls): ... + def best(cls) -> type[ScriptWriter]: ... @classmethod - def get_header(cls, script_text: str = ..., executable: Any | None = ...): ... + def get_header(cls, script_text: str = ..., executable: Any | None = ...) -> str: ... class WindowsScriptWriter(ScriptWriter): command_spec_class: Any