diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7b0c5065..d4862303 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,5 +1,5 @@ ci: - autoupdate_branch: "2.0.x" + autoupdate_branch: "2.1.x" autoupdate_schedule: monthly repos: - repo: https://github.com/asottile/pyupgrade @@ -27,7 +27,7 @@ repos: - flake8-bugbear - flake8-implicit-str-concat - repo: https://github.com/peterdemin/pip-compile-multi - rev: v2.4.4 + rev: v2.4.5 hooks: - id: pip-compile-multi-verify - repo: https://github.com/pre-commit/pre-commit-hooks diff --git a/docs/errorhandling.rst b/docs/errorhandling.rst index 4aa512ea..808a61a2 100644 --- a/docs/errorhandling.rst +++ b/docs/errorhandling.rst @@ -489,7 +489,7 @@ This is a simple example: @app.errorhandler(InvalidAPIUsage) def invalid_api_usage(e): - return jsonify(e.to_dict()) + return jsonify(e.to_dict()), e.status_code # an API app route for getting user information # a correct request might be /api/user?user_id=420 diff --git a/docs/testing.rst b/docs/testing.rst index d68cb533..e259f098 100644 --- a/docs/testing.rst +++ b/docs/testing.rst @@ -265,10 +265,10 @@ command from the command line. click.echo(f"Hello, {name}!") def test_hello_command(runner): - result = runner.invoke(["hello"]) + result = runner.invoke(args="hello") assert "World" in result.output - result = runner.invoke(["hello", "--name", "Flask"]) + result = runner.invoke(args=["hello", "--name", "Flask"]) assert "Flask" in result.output