Replace .find() check with in / not in
Recipe ID
org.openrewrite.python.cleanup.SimplifySubstringSearchArtifactopenrewrite-static-analysisRewrite `.find() return-value checks as membership tests: text.find(sub) == -1 becomes sub not in text and text.find(sub) != -1 becomes sub in text`.
Single recipeProprietary
Usage
This recipe has no required configuration options. You’ll need the Moderne CLI configured before running the command below.
mod run . --recipe org.openrewrite.python.cleanup.SimplifySubstringSearchIf the recipe isn’t available locally, install it with:
mod config recipes pip install openrewrite-static-analysis