2026-06-01 10:04:38 +02:00
|
|
|
from __future__ import annotations
|
2026-04-24 11:04:22 +02:00
|
|
|
|
App, lib, cmds: Fix mypy.explicit-override fallout
This commit adds @override decorators to approximately 300 methods
across 76 files that inherit from base classes such as AbstractCmd,
FileContext, ExecContext, Distro, SSHClient, and others.
The decorator ensures the type checker can verify that overridden
methods have compatible signatures and prevents accidental shadowing
of inherited methods without intent.
Files modified include command classes, library modules, distro
implementations, and SSH client implementations.
Assisted-by: unsloth/Qwen3.6-35B-A3B-GGUF:IQ4_NL with pi.dev v
Signed-off-by: Jan Lindemann <jan@janware.com>
2026-07-22 15:51:14 +02:00
|
|
|
from typing import TYPE_CHECKING, override
|
2026-04-24 11:04:22 +02:00
|
|
|
|
2026-06-01 10:04:38 +02:00
|
|
|
from .Cmd import Cmd, Parent
|
2026-04-24 11:04:22 +02:00
|
|
|
|
2026-06-01 10:04:38 +02:00
|
|
|
if TYPE_CHECKING:
|
2026-07-22 23:03:53 +02:00
|
|
|
from argparse import ArgumentParser, Namespace
|
2026-06-01 10:04:38 +02:00
|
|
|
|
|
|
|
|
class CmdPkg(Cmd): # export
|
|
|
|
|
|
|
|
|
|
def __init__(self, parent: Parent) -> None:
|
2026-06-18 10:15:37 +02:00
|
|
|
super().__init__(
|
|
|
|
|
parent,
|
|
|
|
|
'packages',
|
|
|
|
|
aliases = ['pkg'],
|
|
|
|
|
help = 'System package manager wrapper'
|
|
|
|
|
)
|
2026-05-01 10:17:24 +02:00
|
|
|
self.load_subcommands()
|
2026-04-24 11:04:22 +02:00
|
|
|
|
App, lib, cmds: Fix mypy.explicit-override fallout
This commit adds @override decorators to approximately 300 methods
across 76 files that inherit from base classes such as AbstractCmd,
FileContext, ExecContext, Distro, SSHClient, and others.
The decorator ensures the type checker can verify that overridden
methods have compatible signatures and prevents accidental shadowing
of inherited methods without intent.
Files modified include command classes, library modules, distro
implementations, and SSH client implementations.
Assisted-by: unsloth/Qwen3.6-35B-A3B-GGUF:IQ4_NL with pi.dev v
Signed-off-by: Jan Lindemann <jan@janware.com>
2026-07-22 15:51:14 +02:00
|
|
|
@override
|
2026-07-22 23:03:53 +02:00
|
|
|
async def _run(self, args: Namespace) -> None:
|
2026-06-02 10:08:49 +02:00
|
|
|
import sys
|
|
|
|
|
|
|
|
|
|
# Missing subcommand
|
|
|
|
|
self.parser.print_help()
|
|
|
|
|
sys.exit(1)
|
|
|
|
|
|
App, lib, cmds: Fix mypy.explicit-override fallout
This commit adds @override decorators to approximately 300 methods
across 76 files that inherit from base classes such as AbstractCmd,
FileContext, ExecContext, Distro, SSHClient, and others.
The decorator ensures the type checker can verify that overridden
methods have compatible signatures and prevents accidental shadowing
of inherited methods without intent.
Files modified include command classes, library modules, distro
implementations, and SSH client implementations.
Assisted-by: unsloth/Qwen3.6-35B-A3B-GGUF:IQ4_NL with pi.dev v
Signed-off-by: Jan Lindemann <jan@janware.com>
2026-07-22 15:51:14 +02:00
|
|
|
@override
|
2026-06-01 07:45:22 +02:00
|
|
|
def add_arguments(self, parser: ArgumentParser) -> None:
|
|
|
|
|
super().add_arguments(parser)
|