From 01d07a68f5abda0adf21946133472db0c93efd6e Mon Sep 17 00:00:00 2001 From: Dimitris Zlatanidis Date: Thu, 30 Mar 2023 10:46:20 +0300 Subject: [PATCH] Updated for bool --- slpkg/utilities.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/slpkg/utilities.py b/slpkg/utilities.py index 8cc998e4..a793b246 100644 --- a/slpkg/utilities.py +++ b/slpkg/utilities.py @@ -6,7 +6,7 @@ import time import shutil import subprocess from pathlib import Path -from typing import Generator, Any, Union +from typing import Generator, Union from slpkg.configs import Configs from slpkg.blacklist import Blacklist @@ -122,9 +122,11 @@ class Utilities: return ''.join(re.findall(r'\d+', line)) @staticmethod - def is_option(flag: list, flags: list) -> Any: + def is_option(flag: list, flags: list) -> bool: """ Checking for flags. """ - return [f for f in flag if f in flags] + for f in flag: + if f in flags: + return True def read_packages_from_file(self, file: Path) -> Generator: """ Reads packages from file and split these to list. """