mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-04-29 10:56:24 +02:00
chore: linting
This commit is contained in:
parent
eaa21c7150
commit
2832d57bda
60 changed files with 176 additions and 179 deletions
|
|
@ -80,12 +80,12 @@ __all__ = [
|
|||
"DefaultSystemInstructionsResponse",
|
||||
# Document schemas
|
||||
"DocumentBase",
|
||||
# Google Drive schemas
|
||||
"DriveItem",
|
||||
"DocumentRead",
|
||||
"DocumentUpdate",
|
||||
"DocumentWithChunksRead",
|
||||
"DocumentsCreate",
|
||||
# Google Drive schemas
|
||||
"DriveItem",
|
||||
"ExtensionDocumentContent",
|
||||
"ExtensionDocumentMetadata",
|
||||
"GlobalNewLLMConfigRead",
|
||||
|
|
|
|||
|
|
@ -39,4 +39,3 @@ class GoogleDriveIndexRequest(BaseModel):
|
|||
def get_file_names(self) -> list[str]:
|
||||
"""Get list of file names."""
|
||||
return [file.name for file in self.files]
|
||||
|
||||
|
|
|
|||
|
|
@ -2659,9 +2659,7 @@ class ConnectorService:
|
|||
def _url_fn(_doc_info: dict[str, Any], metadata: dict[str, Any]) -> str:
|
||||
meeting_id = metadata.get("circleback_meeting_id", "")
|
||||
return (
|
||||
f"https://app.circleback.ai/meetings/{meeting_id}"
|
||||
if meeting_id
|
||||
else ""
|
||||
f"https://app.circleback.ai/meetings/{meeting_id}" if meeting_id else ""
|
||||
)
|
||||
|
||||
def _description_fn(
|
||||
|
|
@ -2707,4 +2705,4 @@ class ConnectorService:
|
|||
"sources": sources_list,
|
||||
}
|
||||
|
||||
return result_object, circleback_docs
|
||||
return result_object, circleback_docs
|
||||
|
|
|
|||
|
|
@ -277,7 +277,9 @@ async def index_google_drive_single_file(
|
|||
)
|
||||
|
||||
await session.commit()
|
||||
logger.info("Successfully committed Google Drive file indexing changes to database")
|
||||
logger.info(
|
||||
"Successfully committed Google Drive file indexing changes to database"
|
||||
)
|
||||
|
||||
if indexed > 0:
|
||||
await task_logger.log_task_success(
|
||||
|
|
@ -302,7 +304,7 @@ async def index_google_drive_single_file(
|
|||
await session.rollback()
|
||||
await task_logger.log_task_failure(
|
||||
log_entry,
|
||||
f"Database error during file indexing",
|
||||
"Database error during file indexing",
|
||||
str(db_error),
|
||||
{"error_type": "SQLAlchemyError"},
|
||||
)
|
||||
|
|
@ -312,7 +314,7 @@ async def index_google_drive_single_file(
|
|||
await session.rollback()
|
||||
await task_logger.log_task_failure(
|
||||
log_entry,
|
||||
f"Failed to index Google Drive file",
|
||||
"Failed to index Google Drive file",
|
||||
str(e),
|
||||
{"error_type": type(e).__name__},
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue