Remove incorrect comment
The comment says that mypy gives a "Missing return statement" but it links to an issue on the mypy bug tracker about the same error message reported after exhaustive enum matching. This is a completely different situation, here the "Missing return statement" is warranted: this part of the code is reachable so an explicit `return None` is wanted for this function that returns an Optional.
This commit is contained in:
parent
67df1cebff
commit
65fa6441b1
1 changed files with 0 additions and 3 deletions
|
@ -330,9 +330,6 @@ def close_order(order_id: int) -> typing.Optional[Response]:
|
|||
order.courier_id = courier.id
|
||||
db.session.commit()
|
||||
return redirect(url_for("order_bp.order_from_id", order_id=order_id))
|
||||
# The line below is to make sure mypy doesn't say
|
||||
# "Missing return statement"
|
||||
# https://github.com/python/mypy/issues/4223
|
||||
return None
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue