(name, code)
| 120 | os.makedirs(plugins_dir, exist_ok=True) |
| 121 | return results_dir, plugins_dir |
| 122 | |
| 123 | RESULTS_DIR, PLUGINS_DIR = ensure_results_and_plugins() |
| 124 | |
| 125 | # ------------------------- |
| 126 | # Self-install plugins (writes plugin files into PLUGINS_DIR) |
| 127 | # ------------------------- |
| 128 | def write_plugin_file(name, code): |
| 129 | path = os.path.join(PLUGINS_DIR, name) |
| 130 | try: |
| 131 | with open(path, "w", encoding="utf-8") as f: |
| 132 | f.write(code) |
no test coverage detected