Righteous Lot?

I’ve always chafed against II Peter 2:7-8.

Lot was righteous? The man who offered his daughters to a mob to be gang raped? The man who moved into that wicked city to begin with, knowing its reputation? This is something that is scandalous to many, myself included. But the Apostle Peter wrote under the inspiration of the Holy Spirit that Lot was righteous, so it has to be true.