Coverage for src/pullapprove/agent/shared.py: 0%

6 statements  

« prev     ^ index     » next       coverage.py v7.8.2, created at 2025-08-05 11:07 -0500

1from pathlib import Path 

2 

3 

4def load_prompt(prompt_name: str) -> str: 

5 """ 

6 Load a prompt from the prompts directory. 

7 """ 

8 prompt_file = Path(__file__).parent / "prompts" / f"{prompt_name}.md" 

9 if not prompt_file.exists(): 

10 raise FileNotFoundError(f"Prompt file {prompt_file} does not exist.") 

11 return prompt_file.read_text().strip()