Skip to content

Commit

Permalink
style: format code with Autopep8, Black, ClangFormat, dotnet-format, …
Browse files Browse the repository at this point in the history
…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
  • Loading branch information
deepsource-autofix[bot] authored May 10, 2024
1 parent a50f1a4 commit 6b60c22
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions risk_management/risk_monitoring.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import time


class RiskMonitoring:
def __init__(self, risk_assessment_model, risk_mitigation_model):
self.risk_assessment_model = risk_assessment_model
Expand All @@ -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)

0 comments on commit 6b60c22

Please sign in to comment.