From 0fa2555b414aee77c1fc22e0f4b7e511a67c3605 Mon Sep 17 00:00:00 2001 From: Dimitris Zlatanidis Date: Sun, 19 May 2024 22:44:11 +0300 Subject: [PATCH] Fixed docstrings Signed-off-by: Dimitris Zlatanidis --- slpkg/tracking.py | 32 ++++++++++++-------------------- 1 file changed, 12 insertions(+), 20 deletions(-) diff --git a/slpkg/tracking.py b/slpkg/tracking.py index f16a15da..707bb8e1 100644 --- a/slpkg/tracking.py +++ b/slpkg/tracking.py @@ -11,10 +11,7 @@ from slpkg.binaries.required import Required class Tracking(Configs): # pylint: disable=[R0902] - - """ - Tracking of the package dependencies. - """ + """Tracking of the package dependencies.""" def __init__(self, data: dict, packages: list, flags: list, repository: str): super(Configs, self).__init__() @@ -41,8 +38,7 @@ class Tracking(Configs): # pylint: disable=[R0902] ('-p', '--pkg-version'), flags) def package(self) -> None: - """ Call methods and prints the results. - """ + """Call methods and prints the results.""" self.view_the_title() for package in self.packages: @@ -62,33 +58,29 @@ class Tracking(Configs): # pylint: disable=[R0902] self.view_summary_of_tracking(package) def view_the_title(self) -> None: - """ Prints the title. - """ + """Prints the title.""" print("The list below shows the packages with dependencies:\n") self.packages: list = self.utils.apply_package_pattern(self.data, self.packages) def view_the_main_package(self) -> None: - """ Prints the main package. - """ + """Prints the main package.""" print(self.package_line) print(f"{'':>1}{self.llc}{self.hl}", end='') def view_requires(self) -> None: - """ Prints the requires. - """ + """Prints the requires.""" if self.count_requires == 1: print(f"{'':>1}{self.require_line}") else: print(f"{'':>4}{self.require_line}") def view_no_dependencies(self) -> None: - """ Prints the message 'No dependencies'. - """ + """Prints the message 'No dependencies'.""" if not self.package_requires: print(f"{'':>1}{self.cyan}No dependencies{self.endc}") def set_the_package_line(self, package: str) -> None: - """ Sets for package line. + """Sets for package line. Args: package (str): Package name. @@ -99,7 +91,7 @@ class Tracking(Configs): # pylint: disable=[R0902] self.package_line: str = f'{self.yellow}{package} {self.package_version}{self.endc}' def set_the_package_require_line(self, require: str) -> None: - """ Sets the requires. + """Sets the requires. Args: require (str): Require name. @@ -116,7 +108,7 @@ class Tracking(Configs): # pylint: disable=[R0902] f'{self.package_dependency_version}') def set_package_dependency_version(self, require: str) -> None: - """ Sets the dependency version. + """Sets the dependency version. Args: require (str): Description @@ -128,7 +120,7 @@ class Tracking(Configs): # pylint: disable=[R0902] ) def set_package_version(self, package: str) -> None: - """ Sets the main package version. + """Sets the main package version. Args: package (str): Package name. @@ -136,7 +128,7 @@ class Tracking(Configs): # pylint: disable=[R0902] self.package_version: str = self.data[package]['version'] def set_package_requires(self, package: str) -> None: - """ Sets for the package require. + """Sets for the package require. Args: package (str): Package name. @@ -156,7 +148,7 @@ class Tracking(Configs): # pylint: disable=[R0902] self.require_length: int = max(len(name) for name in self.package_requires) def view_summary_of_tracking(self, package: str) -> None: - """ Prints the summary. + """Prints the summary. Args: package (str): Package name.