Fixed D401,D202

This commit is contained in:
Dimitris Zlatanidis 2024-05-22 13:50:23 +03:00
parent fbf296042a
commit ecdfcaad12

View file

@ -71,8 +71,7 @@ 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."""
"""Return the upgradeable packages."""
# Delete log file before starts.
if self.upgrade_log_file.is_file():
self.upgrade_log_file.unlink()
@ -95,7 +94,7 @@ class Upgrade(Configs): # pylint: disable=[R0902]
yield name
def is_package_upgradeable(self, installed: str) -> bool: # pylint: disable=[R0911]
"""Returns True for upgradeable packages.
"""Return True for upgradeable packages.
Args:
installed (str): Installed package.
@ -131,7 +130,7 @@ class Upgrade(Configs): # pylint: disable=[R0902]
return False
def _write_log_file(self, installed: str, name: str, err: InvalidVersion) -> None:
"""Writes a log file for invalid versions.
"""Write a log file for invalid versions.
Args:
installed (str): Installed package.
@ -146,7 +145,7 @@ class Upgrade(Configs): # pylint: disable=[R0902]
f"Repo: {self.repository}\n")
def check_packages(self) -> None:
"""Checks only which packages are upgradeable."""
"""Check only which packages are upgradeable."""
self.check_run: bool = True
repo_data: dict = {}
found_packages: dict = {}
@ -223,7 +222,7 @@ class Upgrade(Configs): # pylint: disable=[R0902]
self._results(found_packages)
def _results(self, found_packages: dict) -> None:
"""Prints the results of checking.
"""Print the results of checking.
Args:
found_packages (dict): Data of packages.