Updated for coding style

This commit is contained in:
Dimitris Zlatanidis 2023-04-26 20:21:37 +03:00
parent d33b841ca4
commit 5ee3be74a6
14 changed files with 28 additions and 30 deletions

View file

@ -50,7 +50,7 @@ class Packages(Configs):
self.binary_packages: list = []
self.option_for_reinstall: bool = self.utils.is_option(
['-r', '--reinstall'], self.flags)
['-r', '--reinstall'], flags)
self.option_for_skip_installed: bool = self.utils.is_option(
['-k', '--skip-installed'], flags)

View file

@ -24,7 +24,7 @@ class Required:
self.repos.slint_repo_name
]
self.repo = self.data[name][11]
self.repo: str = data[name][11]
def resolve(self) -> list:
""" Resolve the dependencies. """

View file

@ -28,7 +28,7 @@ class CheckUpdates(Configs):
self.compare: dict = {}
self.option_for_binaries: bool = self.utils.is_option(
['-B', '--bin-repo='], self.flags)
['-B', '--bin-repo='], flags)
def check(self) -> dict:
if self.option_for_binaries:

View file

@ -28,7 +28,7 @@ class Check(Configs):
self.session = Session
self.option_for_binaries: bool = self.utils.is_option(
['-B', '--bin-repo='], self.flags)
['-B', '--bin-repo='], flags)
if self.option_for_binaries:
self.repo_table = BinariesTable

View file

@ -27,13 +27,13 @@ class Dependees(Configs):
self.var: str = self.ascii.vertical_and_right
self.option_for_full_reverse: bool = self.utils.is_option(
['-E', '--full-reverse'], self.flags)
['-E', '--full-reverse'], flags)
self.option_for_pkg_version: bool = self.utils.is_option(
['-p', '--pkg-version'], self.flags)
['-p', '--pkg-version'], flags)
self.option_for_binaries: bool = self.utils.is_option(
['-B', '--bin-repo='], self.flags)
['-B', '--bin-repo='], flags)
def find(self) -> None:
""" Collecting the dependees. """

View file

@ -27,10 +27,10 @@ class Download(Configs):
self.session = Session
self.option_for_directory: bool = self.utils.is_option(
['-z', '--directory='], self.flags)
['-z', '--directory='], flags)
self.option_for_binaries: bool = self.utils.is_option(
['-B', '--bin-repo='], self.flags)
['-B', '--bin-repo='], flags)
def packages(self, data: dict, packages: list) -> None:
""" Download the package only. """

View file

@ -25,7 +25,7 @@ class Downloader(Configs):
self.utils = Utilities()
self.option_for_parallel: bool = self.utils.is_option(
['-P', '--parallel'], self.flags)
['-P', '--parallel'], flags)
def download(self) -> None:
""" Starting the processing for downloading. """

View file

@ -52,7 +52,7 @@ class Argparse(Configs):
self.binary_repo: str = ''
if len(self.args) == 0 or '' in self.args:
if len(args) == 0 or '' in args:
self.usage.help_short(1)
self.data: dict = {}

View file

@ -25,7 +25,7 @@ class RemovePackages(Configs):
self.session = Session
self.utils = Utilities()
self.progress = ProgressBar()
self.view = ViewMessage(self.flags)
self.view = ViewMessage(flags)
self.process_message: str = ''
self.installed_packages: list = []
@ -34,13 +34,13 @@ class RemovePackages(Configs):
self.stdout = None
self.option_resolve_off: bool = self.utils.is_option(
['-o', '--resolve-off'], self.flags)
['-o', '--resolve-off'], flags)
self.option_for_no_silent: bool = self.utils.is_option(
['-n', '--no-silent'], self.flags)
['-n', '--no-silent'], flags)
self.option_for_yes: bool = self.utils.is_option(
['-y', '--yes'], self.flags)
['-y', '--yes'], flags)
def remove(self) -> None:
""" Removes package with dependencies. """

View file

@ -19,7 +19,7 @@ class SearchPackage(Configs):
self.repos = Repositories()
self.option_for_binaries: bool = self.utils.is_option(
['-B', '--bin-repo='], self.flags)
['-B', '--bin-repo='], flags)
def package(self, data: dict, packages: list, repo: str) -> None:
""" Searching and print the matched packages. """

View file

@ -22,10 +22,10 @@ class Tracking(Configs):
self.vl: str = self.ascii.vertical_line
self.option_for_pkg_version: bool = self.utils.is_option(
['-p', '--pkg-version'], self.flags)
['-p', '--pkg-version'], flags)
self.option_for_binaries: bool = self.utils.is_option(
['-B', '--bin-repo='], self.flags)
['-B', '--bin-repo='], flags)
def packages(self, data: dict, packages: list) -> None:
""" Prints the packages dependencies. """

View file

@ -36,17 +36,15 @@ class UpdateRepository(Configs):
self.utils = Utilities()
self.data = InstallData()
self.check_updates = CheckUpdates(
self.flags, self.repo
)
self.check_updates = CheckUpdates(flags, repo)
self.repos_for_update: dict = {}
self.option_for_generate: bool = self.utils.is_option(
['-G', '--generate-only'], self.flags)
['-G', '--generate-only'], flags)
self.option_for_binaries: bool = self.utils.is_option(
['-B', '--bin-repo='], self.flags)
['-B', '--bin-repo='], flags)
def update_the_repositories(self) -> None:
if not any(list(self.repos_for_update.values())) or self.repo == '*':

View file

@ -35,7 +35,7 @@ class ViewPackage(Configs):
self.repo_tar_suffix: str = ''
self.option_for_pkg_version: bool = self.utils.is_option(
['-p', '--pkg-version'], self.flags)
['-p', '--pkg-version'], flags)
def slackbuild(self, data: dict, slackbuilds: list) -> None:
""" View the packages from the repository. """

View file

@ -28,25 +28,25 @@ class ViewMessage(Configs):
self.utils = Utilities()
self.dialogbox = DialogBox()
self.ascii = Ascii()
self.upgrade = Upgrade(self.flags, self.data)
self.upgrade = Upgrade(flags, data)
self.repos = Repositories()
self.download_only: Path = self.tmp_slpkg
self.installed_packages: list = []
self.option_for_resolve_off: bool = self.utils.is_option(
['-o', '--resolve-off'], self.flags)
['-o', '--resolve-off'], flags)
self.option_for_reinstall: bool = self.utils.is_option(
['-r', '--reinstall'], self.flags)
['-r', '--reinstall'], flags)
self.option_for_yes: bool = self.utils.is_option(
['-y', '--yes'], self.flags)
['-y', '--yes'], flags)
self.option_for_binaries: bool = self.utils.is_option(
['-B', '--bin-repo='], self.flags)
['-B', '--bin-repo='], flags)
self.repo: str = self.utils.repository_name(self.data)
self.repo: str = self.utils.repository_name(data)
def view_packages(self, package: str, mode: str) -> None:
""" Printing the main packages. """