forked from orbit-oss/flask
Merge branch '2.1.x'
This commit is contained in:
commit
a03719b010
3 changed files with 5 additions and 5 deletions
|
|
@ -1,5 +1,5 @@
|
||||||
ci:
|
ci:
|
||||||
autoupdate_branch: "2.0.x"
|
autoupdate_branch: "2.1.x"
|
||||||
autoupdate_schedule: monthly
|
autoupdate_schedule: monthly
|
||||||
repos:
|
repos:
|
||||||
- repo: https://github.com/asottile/pyupgrade
|
- repo: https://github.com/asottile/pyupgrade
|
||||||
|
|
@ -27,7 +27,7 @@ repos:
|
||||||
- flake8-bugbear
|
- flake8-bugbear
|
||||||
- flake8-implicit-str-concat
|
- flake8-implicit-str-concat
|
||||||
- repo: https://github.com/peterdemin/pip-compile-multi
|
- repo: https://github.com/peterdemin/pip-compile-multi
|
||||||
rev: v2.4.4
|
rev: v2.4.5
|
||||||
hooks:
|
hooks:
|
||||||
- id: pip-compile-multi-verify
|
- id: pip-compile-multi-verify
|
||||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||||
|
|
|
||||||
|
|
@ -489,7 +489,7 @@ This is a simple example:
|
||||||
|
|
||||||
@app.errorhandler(InvalidAPIUsage)
|
@app.errorhandler(InvalidAPIUsage)
|
||||||
def invalid_api_usage(e):
|
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
|
# an API app route for getting user information
|
||||||
# a correct request might be /api/user?user_id=420
|
# a correct request might be /api/user?user_id=420
|
||||||
|
|
|
||||||
|
|
@ -265,10 +265,10 @@ command from the command line.
|
||||||
click.echo(f"Hello, {name}!")
|
click.echo(f"Hello, {name}!")
|
||||||
|
|
||||||
def test_hello_command(runner):
|
def test_hello_command(runner):
|
||||||
result = runner.invoke(["hello"])
|
result = runner.invoke(args="hello")
|
||||||
assert "World" in result.output
|
assert "World" in result.output
|
||||||
|
|
||||||
result = runner.invoke(["hello", "--name", "Flask"])
|
result = runner.invoke(args=["hello", "--name", "Flask"])
|
||||||
assert "Flask" in result.output
|
assert "Flask" in result.output
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue