You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a @root_validator without having any parameter in my project like this:
from pydantic import BaseModel, root_validator
class Model(BaseModel):
name: str
@root_validator
def validate_root(cls, values):
return values
In this way, bump-pydantic can't detect it and will not update it to a new version and without any TODO or anything.
Also, if I define my root_validator like @root_validator(), it will be detected and converted to @model_validator() without defining mode parameter.
The only successful convert will happen if I have @root_validator(pre=True). I've not checked other scenarios.
If it is an accepted bug, I will be happy to work on it and make a PR
My Environment
Python 3.11.4
bump-pydantic==0.7.0
The text was updated successfully, but these errors were encountered:
Description
I have a @root_validator without having any parameter in my project like this:
In this way,
bump-pydantic
can't detect it and will not update it to a new version and without any TODO or anything.Also, if I define my root_validator like
@root_validator()
, it will be detected and converted to@model_validator()
without definingmode
parameter.The only successful convert will happen if I have
@root_validator(pre=True)
. I've not checked other scenarios.If it is an accepted bug, I will be happy to work on it and make a PR
My Environment
Python 3.11.4
bump-pydantic==0.7.0
The text was updated successfully, but these errors were encountered: