lib.ExecContext: Strip unnecessary args from __init__()

Code beautification: __init__() doesn't use the arguments it grabs by
name from its parameter list, use *args and **kwargs instead.

Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2026-04-23 14:47:45 +02:00
commit efe047fa50
Signed by: jan
GPG key ID: 3750640C9E25DD61

View file

@ -112,7 +112,7 @@ class ExecContext(Base):
wd: str|None, wd: str|None,
log_prefix: str, log_prefix: str,
throw: bool, throw: bool,
verbose: bool verbose: bool,
) -> None: ) -> None:
self.__cmd = cmd self.__cmd = cmd
self.__wd = wd self.__wd = wd
@ -240,8 +240,8 @@ class ExecContext(Base):
def __mode_str(cls, mode: int) -> str: def __mode_str(cls, mode: int) -> str:
return f'{mode:0o}' return f'{mode:0o}'
def __init__(self, uri: str, interactive: bool|None=None, verbose_default=False): def __init__(self, *args, **kwargs) -> None:
super().__init__(uri=uri, interactive=interactive, verbose_default=verbose_default) super().__init__(*args, **kwargs)
@abc.abstractmethod @abc.abstractmethod
def _username(self) -> str: def _username(self) -> str: