jw-pkg/src/python/jw/pkg/CmdBase.py
Jan Lindemann 5d77955ed9
py-check.mk: Run isort with "make format"
If /usr/bin/isort is found, run it during "make format" to get a
defined way the imports are sorted. tool.isort in pyproject.toml is
updated to match the other fixers.

Commit the fallout of this change. Running the other fixers alone
doesn't change the formatting, so this should be safe.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-08-11 16:45:14 +02:00

16 lines
404 B
Python

from typing import override
from .App import App
from .lib.Cmd import Cmd as Base
class CmdBase(Base):
@override # pyright: ignore[reportArgumentType]
@property
def app(self) -> App:
ret = super().app
if not isinstance(ret, App):
raise TypeError(
f'Expected {self.__class__.__name__}, got {type(ret).__name__}'
)
return ret