(self, path: str)
| 698 | } |
| 699 | |
| 700 | def _read_manifest(self, path: str) -> tuple[Optional[Dict[str, Any]], bool]: |
| 701 | manifest_path = os.path.join(path, "plugin.json") |
| 702 | if not os.path.isfile(manifest_path): |
| 703 | return None, False |
| 704 | try: |
| 705 | with open(manifest_path, "r", encoding="utf-8") as fh: |
| 706 | data = json.load(fh) |
| 707 | except Exception: |
| 708 | logger.warning("Invalid plugin.json for plugin at %s", path) |
| 709 | return None, False |
| 710 | if not isinstance(data, dict): |
| 711 | logger.warning("plugin.json must be an object for plugin at %s", path) |
| 712 | return None, False |
| 713 | return data, True |
| 714 | |
| 715 | def _get_logo_url(self, key: str, *, path: Optional[str] = None) -> Optional[str]: |
| 716 | logo_path = os.path.join(self.plugins_dir, key, "logo.png") |
no outgoing calls
no test coverage detected