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>
16 lines
404 B
Python
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
|