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:
Midgard 2020-07-18 23:50:49 +02:00
parent 67df1cebff
commit 65fa6441b1
Signed by: midgard
GPG key ID: 511C112F1331BBB4

View file

@ -330,9 +330,6 @@ def close_order(order_id: int) -> typing.Optional[Response]:
order.courier_id = courier.id order.courier_id = courier.id
db.session.commit() db.session.commit()
return redirect(url_for("order_bp.order_from_id", order_id=order_id)) 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 return None