mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 13:04:46 +08:00
click: Support tuples of _ParamTypes, CliRunner fixes (#3259)
This commit is contained in:
committed by
Sebastian Rittau
parent
3f8c2169d1
commit
c33239b011
3
third_party/2and3/click/core.pyi
vendored
3
third_party/2and3/click/core.pyi
vendored
@@ -356,7 +356,8 @@ class _ParamType:
|
||||
|
||||
|
||||
# This type is here to resolve https://github.com/python/mypy/issues/5275
|
||||
_ConvertibleType = Union[type, _ParamType, Tuple[type, ...], Callable[[str], Any], Callable[[Optional[str]], Any]]
|
||||
_ConvertibleType = Union[type, _ParamType, Tuple[Union[type, _ParamType], ...],
|
||||
Callable[[str], Any], Callable[[Optional[str]], Any]]
|
||||
|
||||
|
||||
class Parameter:
|
||||
|
||||
4
third_party/2and3/click/testing.pyi
vendored
4
third_party/2and3/click/testing.pyi
vendored
@@ -56,7 +56,7 @@ class CliRunner:
|
||||
def make_env(self, overrides: Optional[Mapping[str, str]] = ...) -> Dict[str, str]: ...
|
||||
def isolation(
|
||||
self,
|
||||
input: Optional[IO] = ...,
|
||||
input: Optional[Union[bytes, Text, IO]] = ...,
|
||||
env: Optional[Mapping[str, str]] = ...,
|
||||
color: bool = ...,
|
||||
) -> ContextManager[BinaryIO]: ...
|
||||
@@ -64,7 +64,7 @@ class CliRunner:
|
||||
self,
|
||||
cli: BaseCommand,
|
||||
args: Optional[Union[str, Iterable[str]]] = ...,
|
||||
input: Optional[IO] = ...,
|
||||
input: Optional[Union[bytes, Text, IO]] = ...,
|
||||
env: Optional[Mapping[str, str]] = ...,
|
||||
catch_exceptions: bool = ...,
|
||||
color: bool = ...,
|
||||
|
||||
4
third_party/2and3/flask/testing.pyi
vendored
4
third_party/2and3/flask/testing.pyi
vendored
@@ -4,7 +4,7 @@
|
||||
|
||||
from click import BaseCommand
|
||||
from click.testing import CliRunner, Result
|
||||
from typing import Any, IO, Iterable, Mapping, Optional, Union, TypeVar
|
||||
from typing import Any, IO, Iterable, Mapping, Optional, Text, TypeVar, Union
|
||||
from werkzeug.test import Client
|
||||
|
||||
def make_test_environ_builder(app: Any, path: str = ..., base_url: Optional[Any] = ..., subdomain: Optional[Any] = ..., url_scheme: Optional[Any] = ..., *args: Any, **kwargs: Any): ...
|
||||
@@ -29,7 +29,7 @@ class FlaskCliRunner(CliRunner):
|
||||
self,
|
||||
cli: Optional[BaseCommand] = ...,
|
||||
args: Optional[Union[str, Iterable[str]]] = ...,
|
||||
input: Optional[IO] = ...,
|
||||
input: Optional[Union[bytes, IO, Text]] = ...,
|
||||
env: Optional[Mapping[str, str]] = ...,
|
||||
catch_exceptions: bool = ...,
|
||||
color: bool = ...,
|
||||
|
||||
Reference in New Issue
Block a user