...One thing is it to judge of things and another of human beings. For in judging of things, we judge without considering good or bad on the part of the thing which we judge, since nothing harms it whatever way we judge of it, but considering the one judging, there is good if he judges truly, or bad if falsely; because true is the good of intellect, but false is the bad of it, as is said in VI Ethic. And thus everyone ought to strive to judge of things in accordance with the way they are. But in judging in which we judge of human beings, good and bad are considered on the part of what is judged, for he has worthiness of honor as judged good and worthiness of contempt as judged bad. And because of this, we ought in this judgment to aim at judging a human being good unless there appears to be manifest reason to the contrary. But for the one judging, the false judgment by which he judges well of another is not relevant to what is bad for his intellect, just as it is not relevant to its completion to be aware of the truth of contingent singulars according to themselves, but instead it is relevant to good disposition.
[Thomas Aquinas, Summa Theologiae 2-2.60.4 ad 2, my rough translation; the Dominican Fathers translation is here. The point in context is that if it is not a matter of their violating the rights of another, and if we do not have an obvious reason to the contrary, we should judge people in the best light in order to avoid violating their right to be honored and not despised for good, even knowing that we will often be wrong. Thus we should give people credit for the good they might have, and not worry about the fact that they might not actually have it, as long as we can do so while upholding our responsibilities to protect others from injustice.]