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

Expand width of docstring pop up to accomodate commonly used docstring widths #9085

Closed
joelostblom opened this issue Sep 27, 2020 · 2 comments · Fixed by #9134
Closed

Expand width of docstring pop up to accomodate commonly used docstring widths #9085

joelostblom opened this issue Sep 27, 2020 · 2 comments · Fixed by #9134
Labels
enhancement status:resolved-locked Closed issues are locked after 30 days inactivity. Please open a new issue for related discussion.

Comments

@joelostblom
Copy link
Contributor

The docstring pop up (Shift + Tab) currently wraps lines that are over 75 characters. Many libraries have docstrings that are just a bit longer than this. I believe the common longer lengths include 77, 80, and 82, and I wonder if you would consider changing the default width to wrap at 83 characters instead to avoid line spillover which makes the doscstring hard to read, see screenshots below

Current behavior:
image

Suggested behavior:
image

I did this change in the plotly source earlier and just suggested it to Altair, but I figured it would be easier if JupyterLab (and maybe IPython) could increase the width just slightly instead of me trying to fix one library at a time. Docstrings following the pep8 72 char recommendation would still look good, just have a bit extra space on the side.

I can make this change if someone can point me to where in the code I need to change something, but I am also happy for someone else to do it since I imagine it is just tweaking a number for the width of the popup.

@jasongrout
Copy link
Contributor

Without investigating too much, my guess is that this is the relevant line:

@joelostblom
Copy link
Contributor Author

Thanks @jasongrout ! You are correct and I opened this PR with the change #9134.

@github-actions github-actions bot added the status:resolved-locked Closed issues are locked after 30 days inactivity. Please open a new issue for related discussion. label Apr 8, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement status:resolved-locked Closed issues are locked after 30 days inactivity. Please open a new issue for related discussion.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants