diff --git a/slpkg/blacklist.py b/slpkg/blacklist.py index 13419e4e..02bc9cb1 100644 --- a/slpkg/blacklist.py +++ b/slpkg/blacklist.py @@ -22,14 +22,14 @@ class Blacklist(Configs): # pylint: disable=[R0903] self.toml_errors = TomlErrors() self.blacklist_file_toml: Path = Path(self.etc_path, 'blacklist.toml') - def packages(self) -> tuple: + def packages(self) -> list: """Read the blacklist file.""" - packages: tuple = tuple() + packages: list = [] if self.blacklist_file_toml.is_file(): try: with open(self.blacklist_file_toml, 'rb') as black_file: black: dict = {k.lower(): v for k, v in tomli.load(black_file).items()} - packages: tuple = black['packages'] + packages: list = black['packages'] except (tomli.TOMLDecodeError, KeyError) as error: print() self.toml_errors.raise_toml_error_message(error, self.blacklist_file_toml) diff --git a/tests/test_blacklist.py b/tests/test_blacklist.py index 852047e6..6f814ef2 100644 --- a/tests/test_blacklist.py +++ b/tests/test_blacklist.py @@ -8,7 +8,7 @@ class TestBlacklist(unittest.TestCase): def test_blacklist(self) -> None: """Test blacklist packages.""" black = Blacklist() - self.assertTupleEqual((), black.packages()) + self.assertListEqual([], black.packages()) if __name__ == '__main__':