mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-03-07 07:31:55 +08:00
Reduce use of deprecated typing aliases (#6358)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
from typing import Any, Callable, ContextManager, Iterable, Mapping, NoReturn, Optional, Sequence, Set, Tuple, TypeVar, Union
|
||||
from typing import Any, Callable, ContextManager, Iterable, Mapping, NoReturn, Optional, Sequence, Tuple, TypeVar, Union
|
||||
|
||||
from click.formatting import HelpFormatter
|
||||
from click.parser import OptionParser
|
||||
@@ -125,7 +125,7 @@ class Command(BaseCommand):
|
||||
def get_params(self, ctx: Context) -> list[Parameter]: ...
|
||||
def format_usage(self, ctx: Context, formatter: HelpFormatter) -> None: ...
|
||||
def collect_usage_pieces(self, ctx: Context) -> list[str]: ...
|
||||
def get_help_option_names(self, ctx: Context) -> Set[str]: ...
|
||||
def get_help_option_names(self, ctx: Context) -> set[str]: ...
|
||||
def get_help_option(self, ctx: Context) -> Option | None: ...
|
||||
def make_parser(self, ctx: Context) -> OptionParser: ...
|
||||
def get_short_help_str(self, limit: int = ...) -> str: ...
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
from typing import Any, Iterable, Set, Tuple
|
||||
from typing import Any, Iterable, Tuple
|
||||
|
||||
from click.core import Context
|
||||
|
||||
@@ -13,7 +13,7 @@ class Option:
|
||||
nargs: int
|
||||
const: Any
|
||||
obj: Any
|
||||
prefixes: Set[str]
|
||||
prefixes: set[str]
|
||||
_short_opts: list[str]
|
||||
_long_opts: list[str]
|
||||
def __init__(
|
||||
@@ -49,7 +49,7 @@ class OptionParser:
|
||||
ignore_unknown_options: bool
|
||||
_short_opt: dict[str, Option]
|
||||
_long_opt: dict[str, Option]
|
||||
_opt_prefixes: Set[str]
|
||||
_opt_prefixes: set[str]
|
||||
_args: list[Argument]
|
||||
def __init__(self, ctx: Context | None = ...) -> None: ...
|
||||
def add_option(
|
||||
|
||||
Reference in New Issue
Block a user