Hastings man pleads no contest to attempted assault in plea deal