Fixed code style

Signed-off-by: Dimitris Zlatanidis <d.zlatanidis@gmail.com>
This commit is contained in:
Dimitris Zlatanidis 2022-12-07 17:47:10 +02:00
parent 1b69429f64
commit a3daaa1ab8
3 changed files with 14 additions and 12 deletions

View file

@ -25,6 +25,15 @@ class Argparse:
def __init__(self, args):
self.args: list = args
self.usage = Usage()
if len(self.args) == 0:
self.usage.help_short()
self.flags = []
self.check = Check()
self.configs = Configs
self.check.blacklist(self.args)
self.options = ['--yes',
'--jobs',
@ -32,18 +41,6 @@ class Argparse:
'--reinstall',
'--skip-installed']
if len(self.args) == 0:
self.usage.help_short()
self.flags = []
self.configs = Configs
self.usage = Usage()
self.flag()
self.check = Check()
self.check.blacklist(self.args)
def flag(self):
for option in self.options:
if option in self.args:
self.args.remove(option)

View file

@ -19,6 +19,7 @@ class ViewPackage:
self.colors = self.configs.colour
def package(self, packages):
""" View the packages from the repository. """
http = urllib3.PoolManager()
color = self.colors()
green = color['green']

View file

@ -24,6 +24,7 @@ class ViewMessage:
self.installed_packages = []
def build_packages(self, slackbuilds: list, dependencies: list):
""" View packages for build only. """
print('The following packages will be build:\n')
for sbo in slackbuilds:
@ -39,6 +40,7 @@ class ViewMessage:
self._view_total(slackbuilds, dependencies, option='build')
def install_packages(self, slackbuilds: list, dependencies: list):
""" View packages for install. """
print('The following packages will be installed or upgraded:\n')
for sbo in slackbuilds:
@ -176,6 +178,7 @@ class ViewMessage:
f'will be removed.{color["endc"]}')
def logs_packages(self, dependencies):
""" View the logging packages. """
print('The following logs will be removed:\n')
color = self.colors()
@ -186,6 +189,7 @@ class ViewMessage:
print('Note: After cleaning you should remove them one by one.')
def question(self):
""" Manage the proceed. """
if '--yes' not in self.flags:
answer = input('\nDo you want to continue [y/N]: ')
print()