add typing to all wraps (#25405)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
@@ -6,10 +6,12 @@ from pydantic import BaseModel
|
||||
from services.enterprise.base import EnterprisePluginManagerRequest
|
||||
from services.errors.base import BaseServiceError
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
class PluginCredentialType(enum.Enum):
|
||||
MODEL = 0
|
||||
TOOL = 1
|
||||
|
||||
class PluginCredentialType(enum.IntEnum):
|
||||
MODEL = enum.auto()
|
||||
TOOL = enum.auto()
|
||||
|
||||
def to_number(self):
|
||||
return self.value
|
||||
@@ -47,6 +49,9 @@ class PluginManagerService:
|
||||
if not ret.get("result", False):
|
||||
raise CredentialPolicyViolationError("Credentials not available: Please use ENTERPRISE global credentials")
|
||||
|
||||
logging.debug(
|
||||
f"Credential policy compliance checked for {body.provider} with credential {body.dify_credential_id}, result: {ret.get('result', False)}"
|
||||
logger.debug(
|
||||
"Credential policy compliance checked for %s with credential %s, result: %s",
|
||||
body.provider,
|
||||
body.dify_credential_id,
|
||||
ret.get("result", False),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user