fix: apply ruff

pull/22550/head
Harry 10 months ago
parent ff03ae1a57
commit b8f79a7cb1

@ -845,6 +845,7 @@ class ToolBuiltinProviderGetCredentialInfoApi(Resource):
)
)
class ToolProviderMCPApi(Resource):
@setup_required
@login_required

@ -175,7 +175,7 @@ class PluginInvokeToolApi(Resource):
provider=payload.provider,
tool_name=payload.tool,
tool_parameters=payload.tool_parameters,
credential_id=payload.credential_id
credential_id=payload.credential_id,
),
)

@ -60,7 +60,5 @@ class PluginAgentStrategy(BaseAgentStrategy):
conversation_id=conversation_id,
app_id=app_id,
message_id=message_id,
context=PluginInvokeContext(
credentials=credentials or InvokeCredentials()
),
context=PluginInvokeContext(credentials=credentials or InvokeCredentials()),
)

@ -56,7 +56,6 @@ class OAuthHandler(BasePluginClient):
Get credentials from the given request.
"""
try:
# encode request to raw http request
raw_request_bytes = self._convert_request_to_raw_data(request)

@ -127,6 +127,7 @@ class ProviderConfigEncrypter:
def create_provider_encrypter(tenant_id: str, config: list[BasicProviderConfig], cache: ProviderConfigCache):
return ProviderConfigEncrypter(tenant_id=tenant_id, config=config, provider_config_cache=cache), cache
def create_tool_provider_encrypter(tenant_id: str, controller: ToolProviderController):
cache = SingletonProviderCredentialsCache(
tenant_id=tenant_id,

@ -5,7 +5,6 @@ def is_valid_uuid(uuid_str: str | None) -> bool:
if uuid_str is None or len(uuid_str) == 0:
return False
try:
uuid.UUID(uuid_str)
return True
except Exception:

Loading…
Cancel
Save