The current fashion of seeing virtue in what we have done needs to be skewered. An angry atheist seems to understand this, and yes, I’m referring to Ricky Gervais because he reminded celebrities that they live in a bubble, and their virtue is but vanity.
Calvin foreshadows this: yes, he knew his Thomist theology, and rejected it. in part because of this: our vices make us slaves. (I commend Matt Briggs for his excellent series on Aquinas)
The question today is by which standard is righteousness defined? By that of perfect righteousness: something no human can attain. When we call ourselves virtuous, we deceive ourselves.
On the other hand, it is evident that man never attains to a true self-knowledge until he have previously contemplated the face of God, and come down after such contemplation to look into himself. For (such is our innate pride) we always seem to ourselves just, and upright, and wise, and holy, until we are convinced, by clear evidence, of our injustice, vileness, folly, and impurity. Convinced, however, we are not, if we look to ourselves only, and not to the Lord also–He being the only standard by the application of which this conviction can be produced. For, since we are all naturally prone to hypocrisy, any empty semblance of righteousness is quite enough to satisfy us instead of righteousness itself. And since nothing appears within us or around us that is not tainted with very great impurity, so long as we keep our mind within the confines of human pollution, anything which is in some small degree less defiled delights us as if it were most pure just as an eye, to which nothing but black had been previously presented, deems an object of a whitish, or even of a brownish hue, to be perfectly white. Nay, the bodily sense may furnish a still stronger illustration of the extent to which we are deluded in estimating the powers of the mind. If, at mid-day, we either look down to the ground, or on the surrounding objects which lie open to our view, we think ourselves endued with a very strong and piercing eyesight; but when we look up to the sun, and gaze at it unveiled, the sight which did excellently well for the earth is instantly so dazzled and confounded by the refulgence, as to oblige us to confess that our acuteness in discerning terrestrial objects is mere dimness when applied to the sun. Thus too, it happens in estimating our spiritual qualities. So long as we do not look beyond the earth, we are quite pleased with our own righteousness, wisdom, and virtue; we address ourselves in the most flattering terms, and seem only less than demigods. But should we once begin to raise our thoughts to God, and reflect what kind of Being he is, and how absolute the perfection of that righteousness, and wisdom, and virtue, to which, as a standard, we are bound to be conformed, what formerly delighted us by its false show of righteousness will become polluted with the greatest iniquity; what strangely imposed upon us under the name of wisdom will disgust by its extreme folly; and what presented the appearance of virtuous energy will be condemned as the most miserable impotence. So far are those qualities in us, which seem most perfect, from corresponding to the divine purity.
John Calvin, Institutes of the Christian Religion, 1548 Chapter one