chore: ran linting

This commit is contained in:
Anish Sarkar 2026-02-03 01:43:38 +05:30
parent 2125c76841
commit f730df7c9d
3 changed files with 5 additions and 7 deletions

View file

@ -72,7 +72,7 @@ def upgrade() -> None:
# 4. Backfill existing documents with connector_id based on document_type matching # 4. Backfill existing documents with connector_id based on document_type matching
# This maps document types to their corresponding connector types # This maps document types to their corresponding connector types
# Only backfills for documents in search spaces that have exactly one connector of that type # Only backfills for documents in search spaces that have exactly one connector of that type
# Map of document_type -> connector_type for backfilling # Map of document_type -> connector_type for backfilling
document_connector_mappings = [ document_connector_mappings = [
("NOTION_CONNECTOR", "NOTION_CONNECTOR"), ("NOTION_CONNECTOR", "NOTION_CONNECTOR"),
@ -168,4 +168,3 @@ def downgrade() -> None:
END$$; END$$;
""" """
) )

View file

@ -337,7 +337,9 @@ async def composio_callback(
logger.info( logger.info(
f"Updating existing Composio connector {existing_connector.id} with new connected_account_id {final_connected_account_id}" f"Updating existing Composio connector {existing_connector.id} with new connected_account_id {final_connected_account_id}"
) )
existing_config = existing_connector.config.copy() if existing_connector.config else {} existing_config = (
existing_connector.config.copy() if existing_connector.config else {}
)
existing_config.update(connector_config) existing_config.update(connector_config)
existing_connector.config = existing_config existing_connector.config = existing_config

View file

@ -135,9 +135,7 @@ async def _delete_connector_async(
break break
# Delete this batch (chunks are deleted via CASCADE) # Delete this batch (chunks are deleted via CASCADE)
await session.execute( await session.execute(delete(Document).where(Document.id.in_(doc_ids)))
delete(Document).where(Document.id.in_(doc_ids))
)
await session.commit() await session.commit()
total_deleted += len(doc_ids) total_deleted += len(doc_ids)
@ -269,4 +267,3 @@ async def delete_documents_by_connector_id(
total_deleted += len(doc_ids) total_deleted += len(doc_ids)
return total_deleted return total_deleted