Just drop the pretty repr from our struct for now
parent
8476d8d056
commit
d6fb6fe3ae
|
@ -42,16 +42,17 @@ class Struct(
|
||||||
for f in self.__struct_fields__
|
for f in self.__struct_fields__
|
||||||
}
|
}
|
||||||
|
|
||||||
def __repr__(self):
|
# Lul, doesn't seem to work that well..
|
||||||
# only turn on pprint when we detect a python REPL
|
# def __repr__(self):
|
||||||
# at runtime B)
|
# # only turn on pprint when we detect a python REPL
|
||||||
if (
|
# # at runtime B)
|
||||||
hasattr(sys, 'ps1')
|
# if (
|
||||||
# TODO: check if we're in pdb
|
# hasattr(sys, 'ps1')
|
||||||
):
|
# # TODO: check if we're in pdb
|
||||||
return self.pformat()
|
# ):
|
||||||
|
# return self.pformat()
|
||||||
|
|
||||||
return super().__repr__()
|
# return super().__repr__()
|
||||||
|
|
||||||
def pformat(self) -> str:
|
def pformat(self) -> str:
|
||||||
return f'Struct({pformat(self.to_dict())})'
|
return f'Struct({pformat(self.to_dict())})'
|
||||||
|
|
Loading…
Reference in New Issue