This updates shed --refactor so that equality comparisons with True or False are no longer converted to is under an circumstances, as it is a fundamentally semantics changing refactor.
In particular the strongest prompting example is that 1.0 == True is true, but 1.0 is True is false.
This change leaves the logic for converting x == None to x is None in place, as although this can in principle change semantics, it should not for an well-behaved equalit implementation, and I'm not aware of any examples in the wild of equality being badly behaved in this particular way.
Fixes #74.
This updates
shed --refactor
so that equality comparisons with True or False are no longer converted tois
under an circumstances, as it is a fundamentally semantics changing refactor.In particular the strongest prompting example is that
1.0 == True
is true, but1.0 is True
is false.This change leaves the logic for converting
x == None
tox is None
in place, as although this can in principle change semantics, it should not for an well-behaved equalit implementation, and I'm not aware of any examples in the wild of equality being badly behaved in this particular way.