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

Base component __repr__ logic is wrong. #491

Closed
rmarren1 opened this issue Dec 14, 2018 · 2 comments
Closed

Base component __repr__ logic is wrong. #491

rmarren1 opened this issue Dec 14, 2018 · 2 comments

Comments

@rmarren1
Copy link
Contributor

Base component __repr__ is broken. It assumed that _prop_names[0] is always children, which is not true.

This breaks some things, for example if a component does not have children and thus its first prop is id, it will print the id as the first positional argument rather than a proper keyword argument. This is mostly relevant for dash-html-components.

For example:

Python 2.7.15rc1 (default, Nov 12 2018, 14:31:15) 
[GCC 7.3.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import dash_core_components as dcc
>>> dcc.RadioItems(id='hello') 
RadioItems('hello')
>>> import dash_html_components as html
>>> html.Div(id='hello')
Div(id='hello')
@rmarren1
Copy link
Contributor Author

rmarren1 commented Dec 14, 2018

will fix in upcoming PR for #311

@gvwilson
Copy link
Contributor

Hi - we are tidying up stale issues and PRs in Plotly's public repositories so that we can focus on things that are most important to our community. If this issue is still a concern, please add a comment letting us know what recent version of our software you've checked it with so that I can reopen it and add it to our backlog. (Please note that we will give priority to reports that include a short reproducible example.) If you'd like to submit a PR, we'd be happy to prioritize a review, and if it's a request for tech support, please post in our community forum. Thank you - @gvwilson

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

No branches or pull requests

4 participants
@gvwilson @Marc-Andre-Rivet @rmarren1 and others