mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2025-01-07 17:24:57 +01:00
Updated for bool
This commit is contained in:
parent
339559372f
commit
01d07a68f5
1 changed files with 5 additions and 3 deletions
|
@ -6,7 +6,7 @@ import time
|
||||||
import shutil
|
import shutil
|
||||||
import subprocess
|
import subprocess
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import Generator, Any, Union
|
from typing import Generator, Union
|
||||||
|
|
||||||
from slpkg.configs import Configs
|
from slpkg.configs import Configs
|
||||||
from slpkg.blacklist import Blacklist
|
from slpkg.blacklist import Blacklist
|
||||||
|
@ -122,9 +122,11 @@ class Utilities:
|
||||||
return ''.join(re.findall(r'\d+', line))
|
return ''.join(re.findall(r'\d+', line))
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def is_option(flag: list, flags: list) -> Any:
|
def is_option(flag: list, flags: list) -> bool:
|
||||||
""" Checking for flags. """
|
""" 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:
|
def read_packages_from_file(self, file: Path) -> Generator:
|
||||||
""" Reads packages from file and split these to list. """
|
""" Reads packages from file and split these to list. """
|
||||||
|
|
Loading…
Reference in a new issue