mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-23 11:30:37 +00:00
community[patch]: Make the pydantic linter stricter (#24897)
Stricter linting of deprecated pydantic features.
This commit is contained in:
@@ -53,7 +53,7 @@ fi
|
|||||||
# Forbid vanilla usage of @root_validator
|
# Forbid vanilla usage of @root_validator
|
||||||
# This prevents the code from using either @root_validator or @root_validator()
|
# This prevents the code from using either @root_validator or @root_validator()
|
||||||
# Search for lines matching the pattern within the specified repository
|
# 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
|
# Check if any matching lines were found
|
||||||
if [ -n "$result" ]; then
|
if [ -n "$result" ]; then
|
||||||
|
Reference in New Issue
Block a user