Remove ... (Ellipsis) from Field()

Proprietary

Pydantic 2.10 recommends against using Ellipsis (...) with Field to mark a field as required, as it does not play well with static type checkers. Rewrite Field(...) to Field() (and Field(..., x=y) to Field(x=y)), keeping the remaining arguments. Only calls resolving to pydantic.fields.Field are rewritten.

org.openrewrite.python.migrate.pydantic.RemoveEllipsisFromField
mod run . --recipe=org.openrewrite.python.migrate.pydantic.RemoveEllipsisFromField

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