From 7379dc03affb89e51722d1c5538ba8b69837ea9c Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Mon, 15 Aug 2022 13:36:32 -0400 Subject: [PATCH] The `ps1` check doesn't work for `pdb`.. --- piker/data/types.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/piker/data/types.py b/piker/data/types.py index 9b08b432..c23f6266 100644 --- a/piker/data/types.py +++ b/piker/data/types.py @@ -45,7 +45,10 @@ class Struct( def __repr__(self): # only turn on pprint when we detect a python REPL # at runtime B) - if hasattr(sys, 'ps1'): + if ( + hasattr(sys, 'ps1') + # TODO: check if we're in pdb + ): return f'Struct({pformat(self.to_dict())})' return super().__repr__()