Compare to None with identity operators (is / is not)
ProprietarySwitch == None to is None and != None to is not None, following PEP 8 singleton comparison guidance. Only fires where the operand's type resolves to a builtin. Other operands are left alone, since their __eq__ may give == None another meaning. A comparison holding comments is left alone.
org. openrewrite. python. cleanup. NoneComparemod run . --recipe= org. openrewrite. python. cleanup. NoneCompareInstall it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.