mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-05-03 12:52:39 +02:00
chore(lint): ruff checks
This commit is contained in:
parent
34fbee0c28
commit
8f30cfd69a
8 changed files with 44 additions and 26 deletions
|
|
@ -70,6 +70,7 @@ def create_periodic_schedule(
|
|||
index_airtable_records_task,
|
||||
index_clickup_tasks_task,
|
||||
index_confluence_pages_task,
|
||||
index_crawled_urls_task,
|
||||
index_discord_messages_task,
|
||||
index_elasticsearch_documents_task,
|
||||
index_github_repos_task,
|
||||
|
|
@ -80,7 +81,6 @@ def create_periodic_schedule(
|
|||
index_luma_events_task,
|
||||
index_notion_pages_task,
|
||||
index_slack_messages_task,
|
||||
index_crawled_urls_task,
|
||||
)
|
||||
|
||||
# Map connector type to task
|
||||
|
|
|
|||
|
|
@ -468,7 +468,7 @@ def validate_connector_config(
|
|||
value = config.get(key)
|
||||
if not isinstance(value, list) or not value:
|
||||
raise ValueError(f"{field_name} must be a non-empty list of strings")
|
||||
|
||||
|
||||
def validate_firecrawl_api_key_format() -> None:
|
||||
"""Validate Firecrawl API key format if provided."""
|
||||
api_key = config.get("FIRECRAWL_API_KEY", "")
|
||||
|
|
@ -477,16 +477,13 @@ def validate_connector_config(
|
|||
"Firecrawl API key should start with 'fc-'. Please verify your API key."
|
||||
)
|
||||
|
||||
|
||||
def validate_initial_urls() -> None:
|
||||
initial_urls = config.get("INITIAL_URLS", "")
|
||||
if initial_urls and initial_urls.strip():
|
||||
urls = [url.strip() for url in initial_urls.split("\n") if url.strip()]
|
||||
for url in urls:
|
||||
if not validators.url(url):
|
||||
raise ValueError(
|
||||
f"Invalid URL format in INITIAL_URLS: {url}"
|
||||
)
|
||||
raise ValueError(f"Invalid URL format in INITIAL_URLS: {url}")
|
||||
|
||||
# Lookup table for connector validation rules
|
||||
connector_rules = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue