mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2024-11-16 07:47:35 +01:00
Fixed D400,D401,D202,D205,D209
This commit is contained in:
parent
5086d950db
commit
3a87210463
1 changed files with 4 additions and 6 deletions
|
@ -16,8 +16,7 @@ from slpkg.multi_process import MultiProcess
|
|||
|
||||
|
||||
class RemovePackages(Configs): # pylint: disable=[R0902]
|
||||
"""Removes installed packages with dependencies if they
|
||||
installed with slpkg install command."""
|
||||
"""Remove installed packages with dependencies."""
|
||||
|
||||
def __init__(self, packages: list, flags: list):
|
||||
super(Configs, self).__init__()
|
||||
|
@ -40,7 +39,7 @@ class RemovePackages(Configs): # pylint: disable=[R0902]
|
|||
('-O', '--resolve-off'), flags)
|
||||
|
||||
def remove(self, upgrade: bool = False) -> None:
|
||||
"""Remove packages
|
||||
"""Remove packages.
|
||||
|
||||
Args:
|
||||
upgrade (bool, optional): Is packages comes from upgrade method.
|
||||
|
@ -104,11 +103,11 @@ class RemovePackages(Configs): # pylint: disable=[R0902]
|
|||
print(f"{'':>2}{pkg} {self.grey}{ver}{self.endc}")
|
||||
|
||||
def remove_doubles_dependencies(self) -> None:
|
||||
"""Removes doubles packages."""
|
||||
"""Remove doubles packages."""
|
||||
self.dependencies: list = list(set(self.dependencies))
|
||||
|
||||
def add_installed_dependencies_to_remove(self) -> None:
|
||||
"""Adds dependencies for remove."""
|
||||
"""Add dependencies for remove."""
|
||||
for dep in self.dependencies:
|
||||
installed: str = self.utils.is_package_installed(dep)
|
||||
if installed:
|
||||
|
@ -116,7 +115,6 @@ class RemovePackages(Configs): # pylint: disable=[R0902]
|
|||
|
||||
def remove_packages(self) -> None:
|
||||
"""Remove packages."""
|
||||
|
||||
# Remove old slpkg.log file.
|
||||
if self.slpkg_log_file.is_file():
|
||||
self.slpkg_log_file.unlink()
|
||||
|
|
Loading…
Reference in a new issue