Replace HTMLParser.unescape() with html.unescape()

Proprietary

HTMLParser.unescape() was removed in Python 3.9. Use html.unescape() instead. Only fires where the parser's type resolves, and leaves the call alone where html already names something other than the module, or where the parser is an expression with side effects, such as a call, that the rewrite would drop. A call holding a comment is left alone too.

org.openrewrite.python.migrate.ReplaceHtmlParserUnescape
mod run . --recipe=org.openrewrite.python.migrate.ReplaceHtmlParserUnescape

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