mirror of
https://github.com/hwchase17/langchain.git
synced 2025-06-22 06:39:52 +00:00
community[patch]: Make the pydantic linter stricter (#24897)
Stricter linting of deprecated pydantic features.
This commit is contained in:
parent
a4a444f73d
commit
add16111b9
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user