Skip to content
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

PR: Make value_to_display more robust #5028

Merged
merged 17 commits into from
Aug 31, 2017

Conversation

ccordoba12
Copy link
Member

@ccordoba12 ccordoba12 commented Aug 22, 2017

Fixes #4221


This PR

  1. Improves how any object is displayed in the Variable Explorer. Now objects will be shown as foo object of bar module (except for know objects, like Dataframes).
  2. Doesn't try to display subclasses of list, dict and tuple, to avoid things like issue Spyder stops executing commands if Variable explorer shows complicated objects #4221 (which was using a generalization of a dict that doesn't have an optimized repr).
  3. Applies value_to_display recursively to the elements of lists, dicts and tuples. This prevents freezes in the Variable Explorer when people add objects with huge repr's as elements of those collection types.

Screenshots:

Before

seleccion_001

After

seleccion_002


TODO:

  • Tests

[skip pep8]

@ccordoba12 ccordoba12 added this to the v3.2.2 milestone Aug 22, 2017
@pep8speaks
Copy link

pep8speaks commented Aug 22, 2017

Hello @ccordoba12! Thanks for updating the PR.

Line 259:5: E722 do not use bare except'
Line 335:80: E501 line too long (81 > 79 characters)
Line 365:21: E722 do not use bare except'

Comment last updated on August 26, 2017 at 22:15 Hours UTC

@goanpeca
Copy link
Member

@ccordoba12 could you add a scrrenshot of how it looks?

@ccordoba12 ccordoba12 force-pushed the improve-value-to-display branch 3 times, most recently from 99f56dd to e35b19a Compare August 26, 2017 22:15
@ccordoba12
Copy link
Member Author

ccordoba12 commented Aug 28, 2017

@goanpeca, I updated the description of this PR and added before/after screenshots.

@jitseniesen, what do you think about this one?

@ccordoba12 ccordoba12 merged commit ad673c4 into spyder-ide:3.x Aug 31, 2017
@ccordoba12 ccordoba12 deleted the improve-value-to-display branch August 31, 2017 02:15
ccordoba12 added a commit that referenced this pull request Aug 31, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants