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>
This commit is contained in:
parent
30a00df5c7
commit
5fa008be5a
78 changed files with 263 additions and 81 deletions
|
|
@ -10,7 +10,7 @@ import sys
|
|||
|
||||
from enum import Enum, auto
|
||||
from functools import cache
|
||||
from typing import TYPE_CHECKING
|
||||
from typing import override, TYPE_CHECKING
|
||||
|
||||
from .lib.App import App as Base
|
||||
from .lib.Distro import Distro
|
||||
|
|
@ -374,11 +374,13 @@ class App(Base):
|
|||
default_pkg_filter = pkg_filter,
|
||||
)
|
||||
|
||||
@override
|
||||
async def __aexit__(self, exc_type, exc, tb) -> None:
|
||||
if self.__exec_context is not None:
|
||||
await self.__exec_context.close()
|
||||
self.__exec_context = None
|
||||
|
||||
@override
|
||||
def _add_arguments(self, parser) -> None:
|
||||
super()._add_arguments(parser)
|
||||
parser.add_argument('-t', '--topdir', default = None, help = 'Project Path')
|
||||
|
|
@ -421,6 +423,7 @@ class App(Base):
|
|||
help = 'Default filter for all distribution package-related operations',
|
||||
)
|
||||
|
||||
@override
|
||||
async def _run(self, args: argparse.Namespace) -> None:
|
||||
self.___topdir = args.topdir
|
||||
self.___pretty_topdir = self.__format_topdir(self.___topdir, args.topdir_format)
|
||||
|
|
|
|||
Loading…
Reference in a new issue