From b6add6fdaccb51dcf908363e10a3219a36e339c6 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Sat, 20 Jul 2024 15:59:12 +0000 Subject: [PATCH] style: format code with Autopep8, Black, ClangFormat, dotnet-format, Go fmt, Gofumpt, Google Java Format, isort, Ktlint, PHP CS Fixer, Prettier, RuboCop, Ruff Formatter, Rustfmt, Scalafmt, StandardJS, StandardRB, swift-format and Yapf This commit fixes the style issues introduced in 12e0a41 according to the output from Autopep8, Black, ClangFormat, dotnet-format, Go fmt, Gofumpt, Google Java Format, isort, Ktlint, PHP CS Fixer, Prettier, RuboCop, Ruff Formatter, Rustfmt, Scalafmt, StandardJS, StandardRB, swift-format and Yapf. Details: None --- ai-auditor-module/audit.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/ai-auditor-module/audit.py b/ai-auditor-module/audit.py index dae3729b0..c63bceb24 100644 --- a/ai-auditor-module/audit.py +++ b/ai-auditor-module/audit.py @@ -3,14 +3,16 @@ from sklearn.preprocessing import StandardScaler # Load AI model -model = joblib.load('ai_model.joblib') +model = joblib.load("ai_model.joblib") # Load smart contract data -smart_contract_data = pd.read_csv('smart_contract_data.csv') +smart_contract_data = pd.read_csv("smart_contract_data.csv") # Preprocess data scaler = StandardScaler() -smart_contract_data[['feature1', 'feature2',...]] = scaler.fit_transform(smart_contract_data[['feature1', 'feature2',...]]) +smart_contract_data[["feature1", "feature2", ...]] = scaler.fit_transform( + smart_contract_data[["feature1", "feature2", ...]] +) # Make predictions predictions = model.predict(smart_contract_data) @@ -18,6 +20,6 @@ # Analyze predictions for i, prediction in enumerate(predictions): if prediction == 1: - print(f'Smart contract {i} is vulnerable!') + print(f"Smart contract {i} is vulnerable!") else: - print(f'Smart contract {i} is secure.') + print(f"Smart contract {i} is secure.")