mirror of https://github.com/pallets/flask.git
fix type hint for `cli_runner.invoke`
This commit is contained in:
parent
ea08f155d8
commit
54c3f87af9
|
@ -3,6 +3,8 @@ Version 3.1.1
|
||||||
|
|
||||||
Unreleased
|
Unreleased
|
||||||
|
|
||||||
|
- Fix type hint for `cli_runner.invoke`. :issue:`5645`
|
||||||
|
|
||||||
|
|
||||||
Version 3.1.0
|
Version 3.1.0
|
||||||
-------------
|
-------------
|
||||||
|
|
|
@ -10,6 +10,7 @@ from urllib.parse import urlsplit
|
||||||
|
|
||||||
import werkzeug.test
|
import werkzeug.test
|
||||||
from click.testing import CliRunner
|
from click.testing import CliRunner
|
||||||
|
from click.testing import Result
|
||||||
from werkzeug.test import Client
|
from werkzeug.test import Client
|
||||||
from werkzeug.wrappers import Request as BaseRequest
|
from werkzeug.wrappers import Request as BaseRequest
|
||||||
|
|
||||||
|
@ -273,7 +274,7 @@ class FlaskCliRunner(CliRunner):
|
||||||
|
|
||||||
def invoke( # type: ignore
|
def invoke( # type: ignore
|
||||||
self, cli: t.Any = None, args: t.Any = None, **kwargs: t.Any
|
self, cli: t.Any = None, args: t.Any = None, **kwargs: t.Any
|
||||||
) -> t.Any:
|
) -> Result:
|
||||||
"""Invokes a CLI command in an isolated environment. See
|
"""Invokes a CLI command in an isolated environment. See
|
||||||
:meth:`CliRunner.invoke <click.testing.CliRunner.invoke>` for
|
:meth:`CliRunner.invoke <click.testing.CliRunner.invoke>` for
|
||||||
full method documentation. See :ref:`testing-cli` for examples.
|
full method documentation. See :ref:`testing-cli` for examples.
|
||||||
|
|
Loading…
Reference in New Issue