From 5dfaf5cf93a5d0652699d5b4c599b69976ce572e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sara=20Monz=C3=B3n?= Date: Tue, 3 Oct 2023 10:00:07 +0200 Subject: [PATCH] linting --- bu_isciii/archive.py | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/bu_isciii/archive.py b/bu_isciii/archive.py index 1ff8f249..d5b3f3d6 100644 --- a/bu_isciii/archive.py +++ b/bu_isciii/archive.py @@ -421,10 +421,12 @@ def targz_directory(self, direction): if os.path.exists(dir_to_tar + ".tar.gz"): stderr.print( f"Seems like service {service} has already been compressed in the {location_check} dir", - f"Path: {dir_to_tar + '.tar.gz'}\n" + f"Path: {dir_to_tar + '.tar.gz'}\n", ) if self.skip_prompts: - prompt_response = f"Delete previous {service + '.tar.gz'} and compress again" + prompt_response = ( + f"Delete previous {service + '.tar.gz'} and compress again" + ) message = "automatically selected due to --skip-prompts" else: message = "selected throught prompt" @@ -438,17 +440,22 @@ def targz_directory(self, direction): try: if prompt_response: - if (prompt_response.startswith("Delete")): + if prompt_response.startswith("Delete"): log.info( - f"Service {service}: compressed service {dir_to_tar + '.tar.gz'} was already found." - f"Option chosen is to DELETE it ({message})" - "Compression process will be performed again." - ) + f"Service {service}: compressed service {dir_to_tar + '.tar.gz'} was already found." + f"Option chosen is to DELETE it ({message})" + "Compression process will be performed again." + ) os.remove(dir_to_tar + ".tar.gz") else: - self.services[service]["compressed"] = "Found already compressed" + self.services[service][ + "compressed" + ] = "Found already compressed" - if not self.services[service]["compressed"] == "Found already compressed": + if ( + not self.services[service]["compressed"] + == "Found already compressed" + ): stderr.print(f"Compressing service {service}") bu_isciii.utils.targz_dir(dir_to_tar + ".tar.gz", dir_to_tar) self.services[service]["compressed"] = "Successfully compressed" @@ -1151,7 +1158,7 @@ def generate_tsv_table(self, filename): "Moving process": None, "Uncompressing process": None, "Deletion process": None, - "Error": None + "Error": None, } infile.write("\t".join(list(csv_dict.keys())) + "\n")