pm/clean
This commit is contained in:
parent
304c2bc617
commit
63c179a0a4
2 changed files with 10 additions and 0 deletions
|
@ -10,8 +10,13 @@ class PM(ABC):
|
|||
|
||||
def __init__(self) -> None:
|
||||
"""Set commands."""
|
||||
self.clean = self.get_clean_command()
|
||||
self.install = self.get_install_command()
|
||||
|
||||
@abstractmethod
|
||||
def get_clean_command(self) -> Command:
|
||||
"""Command to clean packages cache."""
|
||||
|
||||
@abstractmethod
|
||||
def get_install_command(self) -> Command:
|
||||
"""Command to install package(s)."""
|
||||
|
@ -19,5 +24,6 @@ class PM(ABC):
|
|||
def __str__(self) -> str:
|
||||
"""Return commands."""
|
||||
return f"""\
|
||||
clean = {self.clean}
|
||||
install = {self.install}
|
||||
"""
|
||||
|
|
|
@ -7,6 +7,10 @@ from rwx.ps import Command
|
|||
class APT(PM):
|
||||
"""Advanced Package Tool."""
|
||||
|
||||
def get_clean_command(self) -> Command:
|
||||
"""Return clean command."""
|
||||
return Command()
|
||||
|
||||
def get_install_command(self) -> Command:
|
||||
"""Return install command."""
|
||||
return Command()
|
||||
|
|
Loading…
Reference in a new issue