Swap not all()/not any() by negating the comparison
ProprietaryApply De Morgan's law to replace not all(cond ...) with any(negated_cond ...) or not any(cond ...) with all(negated_cond ...). An ordering such as x < y is only negated where both operands' types resolve to int, bool or str, a chained comparison is left alone, and any and all must resolve to the builtins.
org. openrewrite. python. cleanup. InvertAnyAllmod run . --recipe= org. openrewrite. python. cleanup. InvertAnyAllInstall it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.