(section_body: str, user_profile: Optional[Dict[str, Any]])
| 2359 | |
| 2360 | def _daily_note_topic_methods(section_body: str, user_profile: Optional[Dict[str, Any]]) -> List[str]: |
| 2361 | section_text = re.sub(r"\s+", " ", section_body) |
| 2362 | matches: List[str] = [] |
| 2363 | for term in _daily_note_profile_terms(user_profile): |
| 2364 | if _term_matches_daily_note_section(term, section_text): |
| 2365 | matches.append(term) |
| 2366 | return matches[:8] |
| 2367 | |
| 2368 | |
| 2369 | def _daily_note_profile_payload(user_profile: Optional[Dict[str, Any]]) -> Dict[str, Any]: |
| 2370 | profile = user_profile if isinstance(user_profile, dict) else {} |
no test coverage detected