From 131b7871086faa1623aaa51a0b953ab36fd5517c Mon Sep 17 00:00:00 2001 From: Vinicius Moreira Date: Fri, 7 Jan 2022 18:23:44 -0300 Subject: [PATCH] [arch] refactoring: proper typing --- bauh/gems/arch/output.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bauh/gems/arch/output.py b/bauh/gems/arch/output.py index f5881cb3..9a1991be 100644 --- a/bauh/gems/arch/output.py +++ b/bauh/gems/arch/output.py @@ -1,7 +1,7 @@ import logging import time from threading import Thread -from typing import Set +from typing import Optional, Collection from bauh.api.abstract.handler import ProcessWatcher from bauh.commons.html import bold @@ -10,13 +10,13 @@ from bauh.view.util.translation import I18n class TransactionStatusHandler(Thread): - def __init__(self, watcher: ProcessWatcher, i18n: I18n, names: Set[str], logger: logging.Logger, + def __init__(self, watcher: ProcessWatcher, i18n: I18n, names: Optional[Collection[str]], logger: logging.Logger, percentage: bool = True, downloading: int = 0, pkgs_to_remove: int = 0): super(TransactionStatusHandler, self).__init__(daemon=True) self.watcher = watcher self.i18n = i18n - self.pkgs_to_sync = len(names) self.names = names + self.pkgs_to_sync = len(names) if names else 0 self.pkgs_to_remove = pkgs_to_remove self.downloading = downloading self.upgrading = 0