From add16111b9ffd0ba7cb8764d9e4dbe5bd756e719 Mon Sep 17 00:00:00 2001 From: Eugene Yurtsev Date: Wed, 31 Jul 2024 14:57:37 -0400 Subject: [PATCH] community[patch]: Make the pydantic linter stricter (#24897) Stricter linting of deprecated pydantic features. --- libs/community/scripts/check_pydantic.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/community/scripts/check_pydantic.sh b/libs/community/scripts/check_pydantic.sh index f82aea7e7ec..1b091d0f4eb 100755 --- a/libs/community/scripts/check_pydantic.sh +++ b/libs/community/scripts/check_pydantic.sh @@ -53,7 +53,7 @@ fi # Forbid vanilla usage of @root_validator # This prevents the code from using either @root_validator or @root_validator() # Search for lines matching the pattern within the specified repository -result=$(git -C "$repository_path" grep -En '(@root_validator\s*$)|(@root_validator\(\))' -- '*.py') +result=$(git -C "$repository_path" grep -En '(@root_validator\s*$)|(@root_validator\(\)|@root_validator\(pre=False\))' -- '*.py') # Check if any matching lines were found if [ -n "$result" ]; then