Drop exists() check paired with is_dir()/is_file()
ProprietaryDrop path.exists() when it is and-ed with is_dir() or is_file() on the same path, which inherently return False for missing paths. Only fires where the receiver's type resolves to pathlib.Path, and leaves a receiver whose evaluation may have side effects, such as a call, alone, as well as a check holding comments.
org. openrewrite. python. cleanup. RemoveRedundantPathExistsmod run . --recipe= org. openrewrite. python. cleanup. RemoveRedundantPathExistsInstall it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.