The `ps1` check doesn't work for `pdb`..
parent
a602c47d47
commit
7379dc03af
|
@ -45,7 +45,10 @@ class Struct(
|
||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
# only turn on pprint when we detect a python REPL
|
# only turn on pprint when we detect a python REPL
|
||||||
# at runtime B)
|
# 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 f'Struct({pformat(self.to_dict())})'
|
||||||
|
|
||||||
return super().__repr__()
|
return super().__repr__()
|
||||||
|
|
Loading…
Reference in New Issue