mirror of
https://github.com/MODSetter/SurfSense.git
synced 2025-09-01 18:19:08 +00:00
ruff format
This commit is contained in:
parent
5aa52375c3
commit
54374bd7be
4 changed files with 9 additions and 11 deletions
|
@ -195,9 +195,7 @@ async def index_clickup_tasks(
|
|||
assignee.get("username", "Unknown")
|
||||
for assignee in task_assignees
|
||||
]
|
||||
content_parts.append(
|
||||
f"Assignees: {', '.join(assignee_names)}"
|
||||
)
|
||||
content_parts.append(f"Assignees: {', '.join(assignee_names)}")
|
||||
if task_due_date:
|
||||
content_parts.append(f"Due Date: {task_due_date}")
|
||||
|
||||
|
|
|
@ -163,7 +163,6 @@ async def index_discord_messages(
|
|||
f"Indexing Discord messages from {start_date_iso} to {end_date_iso}"
|
||||
)
|
||||
|
||||
|
||||
try:
|
||||
await task_logger.log_task_progress(
|
||||
log_entry,
|
||||
|
@ -220,7 +219,9 @@ async def index_discord_messages(
|
|||
try:
|
||||
channels = await discord_client.get_text_channels(guild_id)
|
||||
if not channels:
|
||||
logger.info(f"No channels found in guild {guild_name}. Skipping.")
|
||||
logger.info(
|
||||
f"No channels found in guild {guild_name}. Skipping."
|
||||
)
|
||||
skipped_channels.append(f"{guild_name} (no channels)")
|
||||
documents_skipped += 1
|
||||
continue
|
||||
|
@ -310,8 +311,10 @@ async def index_discord_messages(
|
|||
)
|
||||
|
||||
# Skip duplicates by hash
|
||||
existing_document_by_hash = await check_duplicate_document_by_hash(
|
||||
session, content_hash
|
||||
existing_document_by_hash = (
|
||||
await check_duplicate_document_by_hash(
|
||||
session, content_hash
|
||||
)
|
||||
)
|
||||
if existing_document_by_hash:
|
||||
logger.info(
|
||||
|
|
|
@ -217,9 +217,7 @@ async def index_github_repos(
|
|||
|
||||
# Chunk the content
|
||||
try:
|
||||
chunks_data = [
|
||||
await create_document_chunks(file_content)
|
||||
][0]
|
||||
chunks_data = [await create_document_chunks(file_content)][0]
|
||||
|
||||
# Use code chunker if available, otherwise regular chunker
|
||||
if hasattr(config, "code_chunker_instance"):
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
Base functionality and shared imports for document processors.
|
||||
"""
|
||||
|
||||
|
||||
from langchain_community.document_transformers import MarkdownifyTransformer
|
||||
from sqlalchemy.ext.asyncio import AsyncSession
|
||||
from sqlalchemy.future import select
|
||||
|
|
Loading…
Add table
Reference in a new issue