From 959f4116891c6c1ef5207dec8b330cac94b1a11f Mon Sep 17 00:00:00 2001 From: Justus Mueller <justus.mueller@fau.de> Date: Thu, 13 Jun 2024 20:42:38 +0200 Subject: [PATCH] chore: Edit whitespace --- src/drive_handle.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/drive_handle.py b/src/drive_handle.py index 371cade..3ba65a5 100644 --- a/src/drive_handle.py +++ b/src/drive_handle.py @@ -1,5 +1,4 @@ import ctypes -import errno import os import shutil import subprocess @@ -152,13 +151,13 @@ class DriveHandle: path (str): The path to the pattern file """ print(colored(f"[DriveHandle] Writing a file ({path}) with a rolling pattern to fill the disk.", "light_grey")) - pattern_start_symbol : chr = 'A' - iteration : int = 0 + pattern_start_symbol: chr = 'A' + iteration: int = 0 (_, _, cluster_size) = self.get_allocation_unit_sizes() progressbar = Spinner('[DriveHandle] Writing the pattern file') with open(path, "wb") as file_descriptor: - while os.path.getsize(path)+cluster_size < self.get_free_drive_space(): - current_pattern_symbol : chr = chr(ord(pattern_start_symbol)+iteration) + while os.path.getsize(path) + cluster_size < self.get_free_drive_space(): + current_pattern_symbol: chr = chr(ord(pattern_start_symbol) + iteration) file_descriptor.write(current_pattern_symbol.encode() * cluster_size) iteration = (iteration + 1) % 26 progressbar.next() -- GitLab