From c9a774ea62d3d3dc5b13c972eba318c4f97af332 Mon Sep 17 00:00:00 2001 From: Reza Rahemtola Date: Sat, 7 Dec 2024 18:18:56 +0900 Subject: [PATCH] style: Ruff formatting config updated --- backend/pyproject.toml | 4 ++++ backend/src/main.py | 12 ++++++------ backend/src/utils/ssh.py | 2 +- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/backend/pyproject.toml b/backend/pyproject.toml index 18a4c61..fb5ef50 100644 --- a/backend/pyproject.toml +++ b/backend/pyproject.toml @@ -21,6 +21,10 @@ paramiko = "^3.5.0" mypy = "^1.12.0" ruff = "^0.7.0" +[tool.ruff] +lint.select = ["C", "E", "F", "I", "W"] +lint.ignore = ["E501"] + [build-system] requires = ["poetry-core"] build-backend = "poetry.core.masonry.api" diff --git a/backend/src/main.py b/backend/src/main.py index 17867bd..068a672 100644 --- a/backend/src/main.py +++ b/backend/src/main.py @@ -7,8 +7,8 @@ import paramiko from aleph.sdk import AuthenticatedAlephHttpClient from aleph.sdk.chains.ethereum import ETHAccount -from aleph_message.models import Payment, Chain, PaymentType -from fastapi import FastAPI, HTTPException, UploadFile, File, Form +from aleph_message.models import Chain, Payment, PaymentType +from fastapi import FastAPI, File, Form, HTTPException, UploadFile from libertai_utils.chains.index import is_signature_valid from libertai_utils.interfaces.subscription import Subscription from libertai_utils.utils.crypto import decrypt, encrypt @@ -17,13 +17,13 @@ from src.config import config from src.interfaces.agent import ( Agent, - SetupAgentBody, + AgentPythonPackageManager, DeleteAgentBody, - UpdateAgentResponse, GetAgentResponse, - GetAgentSecretResponse, GetAgentSecretMessage, - AgentPythonPackageManager, + GetAgentSecretResponse, + SetupAgentBody, + UpdateAgentResponse, ) from src.utils.agent import fetch_agents from src.utils.message import get_view_agent_secret_message diff --git a/backend/src/utils/ssh.py b/backend/src/utils/ssh.py index fc8f0b4..bed6ec5 100644 --- a/backend/src/utils/ssh.py +++ b/backend/src/utils/ssh.py @@ -15,4 +15,4 @@ def generate_ssh_key_pair() -> tuple[str, str]: # Generate public key in OpenSSH format public_key_str = f"{key.get_name()} {key.get_base64()}" - return private_key_str, public_key_str \ No newline at end of file + return private_key_str, public_key_str