The `ps1` check doesn't work for `pdb`..

open_order_loading
Tyler Goodlet 2022-08-15 13:36:32 -04:00
parent a602c47d47
commit 7379dc03af
1 changed files with 4 additions and 1 deletions

View File

@ -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__()