diff --git a/CveXplore/database/maintenance/DownloadHandler.py b/CveXplore/database/maintenance/DownloadHandler.py index 39b7c612..958ba6eb 100644 --- a/CveXplore/database/maintenance/DownloadHandler.py +++ b/CveXplore/database/maintenance/DownloadHandler.py @@ -152,7 +152,7 @@ def chunk_list(self, lst: list, number: int) -> list: Yield successive n-sized chunks from lst. """ for i in range(0, len(lst), number): - yield lst[i: i + number] + yield lst[i : i + number] def _db_bulk_writer(self, batch: list): """ diff --git a/CveXplore/database/maintenance/main_updater.py b/CveXplore/database/maintenance/main_updater.py index 8165d5af..7896c7cc 100644 --- a/CveXplore/database/maintenance/main_updater.py +++ b/CveXplore/database/maintenance/main_updater.py @@ -106,7 +106,9 @@ def update(self, update_source: str | list = None): self.datasource.set_handlers_for_collections() self.logger.info(f"Database update complete!") - self.logger.info(f"Update Total duration: {timedelta(seconds=time.time() - start_time)}") + self.logger.info( + f"Update Total duration: {timedelta(seconds=time.time() - start_time)}" + ) def populate(self, populate_source: str | list = None): """ @@ -159,7 +161,9 @@ def populate(self, populate_source: str | list = None): self.datasource.set_handlers_for_collections() self.logger.info(f"Database population complete!") - self.logger.info(f"Populate total duration: {timedelta(seconds=time.time() - start_time)}") + self.logger.info( + f"Populate total duration: {timedelta(seconds=time.time() - start_time)}" + ) def initialize(self): """ @@ -183,4 +187,6 @@ def initialize(self): self.update() self.logger.info(f"Database initialization complete!") - self.logger.info(f"Initialization total duration: {timedelta(seconds=time.time() - start_time)}") + self.logger.info( + f"Initialization total duration: {timedelta(seconds=time.time() - start_time)}" + )