From 4e8dc179fd18408d492da80823d23bebf3aec5fd Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Sat, 11 May 2024 10:40:53 +0000 Subject: [PATCH 1/2] 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 7a5f8d7 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 --- core/credit_card/management.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/core/credit_card/management.py b/core/credit_card/management.py index b4b16f833..2a3eccd74 100644 --- a/core/credit_card/management.py +++ b/core/credit_card/management.py @@ -18,6 +18,7 @@ def charge_purchase(self, amount): self.balance += amount return True + def process_payments(): # Process payments for all issued credit cards for credit_card in issued_credit_cards: @@ -27,6 +28,7 @@ def process_payments(): # Process the payment credit_card.make_payment(payment_amount) + def process_purchases(): # Process purchases for all issued credit cards for credit_card in issued_credit_cards: @@ -38,6 +40,9 @@ def process_purchases(): if not success: # Deny the purchase if the applicant has insufficient credit - print(f"The purchase of {purchase_amount} was denied for credit card {credit_card.credit_card_number}.") + print( + f"The purchase of {purchase_amount} was denied for credit card {credit_card.credit_card_number}." + ) + issued_credit_cards = [] From d3eb98254dfa0651cc010f72366df5a2da70cc5d Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Sat, 11 May 2024 11:06:03 +0000 Subject: [PATCH 2/2] 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 31720d0 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: https://github.com/KOSASIH/pi-nexus-autonomous-banking-network/pull/136 --- core/credit_card/management.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/core/credit_card/management.py b/core/credit_card/management.py index 6f6f1b029..92f61d6fb 100644 --- a/core/credit_card/management.py +++ b/core/credit_card/management.py @@ -10,7 +10,6 @@ def __init__(self, card_number, limit): self.closed = False - def process_payments(): for card in all_cards: amount_due = card.balance * (1 + card.interest_rate) @@ -20,7 +19,6 @@ def process_payments(): card.balance = 0 - def process_purchases(): for card in all_cards: if card.closed: @@ -57,6 +55,5 @@ def deny_credit(card): card.closed = True - # Initialize list of all credit cards all_cards = []