From 6b60c228b4877663e3358a9f10694061ba7d9c93 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:29:00 +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 a50f1a4 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 --- risk_management/risk_monitoring.py | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/risk_management/risk_monitoring.py b/risk_management/risk_monitoring.py index 52eaa2db9..653c69773 100644 --- a/risk_management/risk_monitoring.py +++ b/risk_management/risk_monitoring.py @@ -1,5 +1,6 @@ import time + class RiskMonitoring: def __init__(self, risk_assessment_model, risk_mitigation_model): self.risk_assessment_model = risk_assessment_model @@ -8,12 +9,16 @@ def __init__(self, risk_assessment_model, risk_mitigation_model): def monitor_risks(self, transactions): for transaction in transactions: risk_level = self.risk_assessment_model.predict_risk(transaction) - if risk_level == 'high': - mitigation_result = self.risk_mitigation_model.mitigate_risk(transaction) - print(f'High-risk transaction detected: {mitigation_result}') - elif risk_level == 'medium': - mitigation_result = self.risk_mitigation_model.mitigate_risk(transaction) - print(f'Medium-risk transaction detected: {mitigation_result}') + if risk_level == "high": + mitigation_result = self.risk_mitigation_model.mitigate_risk( + transaction + ) + print(f"High-risk transaction detected: {mitigation_result}") + elif risk_level == "medium": + mitigation_result = self.risk_mitigation_model.mitigate_risk( + transaction + ) + print(f"Medium-risk transaction detected: {mitigation_result}") else: - print(f'Low-risk transaction detected: Transaction approved') + print(f"Low-risk transaction detected: Transaction approved") time.sleep(1)