Fix for code style

This commit is contained in:
Dimitris Zlatanidis 2024-04-21 23:59:33 +03:00
parent a4ecfe5555
commit 97e7cea203

View file

@ -1,5 +1,8 @@
#!/usr/bin/python3
# -*- coding: utf-8 -*-
# mypy: disable-error-code="no-redef"
from __future__ import annotations
import os
@ -89,7 +92,7 @@ class Utilities(Configs):
@staticmethod
def finished_time(elapsed_time: float) -> None:
""" Printing the elapsed time. """
print(f'\nFinished:', time.strftime(f'%H:%M:%S', time.gmtime(elapsed_time)))
print('\nFinished:', time.strftime('%H:%M:%S', time.gmtime(elapsed_time)))
@staticmethod
def is_option(options: tuple, flags: list) -> bool:
@ -97,6 +100,7 @@ class Utilities(Configs):
for option in options:
if option in flags:
return True
return False
def read_packages_from_file(self, file: Path) -> Generator:
""" Reads name packages from file and split these to list. """
@ -119,6 +123,7 @@ class Utilities(Configs):
return text_file.readlines()
except FileNotFoundError:
self.errors.raise_error_message(f"No such file or directory: '{file}'", exit_status=20)
return []
def count_file_size(self, name: str) -> int:
"""