community[patch]: Add linter to catch @root_validator (#24070)

- Add linter to prevent further usage of vanilla root validator
- Udpate remaining root validators
This commit is contained in:
Eugene Yurtsev
2024-07-10 10:51:03 -04:00
committed by GitHub
parent 9c6efadec3
commit c4e149d4f1
16 changed files with 39 additions and 19 deletions

View File

@@ -81,7 +81,7 @@ class DocugamiLoader(BaseLoader, BaseModel):
include_project_metadata_in_doc_metadata: bool = True
"""Set to True if you want to include the project metadata in the doc metadata."""
@root_validator
@root_validator(pre=True)
def validate_local_or_remote(cls, values: Dict[str, Any]) -> Dict[str, Any]:
"""Validate that either local file paths are given, or remote API docset ID.