Passage
With the pure Thou showest Thyself pure, And with the perverse showest Thyself a wrestler,
With the pure Thou showest Thyself pure, And with the perverse showest Thyself a wrestler,
Psalms 18:24 And Jehovah doth return to me, According to my righteousness, According to the cleanness of my hands, Over-against his eyes.
Psalms 18:25 With the kind Thou showest Thyself kind, With a perfect man showest Thyself perfect.
Psalms 18:26 With the pure Thou showest Thyself pure, And with the perverse showest Thyself a wrestler,
Psalms 18:27 For Thou a poor people savest, And the eyes of the high causest to fall.
Psalms 18:28 For Thou--Thou lightest my lamp, Jehovah my God enlighteneth my darkness.
The verse centers on "pure", "thou", "showest", "thyself", and "perverse". It is saying that the verse draws attention to "pure" and "thou", so its meaning should be read from those terms before moving to application.
The nearby context moves from verse 25's "With the kind Thou showest Thyself kind..." into verse 27's "For Thou a poor people savest And...", so "pure" and "thou" belong inside that flow. In Psalms context, the local focus is worship, trust, the LORD's kingship, and covenant mercy.
A plain takeaway is to answer the verse's own emphasis on "pure" and "thou" with trust shaped by these words, not by a vague optimism outside the passage.