It is narrated from Imam Sadeq (AS) who said:
Whoever considers himself/herself better than others, he/she is among arrogant ones. Hafs ibn Qiyath asked: What if a righteous person sees a sinner and considers himself/herself better than the sinner? Imam Sadeq (AS) replied: Never! Never! Maybe the sinner will be forgiven, but you are kept for accountability, have you never read the story of magicians/sorcerers and Prophet Moses (AS) [1]? In another narration, it is reported that a person told Imam Hassan Mojtaba (AS): You are arrogant! Imam (AS) replied: Never! Arrogance is only for God. But dignity is in me. Allah (SWT) has said: Dignity belongs to God, the Prophet of Allah (SWT), and the believers [2].
[1] Al-Kafi, Vol. 8, Page 128.
[2] Beharul Anwaar, Vol. 24, Page 325.
Source: en.shafaqna.com