Optimize some global variable definitions (#1178)

This commit is contained in:
Wu Clan
2026-05-15 11:55:22 +08:00
committed by GitHub
parent 5352f98c13
commit 2e86d79150
17 changed files with 136 additions and 127 deletions
+3 -3
View File
@@ -1,5 +1,5 @@
from pathlib import Path
from typing import Any
from typing import Any, Final
from pydantic import BaseModel, Field, field_validator
@@ -9,10 +9,10 @@ from backend.plugin.errors import PluginConfigError
from backend.utils.pattern_validate import match_string
# 支持的标签类型
_VALID_TAGS = frozenset({'ai', 'mcp', 'agent', 'auth', 'storage', 'notification', 'task', 'payment', 'other'})
_VALID_TAGS: Final = frozenset({'ai', 'mcp', 'agent', 'auth', 'storage', 'notification', 'task', 'payment', 'other'})
# 支持的数据库类型
_VALID_DATABASES = frozenset({'mysql', 'postgresql'})
_VALID_DATABASES: Final = frozenset({'mysql', 'postgresql'})
class PluginInfoSchema(BaseModel):