mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-05-12 01:02:39 +02:00
chore: linting
This commit is contained in:
parent
e7c17c327c
commit
8fb5a7fb8f
10 changed files with 61 additions and 55 deletions
|
|
@ -867,9 +867,7 @@ class PageLimitNotificationHandler(BaseNotificationHandler):
|
|||
def __init__(self):
|
||||
super().__init__("page_limit_exceeded")
|
||||
|
||||
def _generate_operation_id(
|
||||
self, document_name: str, search_space_id: int
|
||||
) -> str:
|
||||
def _generate_operation_id(self, document_name: str, search_space_id: int) -> str:
|
||||
"""
|
||||
Generate a unique operation ID for a page limit exceeded notification.
|
||||
|
||||
|
|
@ -915,9 +913,11 @@ class PageLimitNotificationHandler(BaseNotificationHandler):
|
|||
Notification: The created notification
|
||||
"""
|
||||
operation_id = self._generate_operation_id(document_name, search_space_id)
|
||||
|
||||
|
||||
# Truncate document name for title if too long
|
||||
display_name = document_name[:40] + "..." if len(document_name) > 40 else document_name
|
||||
display_name = (
|
||||
document_name[:40] + "..." if len(document_name) > 40 else document_name
|
||||
)
|
||||
title = f"Page limit exceeded: {display_name}"
|
||||
message = f"This document has ~{pages_to_add} page(s) but you've used {pages_used}/{pages_limit} pages. Upgrade to process more documents."
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue