Replace Thread.setName() with Thread.name = ...

Proprietary

Replace setName() method calls with name property assignment. Deprecated in Python 3.10. Only fires where the receiver's type resolves to threading.Thread or a subclass, and only on a call that is its own statement and passes its value positionally.

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

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