From e7c52aa573167b9b7b4bfd3aa2b02747a22b0578 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Fri, 10 May 2024 12:32: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 9e452d3 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 --- fraud_detection/fraud_response.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fraud_detection/fraud_response.py b/fraud_detection/fraud_response.py index b4ee601cd..199695e3e 100644 --- a/fraud_detection/fraud_response.py +++ b/fraud_detection/fraud_response.py @@ -6,13 +6,13 @@ def __init__(self, fraud_detection_model, anomaly_detection): def respond_to_fraud(self, transactions): for transaction in transactions: fraud_level = self.fraud_detection_model.predict_fraud(transaction) - if fraud_level == 'fraudulent': + if fraud_level == "fraudulent": anomaly_score = self.anomaly_detection.detect_anomalies(transaction) if anomaly_score == -1: # Implement fraud response strategies here # For example, you could flag the transaction for review or decline it altogether - print('Fraudulent transaction detected: Flagged for review') + print("Fraudulent transaction detected: Flagged for review") else: - print('Anomalous transaction detected: Flagged for review') + print("Anomalous transaction detected: Flagged for review") else: - print('Non-fraudulent transaction detected: Transaction approved') + print("Non-fraudulent transaction detected: Transaction approved")