Skip to content
This repository was archived by the owner on Aug 29, 2025. It is now read-only.

update docstring to work with dash #1531 - #914

Closed
AnnMarieW wants to merge 1 commit into
plotly:devfrom
AnnMarieW:update-docstrings
Closed

AnnMarieW wants to merge 1 commit into
plotly:devfrom
AnnMarieW:update-docstrings

Conversation

@AnnMarieW

Copy link
Copy Markdown
Contributor

This small change is needed to work with dash #1531

One of the changes in #1531 is to sort the props. A docstring comment that ends with a " in the last prop will cause the component docstring to end with 4 double quotes """" which causes an error in the build. Using a single quote fixes this error.

@alexcjohnson

Copy link
Copy Markdown
Collaborator

Hmm an ending " is going to pop up in 3rd-party components. In fact, including """ in the docstring isn't out of the question, if for example someone tries to include a multiline code example in a docstring. We should handle this case in the component generator, rather than requiring specific formatting for the strings. Perhaps we can replace all " in the docstrings with \"? Anyone looking at the source code will see the backslash but it won't be included when Python turns this into a string.

@AnnMarieW

Copy link
Copy Markdown
Contributor Author

Actually, this PR is no longer needed.

The component generator also updates descriptions so they end with a period, so now the last character of the last prop won't ever be a double quote.

@AnnMarieW AnnMarieW closed this Jan 19, 2021
@AnnMarieW
AnnMarieW deleted the update-docstrings branch January 19, 2021 15:04
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants