13 lines
322 B
Python
13 lines
322 B
Python
|
|
from .App import App
|
||
|
|
from .lib.Cmd import Cmd as Base
|
||
|
|
|
||
|
|
class CmdBase(Base):
|
||
|
|
|
||
|
|
@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
|