From 50bf3bba7354275bbfe3f8a4fc9ce1fec3b71404 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 4 Apr 2022 20:25:57 +0000 Subject: [PATCH 1/4] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/asottile/pyupgrade: v2.31.0 → v2.31.1](https://github.com/asottile/pyupgrade/compare/v2.31.0...v2.31.1) - [github.com/asottile/reorder_python_imports: v2.7.1 → v3.0.1](https://github.com/asottile/reorder_python_imports/compare/v2.7.1...v3.0.1) - [github.com/psf/black: 22.1.0 → 22.3.0](https://github.com/psf/black/compare/22.1.0...22.3.0) - [github.com/peterdemin/pip-compile-multi: v2.4.3 → v2.4.5](https://github.com/peterdemin/pip-compile-multi/compare/v2.4.3...v2.4.5) --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7b0c5065..0e1b2393 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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 From 56414782ca6c109f4c7c9d26418bf444468316db Mon Sep 17 00:00:00 2001 From: David Lord Date: Fri, 8 Apr 2022 10:53:28 -0700 Subject: [PATCH 2/4] pre-commit update branch --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0e1b2393..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 From e3c014f9aa566c83efd482ce1cd0e5e25cdb6cf2 Mon Sep 17 00:00:00 2001 From: LarsMoons Date: Fri, 8 Apr 2022 17:45:44 +0200 Subject: [PATCH 3/4] docs "Returning API Errors as JSON" return correct status code --- docs/errorhandling.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 From 19d7a0ef78f1f8a05f7be5f0e8d2192fd1d5e5e8 Mon Sep 17 00:00:00 2001 From: MeViMo Date: Fri, 8 Apr 2022 18:29:42 +0200 Subject: [PATCH 4/4] docs pass cli args as kwarg to test runner --- docs/testing.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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