-
Notifications
You must be signed in to change notification settings - Fork 105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
remove hardcoded saferepr limit #154
remove hardcoded saferepr limit #154
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
overall good work at adding more elements
since this adds new behaviour, please add some tests that demonstrate the supported types
@@ -56,7 +56,7 @@ def _callhelper(self, call, x, *args): | |||
s = s[:i] + '...' + s[len(s)-j:] | |||
return s | |||
|
|||
def saferepr(obj, maxsize=240): | |||
def saferepr(obj, maxsize=240,maxother=160, maxarray=6, maxdict=4): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a space is missing here
srepr.maxsize = srepr.maxlong = maxsize | ||
srepr.maxother = maxother | ||
srepr.maxdict = maxdict | ||
srepr.maxlist = srepr.maxarray = srepr.maxset = srepr.maxmaxfrozenset = srepr.maxdeque = srepr.maxtuple = maxarray |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i believe maxmaxfrozenset
is a c&p mistake
This would be very helpful for my team, as well. In our case, we're getting bitten by truncation in the asserts on lists. Anything I can do to help his one along as it looks to have stalled here? |
@dimaspivak since @ApaDoctor doesnt seem to responds and its a simple one, its perhaps easiest to redo the pr |
closing as no longer responsive, |
Py has hardcoded limit of saferepr.
This PR fixes that.