(start: str = None)
| 14 | return None |
| 15 | |
| 16 | def read_codeymd(start: str = None) -> str: |
| 17 | path = find_codeymd(start) |
| 18 | if not path: |
| 19 | return "" |
| 20 | try: |
| 21 | content = path.read_text(encoding="utf-8", errors="replace").strip() |
| 22 | if "Write a concise CODEY.md" in content or "Analyze this project" in content: |
| 23 | return "" |
| 24 | if str(path) not in _codeymd_cache: |
| 25 | success(f"Loaded CODEY.md from {path}") |
| 26 | _codeymd_cache[str(path)] = True |
| 27 | return content |
| 28 | except Exception: |
| 29 | return "" |
| 30 | |
| 31 | def write_codeymd(content: str, directory: str = None) -> str: |
| 32 | directory = Path(directory or os.getcwd()) |
no test coverage detected