question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Improve automatic generation of docstrings

See original GitHub issue

Issue Report Checklist

  • Searched the issues page for similar reports
  • Read the relevant sections of the Spyder Troubleshooting Guide and followed its advice
  • Reproduced the issue after updating with conda update spyder (or pip, if not using Anaconda)
  • Could not reproduce inside jupyter qtconsole (if console-related)
  • Tried basic troubleshooting (if a bug/error)
    • Restarted Spyder
    • Reset preferences with spyder --reset
    • Reinstalled the latest version of Anaconda
    • Tried the other applicable steps from the Troubleshooting Guide
  • Completed the Problem Description, Steps to Reproduce and Version sections below

Problem Description

  1. In the editor advanced settings, the shortcut Cmd+Alt+D established for adding docstring is reserved in Mac so it is necessary to change it.
  2. When adding a docstring and trying to delete it pressing Cmd+z, the text is not deleted completely.
  3. It is necessary to add an icon to show when the program is loading the docstring. Spyder just seem to be frozen while the docstring appears.

What steps reproduce the problem?

  1. Open advanced settings in editor
  2. Select dosctring
  3. Press cmd+alt+D

What is the expected output? What do you see instead?

It should generate the automatic docstring but it doesn’t have any effect on Spyder.

Paste Traceback/Error Below (if applicable)


PASTE TRACEBACK HERE

Versions

  • Spyder version:
  • Python version:
  • Qt version:
  • PyQt version:
  • Operating System name/version:

Dependencies

PASTE DEPENDENCIES HERE

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
jnsebgosselincommented, Nov 20, 2019

We need to move this work to a thread (to avoid freezes) plus adding the cursor change (+ status bar message) to signal de user.

Would it be possible to add a little timer for the popup too? This is very annoying because I end up very often adding a full automatic docstring by mistake when I only want to do a simple one-liner docstring.

autodocstrings

0reactions
goanpecacommented, Nov 19, 2019

Note: Ctrl+Alt+S is used for the Save All action

Hmmm ok we need a different one :-p

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Generate Docstrings for Data Science Projects
In this article, we examined the following: Importance of docstrings; Common docstring formats; Auto generating docstrings in VsCode with AutoDocString.
Read more >
Automatic documentation generation from code
Reusing signatures and docstrings with autodoc¶ ... If you now build the HTML documentation, the output will be the same! With the advantage...
Read more >
Python auto-generated documentation — 3 tools that will help ...
We have all our modules indexed on the left. What is important to notice pdoc also documented code without docstrings. This is huge...
Read more >
python - How to auto-generate the type of a field in a docstring ...
Open the Editor | General | Smart Keys page of PyCharm settings ⌃⌥S . · In the Enter section, select or clear Insert...
Read more >
autoDocstring: VSCode Python Docstring Generator
Usage · Press enter after opening docstring with triple quotes (configurable """ or ''' ) · Keyboard shortcut: ctrl+shift+2 or cmd+shift+2 for mac....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found