diff --git a/piker/data/types.py b/piker/data/types.py index c23f6266..4bdb8063 100644 --- a/piker/data/types.py +++ b/piker/data/types.py @@ -49,10 +49,13 @@ class Struct( hasattr(sys, 'ps1') # TODO: check if we're in pdb ): - return f'Struct({pformat(self.to_dict())})' + return self.pformat() return super().__repr__() + def pformat(self) -> str: + return f'Struct({pformat(self.to_dict())})' + def copy( self, update: Optional[dict] = None, diff --git a/piker/ui/_notify.py b/piker/ui/_notify.py index 5879200b..c3da8d4b 100644 --- a/piker/ui/_notify.py +++ b/piker/ui/_notify.py @@ -37,8 +37,8 @@ _dbus_uid: Optional[str] = '' async def notify_from_ems_status_msg( - uuid: str, msg: Status, + duration: int = 3000, is_subproc: bool = False, ) -> None: @@ -84,12 +84,12 @@ async def notify_from_ems_status_msg( [ 'notify-send', '-u', 'normal', - '-t', '1616', + '-t', f'{duration}', 'piker', # TODO: add in standard fill/exec info that maybe we # pack in a broker independent way? - f"'{msg.resp}: {msg.req.price}'", + f"'{msg.pformat()}'", ], ) log.runtime(result)