@@ -204,8 +204,19 @@ def _get_template(template_id: str | None = None) -> dict[str, str]:
204204
205205
206206_MONTH_NAMES = [
207- "" , "Jan" , "Feb" , "Mar" , "Apr" , "May" , "Jun" ,
208- "Jul" , "Aug" , "Sep" , "Oct" , "Nov" , "Dec" ,
207+ "" ,
208+ "Jan" ,
209+ "Feb" ,
210+ "Mar" ,
211+ "Apr" ,
212+ "May" ,
213+ "Jun" ,
214+ "Jul" ,
215+ "Aug" ,
216+ "Sep" ,
217+ "Oct" ,
218+ "Nov" ,
219+ "Dec" ,
209220]
210221
211222
@@ -452,7 +463,9 @@ async def _save_failed_report(error_msg: str) -> int | None:
452463 )
453464 return failed .id
454465 except Exception :
455- logger .exception ("[generate_resume] Could not persist failed report row" )
466+ logger .exception (
467+ "[generate_resume] Could not persist failed report row"
468+ )
456469 return None
457470
458471 try :
@@ -471,7 +484,9 @@ async def _save_failed_report(error_msg: str) -> int | None:
471484 llm = await get_document_summary_llm (read_session , search_space_id )
472485
473486 if not llm :
474- error_msg = "No LLM configured. Please configure a language model in Settings."
487+ error_msg = (
488+ "No LLM configured. Please configure a language model in Settings."
489+ )
475490 report_id = await _save_failed_report (error_msg )
476491 return {
477492 "status" : "failed" ,
@@ -497,7 +512,8 @@ async def _save_failed_report(error_msg: str) -> int | None:
497512 parent_body = _strip_header (parent_content )
498513 prompt = _REVISION_PROMPT .format (
499514 llm_reference = llm_reference ,
500- user_instructions = user_instructions or "Improve and refine the resume." ,
515+ user_instructions = user_instructions
516+ or "Improve and refine the resume." ,
501517 previous_content = parent_body ,
502518 )
503519 else :
@@ -553,7 +569,10 @@ async def _save_failed_report(error_msg: str) -> int | None:
553569 if attempt == 0 :
554570 dispatch_custom_event (
555571 "report_progress" ,
556- {"phase" : "fixing" , "message" : "Fixing compilation issue..." },
572+ {
573+ "phase" : "fixing" ,
574+ "message" : "Fixing compilation issue..." ,
575+ },
557576 )
558577 fix_prompt = _FIX_COMPILE_PROMPT .format (
559578 llm_reference = llm_reference ,
@@ -563,15 +582,19 @@ async def _save_failed_report(error_msg: str) -> int | None:
563582 fix_response = await llm .ainvoke (
564583 [HumanMessage (content = fix_prompt )]
565584 )
566- if fix_response .content and isinstance (fix_response .content , str ):
585+ if fix_response .content and isinstance (
586+ fix_response .content , str
587+ ):
567588 body = _strip_typst_fences (fix_response .content )
568589 body = _strip_imports (body )
569590 name = _extract_name (body ) or name
570591 header = _build_header (template , name )
571592 typst_source = header + body
572593
573594 if compile_error :
574- error_msg = f"Typst compilation failed after 2 attempts: { compile_error } "
595+ error_msg = (
596+ f"Typst compilation failed after 2 attempts: { compile_error } "
597+ )
575598 report_id = await _save_failed_report (error_msg )
576599 return {
577600 "status" : "failed" ,
0 commit comments