Load plugin metadata from metadata.yaml file Args: plugin_dir: Plugin directory path Returns: dict: Dictionary containing metadata, or empty dict if loading fails
(plugin_dir: Path)
| 114 | |
| 115 | |
| 116 | def load_yaml_metadata(plugin_dir: Path) -> dict: |
| 117 | """Load plugin metadata from metadata.yaml file |
| 118 | |
| 119 | Args: |
| 120 | plugin_dir: Plugin directory path |
| 121 | |
| 122 | Returns: |
| 123 | dict: Dictionary containing metadata, or empty dict if loading fails |
| 124 | |
| 125 | """ |
| 126 | yaml_path = plugin_dir / "metadata.yaml" |
| 127 | if yaml_path.exists(): |
| 128 | try: |
| 129 | return yaml.safe_load(yaml_path.read_text(encoding="utf-8")) or {} |
| 130 | except Exception as e: |
| 131 | click.echo(f"Failed to read {yaml_path}: {e}", err=True) |
| 132 | return {} |
| 133 | |
| 134 | |
| 135 | def build_plug_list(plugins_dir: Path) -> list: |
no test coverage detected