Replace Final model fields with a default with ClassVar
ProprietaryPydantic 2.11 deprecates annotating a model field as Final with a default value (such fields were treated as class variables). Replace Final[X] = default with ClassVar[X] = default, which preserves the existing class-variable behavior and is the replacement Pydantic recommends.
org. openrewrite. python. migrate. pydantic. ReplaceFinalFieldWithClassVarmod run . --recipe= org. openrewrite. python. migrate. pydantic. ReplaceFinalFieldWithClassVarInstall it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.