Updated for any()

This commit is contained in:
Dimitris Zlatanidis 2023-04-23 21:44:21 +03:00
parent c2120d73be
commit fbaeff8069

View file

@ -57,7 +57,7 @@ class UpdateRepository(Configs):
['-B', '--bin-repo='], self.flags)
def update_the_repositories(self) -> None:
if not self.repos_for_update.values() or self.repo not in self.repos_for_update.keys():
if not any(list(self.repos_for_update.values())) or self.repo == '*':
self.view.question()
else:
print()
@ -611,7 +611,7 @@ class UpdateRepository(Configs):
os.makedirs(path)
def check(self, queue) -> None:
compare = self.check_updates.check()
compare: dict = self.check_updates.check()
print()
for repo, comp in compare.items():
@ -619,7 +619,7 @@ class UpdateRepository(Configs):
print(f"\n{self.endc}There are new updates available for the "
f"'{self.bgreen}{repo}{self.endc}' repository!")
if True not in compare.values():
if not any(list(compare.values())):
print(f'\n{self.endc}{self.yellow}No changes in ChangeLog.txt between your '
f'last update and now.{self.endc}')
@ -649,7 +649,7 @@ class UpdateRepository(Configs):
# Restore the terminal cursor
print('\x1b[?25h', self.endc, end='')
self.repos_for_update = queue.get()
self.repos_for_update: dict = queue.get()
self.update_the_repositories()
def delete_sbo_database_data(self) -> None: