From 6d6bdca1d1507dba670ca96c2e47b732d626c0f5 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Fri, 10 May 2024 13:56: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 06f5ed4 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 --- blockchain/miner.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/blockchain/miner.py b/blockchain/miner.py index 2a0a17daf..024156d65 100644 --- a/blockchain/miner.py +++ b/blockchain/miner.py @@ -1,6 +1,8 @@ import time + from blockchain.block import Blockchain + class Miner: def __init__(self, blockchain): self.blockchain = blockchain @@ -9,12 +11,12 @@ def mine_block(self, data): while True: if self.blockchain.is_chain_valid(self.blockchain.chain): self.blockchain.add_block(data) - print('Block successfully mined!') - print('Proof of work: {}'.format(self.blockchain.chain[-1].hash)) + print("Block successfully mined!") + print("Proof of work: {}".format(self.blockchain.chain[-1].hash)) break else: - print('Block not mined. Invalid chain.') + print("Block not mined. Invalid chain.") self.blockchain.chain = [self.blockchain.create_genesis_block()] self.blockchain.difficulty += 1 - print('New difficulty: {}'.format(self.blockchain.difficulty)) + print("New difficulty: {}".format(self.blockchain.difficulty)) time.sleep(1)