mirror of
https://github.com/khoj-ai/khoj.git
synced 2024-12-18 02:27:10 +00:00
Resovle merge conflicts with matser
This commit is contained in:
commit
d199c4c35f
3 changed files with 8 additions and 9 deletions
|
@ -4,12 +4,6 @@ repos:
|
||||||
hooks:
|
hooks:
|
||||||
- id: black
|
- id: black
|
||||||
|
|
||||||
# - repo: https://github.com/pycqa/isort
|
|
||||||
# rev: 5.12.0
|
|
||||||
# hooks:
|
|
||||||
# - id: isort
|
|
||||||
# name: isort (python)
|
|
||||||
|
|
||||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||||
rev: v4.4.0
|
rev: v4.4.0
|
||||||
hooks:
|
hooks:
|
||||||
|
|
|
@ -128,6 +128,9 @@ warn_unused_ignores = false
|
||||||
[tool.black]
|
[tool.black]
|
||||||
line-length = 120
|
line-length = 120
|
||||||
|
|
||||||
|
[tool.isort]
|
||||||
|
profile = "black"
|
||||||
|
|
||||||
[tool.pytest.ini_options]
|
[tool.pytest.ini_options]
|
||||||
addopts = "--strict-markers"
|
addopts = "--strict-markers"
|
||||||
markers = [
|
markers = [
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
# Standard Packages
|
|
||||||
import asyncio
|
import asyncio
|
||||||
import logging
|
import logging
|
||||||
from typing import Dict, Optional, Union
|
from typing import Dict, Optional, Union
|
||||||
|
@ -175,6 +174,9 @@ def configure_content(
|
||||||
content_index = ContentIndex()
|
content_index = ContentIndex()
|
||||||
|
|
||||||
success = True
|
success = True
|
||||||
|
if t == None:
|
||||||
|
t = state.SearchType.All
|
||||||
|
|
||||||
if t is not None and t in [type.value for type in state.SearchType]:
|
if t is not None and t in [type.value for type in state.SearchType]:
|
||||||
t = state.SearchType(t)
|
t = state.SearchType(t)
|
||||||
|
|
||||||
|
@ -301,7 +303,7 @@ def configure_content(
|
||||||
# Initialize Notion Search
|
# Initialize Notion Search
|
||||||
notion_config = NotionConfig.objects.filter(user=user).first()
|
notion_config = NotionConfig.objects.filter(user=user).first()
|
||||||
if (
|
if (
|
||||||
search_type == state.SearchType.All.value or search_type in state.SearchType.Notion.value
|
search_type == state.SearchType.All.value or search_type == state.SearchType.Notion.value
|
||||||
) and notion_config:
|
) and notion_config:
|
||||||
logger.info("🔌 Setting up search for notion")
|
logger.info("🔌 Setting up search for notion")
|
||||||
text_search.setup(
|
text_search.setup(
|
||||||
|
@ -314,7 +316,7 @@ def configure_content(
|
||||||
)
|
)
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.error(f"🚨 Failed to setup GitHub: {e}", exc_info=True)
|
logger.error(f"🚨 Failed to setup Notion: {e}", exc_info=True)
|
||||||
success = False
|
success = False
|
||||||
|
|
||||||
# Invalidate Query Cache
|
# Invalidate Query Cache
|
||||||
|
|
Loading…
Reference in a new issue