fix(ruff): #61 I001 import sorting + RUF012 ClassVar annotation
CI / lint (push) Successful in 51s
CI / security (push) Successful in 34s
CI / test (push) Successful in 1m9s
CI / build (push) Successful in 32s
CI / e2e (push) Failing after 21m30s
Desktop Build / build-windows (push) Canceled after 0s
Desktop Build / build-linux (push) Canceled after 0s
CI / lint (push) Successful in 51s
CI / security (push) Successful in 34s
CI / test (push) Successful in 1m9s
CI / build (push) Successful in 32s
CI / e2e (push) Failing after 21m30s
Desktop Build / build-windows (push) Canceled after 0s
Desktop Build / build-linux (push) Canceled after 0s
This commit is contained in:
+4
-3
@@ -9,10 +9,11 @@ enable / disable), all scoped to a single vault.
|
||||
import json
|
||||
import logging
|
||||
import re
|
||||
import time as _time
|
||||
import zipfile
|
||||
from dataclasses import dataclass, field
|
||||
from pathlib import Path
|
||||
from typing import Any
|
||||
from typing import Any, ClassVar
|
||||
|
||||
from fastapi import APIRouter, Depends, File, HTTPException, UploadFile
|
||||
from fastapi.responses import JSONResponse
|
||||
@@ -560,11 +561,11 @@ async def api_disable_plugin(vault: str, plugin_name: str, current_user=Depends(
|
||||
# ── Plugin Event Bus ────────────────────────────────────────────────────────
|
||||
# Lightweight pub/sub for backend events that plugins can subscribe to.
|
||||
# Used to dispatch onFileCreate, onFileDelete, onVaultMount to enabled plugins.
|
||||
import time as _time
|
||||
|
||||
|
||||
class _PluginEventBus:
|
||||
"""In-memory event dispatcher for plugin lifecycle events."""
|
||||
_listeners: dict[str, list] = {}
|
||||
_listeners: ClassVar[dict[str, list]] = {}
|
||||
|
||||
@classmethod
|
||||
def subscribe(cls, event_type: str, callback) -> None:
|
||||
|
||||
Reference in New Issue
Block a user