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:
|
def __init__(self) -> None:
|
||||||
"""Set commands."""
|
"""Set commands."""
|
||||||
|
self.clean = self.get_clean_command()
|
||||||
self.install = self.get_install_command()
|
self.install = self.get_install_command()
|
||||||
|
|
||||||
|
@abstractmethod
|
||||||
|
def get_clean_command(self) -> Command:
|
||||||
|
"""Command to clean packages cache."""
|
||||||
|
|
||||||
@abstractmethod
|
@abstractmethod
|
||||||
def get_install_command(self) -> Command:
|
def get_install_command(self) -> Command:
|
||||||
"""Command to install package(s)."""
|
"""Command to install package(s)."""
|
||||||
|
@ -19,5 +24,6 @@ class PM(ABC):
|
||||||
def __str__(self) -> str:
|
def __str__(self) -> str:
|
||||||
"""Return commands."""
|
"""Return commands."""
|
||||||
return f"""\
|
return f"""\
|
||||||
|
clean = {self.clean}
|
||||||
install = {self.install}
|
install = {self.install}
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -7,6 +7,10 @@ from rwx.ps import Command
|
||||||
class APT(PM):
|
class APT(PM):
|
||||||
"""Advanced Package Tool."""
|
"""Advanced Package Tool."""
|
||||||
|
|
||||||
|
def get_clean_command(self) -> Command:
|
||||||
|
"""Return clean command."""
|
||||||
|
return Command()
|
||||||
|
|
||||||
def get_install_command(self) -> Command:
|
def get_install_command(self) -> Command:
|
||||||
"""Return install command."""
|
"""Return install command."""
|
||||||
return Command()
|
return Command()
|
||||||
|
|
Loading…
Reference in a new issue