A gunman who opened fired on a man on a Leeds street has been warned he faces a lengthy jail sentence after being found guilty of attempted murder.