Just drop the pretty repr from our struct for now

agg_feedz
Tyler Goodlet 2022-11-11 13:19:24 -05:00
parent 8476d8d056
commit d6fb6fe3ae
1 changed files with 10 additions and 9 deletions

View File

@ -42,16 +42,17 @@ class Struct(
for f in self.__struct_fields__
}
def __repr__(self):
# only turn on pprint when we detect a python REPL
# at runtime B)
if (
hasattr(sys, 'ps1')
# TODO: check if we're in pdb
):
return self.pformat()
# Lul, doesn't seem to work that well..
# def __repr__(self):
# # only turn on pprint when we detect a python REPL
# # at runtime B)
# if (
# hasattr(sys, 'ps1')
# # TODO: check if we're in pdb
# ):
# return self.pformat()
return super().__repr__()
# return super().__repr__()
def pformat(self) -> str:
return f'Struct({pformat(self.to_dict())})'