1010import time
1111import typing
1212from concurrent import futures
13- from typing import List , Union
13+ from typing import Union
1414from pathlib import Path
1515import psutil
1616
@@ -688,9 +688,7 @@ def run_import(self, pool: futures.ThreadPoolExecutor):
688688
689689 if n_imports_finished != n_new_imports_finished :
690690 # pylint: disable = consider-using-f-string
691- msg = "Running Imports ... [{0}/{1}] - {2:3.2f}%\r " .format (
692- n_new_imports_finished , len (return_code_futures ), percentage
693- )
691+ msg = f"Running Imports ... [{ n_new_imports_finished } /{ len (return_code_futures )} ] - { percentage :3.2f} %\r "
694692 print (str_running (msg ), end = "" , flush = True )
695693 self .logger .info (msg )
696694
@@ -1091,7 +1089,7 @@ def is_logfile_successful(self, logfile: Path) -> bool:
10911089 success : `bool`
10921090 """
10931091
1094- with open (logfile , "r" , encoding = "utf-8" ) as fp :
1092+ with open (logfile , encoding = "utf-8" ) as fp :
10951093 for line in fp :
10961094 if "successfully" in line :
10971095 return True
@@ -1181,7 +1179,7 @@ def clear_project_dir(self):
11811179 # reinit logger
11821180 self .logger = self ._setup_logger ()
11831181
1184- def read_config_file (self , config_file : str ) -> List [str ]:
1182+ def read_config_file (self , config_file : str ) -> list [str ]:
11851183 """Read a diffcrash config file
11861184
11871185 Parameters
@@ -1203,7 +1201,7 @@ def read_config_file(self, config_file: str) -> List[str]:
12031201 # pylint: disable = too-many-branches
12041202 # pylint: disable = too-many-statements
12051203
1206- with open (config_file , "r" , encoding = "utf-8" ) as conf :
1204+ with open (config_file , encoding = "utf-8" ) as conf :
12071205 conf_lines = conf .readlines ()
12081206 line = 0
12091207
@@ -1303,7 +1301,7 @@ def read_config_file(self, config_file: str) -> List[str]:
13031301
13041302 return export_item_list
13051303
1306- def check_if_logfiles_show_success (self , pattern : str ) -> List [str ]:
1304+ def check_if_logfiles_show_success (self , pattern : str ) -> list [str ]:
13071305 """Check if a logfiles with given pattern show success
13081306
13091307 Parameters
0 commit comments