What is the appeal to purity fallacy?

The appeal to purity or no true Scotsman fallacy is an attempt to defend a generalization about a group from a counterexample by shifting the definition of the group in the middle of the argument. In this way, one can exclude the counterexample as not being “true,” “genuine,” or “pure” enough to be considered as part of the group in question.