Skip to content

Commit 4a777d8

Browse files
committed
Refactoring. Adding the None annotation to the return value
1 parent d082f46 commit 4a777d8

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

‎flask_http_auth/http_digest_auth.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def get_password(username: str) -> str | None:
3434

3535
@app.route("/")
3636
@auth.login_required
37-
def index():
37+
def index() -> str:
3838
return f"Hello, {auth.username()}!"
3939

4040

‎flask_restful__examples/todo/main.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
}
2323

2424

25-
def abort_if_todo_doesnt_exist(todo_id):
25+
def abort_if_todo_doesnt_exist(todo_id) -> None:
2626
if todo_id not in TODOS:
2727
abort(404, message=f"Todo {todo_id} doesn't exist")
2828

0 commit comments

Comments
 (0)