Sweep: Refactor edit_sweep_comment function in on_ticket.py to remove nonlocal usage
#4026
+65
−8