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
Fix Markup object repr in debug console #1393
Conversation
This fixes issue #1129 |
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.
LGTM once you remove that trailing whitespace
Also, please amend the commit message to be more concise - first line shouldn't be more than 51 chars, and certainly so long that github truncates it. My suggestion would be something like "Fix Markup object repr in debugger" |
174b0d1
to
f06309c
Compare
f06309c
to
c2d6bfa
Compare
I'd like to experiment a little more before merging this. This fix works, but now it ignores subclasses of |
Demo of some alternatives in #1397 |
c3b7f17
to
baffc49
Compare
I ended up committing a different fix that still allows subclasses. Thanks for working on this during the sprints, just digging in and figuring out where things were happening and why was really helpful. New version collapses the repr rather than slicing the original object, then only adds subclass info if the repr looks like the standard string repr. |
baffc49
to
bb57713
Compare
The console was assuming that all objects of string type would only return a string in repr(). This meant that objects that gave response of its object type along with a string in repr were breaking parts of the code that removed the parenthesis. By verifying that an object is a string type instead of a string instance this bug can be fixed.
Fixes #1129