mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2025-02-05 08:46:20 +01:00
Fix for code style
This commit is contained in:
parent
a4ecfe5555
commit
97e7cea203
1 changed files with 6 additions and 1 deletions
|
@ -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:
|
||||
"""
|
||||
|
|
Loading…
Add table
Reference in a new issue