Replace logger.warn() with logger.warning()

Proprietary

Replace warn() calls on a logging.Logger or logging.LoggerAdapter with warning(). The warn() method is a deprecated alias that should not be used. It only fires where the receiver's type resolves, and leaves alone the module-level logging.warn() and a subclass that overrides warn().

org.openrewrite.python.cleanup.ReplaceLoggerWarn
mod run . --recipe=org.openrewrite.python.cleanup.ReplaceLoggerWarn

Install it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.