(file_path: str, functions_dir: Path)
| 142 | |
| 143 | |
| 144 | def _derive_module_name(file_path: str, functions_dir: Path) -> str: |
| 145 | if not file_path: |
| 146 | return "unknown" |
| 147 | try: |
| 148 | relative = Path(file_path).resolve().relative_to(functions_dir.resolve()) |
| 149 | if relative.suffix: |
| 150 | relative = relative.with_suffix("") |
| 151 | parts = list(relative.parts) |
| 152 | if not parts: |
| 153 | return "unknown" |
| 154 | return "/".join(parts) |
| 155 | except Exception: |
| 156 | stem = Path(file_path).stem |
| 157 | return stem or "unknown" |
| 158 | |
| 159 | |
| 160 | def _extract_description(fn: Any) -> str | None: |
no test coverage detected