jw.pkg.cmds.distro.backend.*.*: Util -> BeXxx

Don't derive the Backend classes from distro-specifiy Util classes
anylonger, but from command-specific BeXxx base classes.

Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2026-02-17 12:24:12 +01:00
commit 7181849002
15 changed files with 72 additions and 24 deletions

View file

@ -0,0 +1,16 @@
# -*- coding: utf-8 -*-
import abc
from argparse import Namespace
from .Backend import Backend as Base
from ..CmdDup import CmdDup as Parent
class BeDup(Base):
def __init__(self, parent: Parent):
super().__init__(parent)
@abc.abstractmethod
async def run(self, args: Namespace) -> None:
pass

View file

@ -0,0 +1,16 @@
# -*- coding: utf-8 -*-
import abc
from argparse import Namespace
from .Backend import Backend as Base
from ..CmdInstall import CmdInstall as Parent
class BeInstall(Base):
def __init__(self, parent: Parent):
super().__init__(parent)
@abc.abstractmethod
async def run(self, args: Namespace) -> None:
pass

View file

@ -0,0 +1,16 @@
# -*- coding: utf-8 -*-
import abc
from argparse import Namespace
from .Backend import Backend as Base
from ..CmdRefresh import CmdRefresh as Parent
class BeRefresh(Base):
def __init__(self, parent: Parent):
super().__init__(parent)
@abc.abstractmethod
async def run(self, args: Namespace) -> None:
pass

View file

@ -3,9 +3,9 @@
from argparse import Namespace from argparse import Namespace
from ...Cmd import Cmd from ...Cmd import Cmd
from .Util import Util from ..BeDup import BeDup as Base
class Dup(Util): class Dup(Base):
def __init__(self, parent: Cmd): def __init__(self, parent: Cmd):
super().__init__(parent) super().__init__(parent)

View file

@ -3,9 +3,9 @@
from argparse import Namespace from argparse import Namespace
from ...Cmd import Cmd from ...Cmd import Cmd
from .Util import Util from ..BeInstall import BeInstall as Base
class Install(Util): class Install(Base):
def __init__(self, parent: Cmd): def __init__(self, parent: Cmd):
super().__init__(parent) super().__init__(parent)

View file

@ -3,9 +3,9 @@
from argparse import Namespace from argparse import Namespace
from ...Cmd import Cmd from ...Cmd import Cmd
from .Util import Util from ..BeRefresh import BeRefresh as Base
class Refresh(Util): class Refresh(Base):
def __init__(self, parent: Cmd): def __init__(self, parent: Cmd):
super().__init__(parent) super().__init__(parent)

View file

@ -3,9 +3,9 @@
from argparse import Namespace from argparse import Namespace
from ...Cmd import Cmd from ...Cmd import Cmd
from .Util import Util from ..BeDup import BeDup as Base
class Dup(Util): class Dup(Base):
def __init__(self, parent: Cmd): def __init__(self, parent: Cmd):
super().__init__(parent) super().__init__(parent)

View file

@ -3,9 +3,9 @@
from argparse import Namespace from argparse import Namespace
from ...Cmd import Cmd from ...Cmd import Cmd
from .Util import Util from ..BeInstall import BeInstall as Base
class Install(Util): class Install(Base):
def __init__(self, parent: Cmd): def __init__(self, parent: Cmd):
super().__init__(parent) super().__init__(parent)

View file

@ -3,9 +3,9 @@
from argparse import Namespace from argparse import Namespace
from ...Cmd import Cmd from ...Cmd import Cmd
from .Util import Util from ..BeRefresh import BeRefresh as Base
class Refresh(Util): class Refresh(Base):
def __init__(self, parent: Cmd): def __init__(self, parent: Cmd):
super().__init__(parent) super().__init__(parent)

View file

@ -3,9 +3,9 @@
from argparse import Namespace from argparse import Namespace
from ...Cmd import Cmd from ...Cmd import Cmd
from .Util import Util from ..BeDup import BeDup as Base
class Dup(Util): class Dup(Base):
def __init__(self, parent: Cmd): def __init__(self, parent: Cmd):
super().__init__(parent) super().__init__(parent)

View file

@ -3,9 +3,9 @@
from argparse import Namespace from argparse import Namespace
from ...Cmd import Cmd from ...Cmd import Cmd
from .Util import Util from ..BeInstall import BeInstall as Base
class Install(Util): class Install(Base):
def __init__(self, parent: Cmd): def __init__(self, parent: Cmd):
super().__init__(parent) super().__init__(parent)

View file

@ -3,9 +3,9 @@
from argparse import Namespace from argparse import Namespace
from ...Cmd import Cmd from ...Cmd import Cmd
from .Util import Util from ..BeRefresh import BeRefresh as Base
class Refresh(Util): class Refresh(Base):
def __init__(self, parent: Cmd): def __init__(self, parent: Cmd):
super().__init__(parent) super().__init__(parent)

View file

@ -3,9 +3,9 @@
from argparse import Namespace from argparse import Namespace
from ...Cmd import Cmd from ...Cmd import Cmd
from .Util import Util from ..BeDup import BeDup as Base
class Dup(Util): class Dup(Base):
def __init__(self, parent: Cmd): def __init__(self, parent: Cmd):
super().__init__(parent) super().__init__(parent)

View file

@ -3,9 +3,9 @@
from argparse import Namespace from argparse import Namespace
from ...Cmd import Cmd from ...Cmd import Cmd
from .Util import Util from ..BeInstall import BeInstall as Base
class Install(Util): class Install(Base):
def __init__(self, parent: Cmd): def __init__(self, parent: Cmd):
super().__init__(parent) super().__init__(parent)

View file

@ -3,9 +3,9 @@
from argparse import Namespace from argparse import Namespace
from ...Cmd import Cmd from ...Cmd import Cmd
from .Util import Util from ..BeRefresh import BeRefresh as Base
class Refresh(Util): class Refresh(Base):
def __init__(self, parent: Cmd): def __init__(self, parent: Cmd):
super().__init__(parent) super().__init__(parent)