CBV01 commited on
Commit
9b28960
·
1 Parent(s): 69197c3

fix(types): update is_chat_matching_keyword and is_relevant_channel type annotations to allow Optional[str]

Browse files
Files changed (1) hide show
  1. backend/main.py +2 -2
backend/main.py CHANGED
@@ -1586,7 +1586,7 @@ async def _scrape_lyzem(base_query: str, max_pages: int = 10, queue: Optional[as
1586
  return results
1587
 
1588
 
1589
- def is_chat_matching_keyword(title: str, username: str, query: str) -> bool:
1590
  """Ensures a chat returned from Telegram contacts/messages actually relates to the keyword query."""
1591
  if not query:
1592
  return True
@@ -1842,7 +1842,7 @@ async def _scrape_telegram_search(base_query: str, rows: list, queue: Optional[a
1842
 
1843
 
1844
 
1845
- def is_relevant_channel(title: str, username: str, query: str) -> bool:
1846
  """Checks whether a discovered channel/group matches the query context and rejects spam/unrelated niches (e.g. IPTV ads in non-IPTV queries)."""
1847
  if not query:
1848
  return True
 
1586
  return results
1587
 
1588
 
1589
+ def is_chat_matching_keyword(title: Optional[str], username: Optional[str], query: str) -> bool:
1590
  """Ensures a chat returned from Telegram contacts/messages actually relates to the keyword query."""
1591
  if not query:
1592
  return True
 
1842
 
1843
 
1844
 
1845
+ def is_relevant_channel(title: Optional[str], username: Optional[str], query: str) -> bool:
1846
  """Checks whether a discovered channel/group matches the query context and rejects spam/unrelated niches (e.g. IPTV ads in non-IPTV queries)."""
1847
  if not query:
1848
  return True