From 43ca8671c7572fb5f41aa6324b41157e6d40bad2 Mon Sep 17 00:00:00 2001 From: Dimitris Zlatanidis Date: Sun, 19 May 2024 21:06:25 +0300 Subject: [PATCH] Fixed docstrings --- slpkg/upgrade.py | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/slpkg/upgrade.py b/slpkg/upgrade.py index 764464ce..c29f2e1b 100644 --- a/slpkg/upgrade.py +++ b/slpkg/upgrade.py @@ -15,10 +15,7 @@ from slpkg.load_data import LoadData class Upgrade(Configs): # pylint: disable=[R0902] - - """ - Upgrade the installed packages. - """ + """Upgrade the installed packages.""" def __init__(self, repository: str, data: dict): super(Configs, self).__init__() @@ -42,7 +39,7 @@ class Upgrade(Configs): # pylint: disable=[R0902] self.check_run: bool = False def load_installed_packages(self, repository: str) -> None: - """Summary + """Load installed packages. Args: repository (str): Repository name. @@ -74,8 +71,8 @@ class Upgrade(Configs): # pylint: disable=[R0902] self.installed_packages: list = list(self.log_packages.glob(f'*{repo_tag}')) def packages(self) -> Generator: - """ Returns the upgradeable packages. - """ + """Returns the upgradeable packages.""" + # Delete log file before starts. if self.upgrade_log_file.is_file(): self.upgrade_log_file.unlink() @@ -149,8 +146,7 @@ class Upgrade(Configs): # pylint: disable=[R0902] f"Repo: {self.repository}\n") def check_packages(self) -> None: - """ Checks only which packages are upgradeable. - """ + """Checks only which packages are upgradeable.""" self.check_run: bool = True repo_data: dict = {} found_packages: dict = {} @@ -227,7 +223,7 @@ class Upgrade(Configs): # pylint: disable=[R0902] self._results(found_packages) def _results(self, found_packages: dict) -> None: - """ Prints the results of checking. + """Prints the results of checking. Args: found_packages (dict): Data of packages.