(
*,
module_name: str,
catalog: FunctionCatalog,
path: str,
original: Mapping[str, Any],
)
| 282 | |
| 283 | @staticmethod |
| 284 | def _expand_module_all_entry( |
| 285 | *, |
| 286 | module_name: str, |
| 287 | catalog: FunctionCatalog, |
| 288 | path: str, |
| 289 | original: Mapping[str, Any], |
| 290 | ) -> List[Tuple[Dict[str, Any], str]]: |
| 291 | disallowed = [key for key in ("description", "parameters", "auto_fill") if key in original] |
| 292 | if disallowed: |
| 293 | fields = ", ".join(disallowed) |
| 294 | raise ConfigError( |
| 295 | f"{module_name}{MODULE_ALL_SUFFIX} does not support overriding {fields}", |
| 296 | extend_path(path, "name"), |
| 297 | ) |
| 298 | functions = catalog.functions_for_module(module_name) |
| 299 | if not functions: |
| 300 | raise ConfigError( |
| 301 | f"module '{module_name}' has no functions under function directory", |
| 302 | extend_path(path, "name"), |
| 303 | ) |
| 304 | entries: List[Tuple[Dict[str, Any], str]] = [] |
| 305 | for fn_name in functions: |
| 306 | entries.append(({"name": fn_name}, path)) |
| 307 | return entries |
| 308 | |
| 309 | |
| 310 | @dataclass |
no test coverage detected