Fix linting

This commit is contained in:
yangdx 2025-08-26 02:22:34 +08:00
parent de2daf6565
commit cb0fe38b9a
2 changed files with 5 additions and 5 deletions

View File

@ -599,9 +599,7 @@ def create_app(args):
}
username = form_data.username
if auth_handler.accounts.get(username) != form_data.password:
raise HTTPException(
status_code=401, detail="Incorrect credentials"
)
raise HTTPException(status_code=401, detail="Incorrect credentials")
# Regular user login
user_token = auth_handler.create_token(

View File

@ -422,13 +422,15 @@ class LightRAG:
if self.ollama_server_infos is None:
self.ollama_server_infos = OllamaServerInfos()
# Validate config
if self.force_llm_summary_on_merge < 3:
logger.warning(
f"force_llm_summary_on_merge should be at least 3, got {self.force_llm_summary_on_merge}"
)
if self.summary_max_tokens * self.force_llm_summary_on_merge > self.summary_context_size:
if (
self.summary_max_tokens * self.force_llm_summary_on_merge
> self.summary_context_size
):
logger.warning(
f"summary_context_size must be at least summary_max_tokens * force_llm_summary_on_merge, got {self.summary_context_size}"
)