Skip to content

Auto generate docstring #62

Closed
Closed

Description

From Don Jayamanne (@DonJayamanne) on June 16, 2016 2:9

Copied from original issue: DonJayamanne/pythonVSCode#165

Activity

  1. DonJayamanne commented on Nov 13, 2017

    @DonJayamanne
    Author

    Suggestions for #183

  2. DonJayamanne commented on Nov 13, 2017

    @DonJayamanne
    Author

    From @diazgilberto on March 9, 2017 18:5

    Is this feature working yet? If so, I can't find in VSC how to make it work.

  3. DonJayamanne commented on Nov 13, 2017

    @DonJayamanne
    Author

    From Matěj Cepl (@mcepl) on March 17, 2017 18:25

    PyCharm has it, so when I define a new function, it gives me at least this:
    new_docstring

  4. DonJayamanne commented on Nov 13, 2017

    @DonJayamanne
    Author

    From Changkun Ou (@changkun) on May 28, 2017 5:59

    looking forward for this feature..

  5. DonJayamanne commented on Nov 13, 2017

    @DonJayamanne
    Author

    From Alisdair Robertson (@robodair) on June 11, 2017 3:22

    Don Jayamanne (@DonJayamanne) I'd like to have a crack at this, at the moment I'm fixing unit tests on master.

    Any pointers on where to start? I'm new to vscode extensions.

  6. DonJayamanne commented on Nov 13, 2017

    @DonJayamanne
    Author

    Alisdair Robertson (@robodair) have a look at the following. My suggestion is to first get it working as a stand alone JavaScript piece of code, then try to plug into vscode using typescript.
    https://packagecontrol.io/packages/AutoDocstring

  7. DonJayamanne commented on Nov 13, 2017

    @DonJayamanne
    Author

    If you need a some more info, let know and I'll try to put something together.

  8. DonJayamanne commented on Nov 13, 2017

    @DonJayamanne
    Author

    From Alisdair Robertson (@robodair) on June 18, 2017 4:16

    Javascript really doesn't seem like the tool for the job here, I feel like I'm fighting with it constantly just to extract arguments (albeit with regex) and there's no way I'm writing a python parser.

    I'm thinking of doing something similar to what you've done with Jedi - so I can call out to some python code to actually work out the docstrings and just tie it into the extension more loosely, possibly adapt or generalise SublimeAutoDocstring to support both VSCode and Sublime.

    Any reason that's a Bad ThingTM?

  9. DonJayamanne commented on Nov 13, 2017

    @DonJayamanne
    Author

    From Siddhartha Gandhi (@gandhis1) on June 18, 2017 4:56

    That's how the entire extension is designed. None of the syntactical components are in JS. It's all Python components.

  10. DonJayamanne commented on Nov 13, 2017

    @DonJayamanne
    Author

    From Alisdair Robertson (@robodair) on June 18, 2017 5:23

    Neat, I'll work on adding this as a completion provider then.

  11. DonJayamanne commented on Nov 13, 2017

    @DonJayamanne
    Author

    From Marcos Barranquero (@Marcos-Barranquero) on August 29, 2017 0:25

    Would be awesome.

  12. DonJayamanne commented on Nov 13, 2017

    @DonJayamanne
    Author

    From Prince Odame (@Odame) on September 2, 2017 8:21

    Looking forward to this feature

  13. 33 remaining items

  14. balta2ar commented on Dec 19, 2017

    @balta2ar

    I'd like to propose supporting these four formats that are supported by pylint (https://github.com/PyCQA/pylint/blob/1.8/pylint/extensions/_check_docs_utils.py#L149) and that are most popular:

    • SphinxDocstring
    • EpytextDocstring
    • GoogleDocstring
    • NumpyDocstring
  15. mcepl commented on Dec 19, 2017

    @mcepl

    Yuri Bochkarev (@balta2ar) ACK. The most important one seems to me what you call SphinxDocstring (https://github.com/DonJayamanne/pythonVSCode/issues/165#issuecomment-287434730), it seems to be the closest to some kind of Python standard, but others are fine with me as well.

  16. robodair commented on Dec 29, 2017

    @robodair

    SphinxDocstring (reST formatter), GoogleDocstring (google formatter), NumpyDocstring (numpy formatter) formatters already exist in pydocstring. I tried to cover the top 3.

    EpytextDocstring looks very similar to Sphinx? Should be very easy to add a formatter for that.

  17. anthonynorthrup314 commented on Dec 30, 2017

    @anthonynorthrup314

    DonJayamanne#38 was closed "in preference for #62 since it has more participants." but the incorrect rendering (or rather, rendering as markdown instead of something more comment-like) the Sphinx style of docstring properly hasn't been addressed, only the auto-generation aspect of the previous issue. What are the plans for changing how the hover tips are displayed?

  18. brettcannon commented on Jan 2, 2018

    @brettcannon
    Member

    Anthony Northrup (@anthonynorthrup314) feel free to open a separate issue for that (DonJayamanne#38 unfortunately listed multiple issues at once).

  19. PatricMahler commented on Jan 9, 2018

    @PatricMahler

    What is the purpose of even having docstrings, espacialliy autodoc, when the most important thing is not working -- displaying them correctly in vscode.

  20. brettcannon commented on Jan 9, 2018

    @brettcannon
    Member

    Patric Mahler (@PatricMahler) people can still read docstrings in the code directly, so there's still usefulness for people regardless of any bugs you might be running into. I assume there's an open issue for the issue you're having?

  21. suederade commented on Mar 7, 2018

    @suederade

    Being able to collapse docstrings would be great too.

  22. DonJayamanne commented on Mar 7, 2018

    @DonJayamanne
    Author

    @stevenmwade

    Being able to collapse docstrings would be great too.

    This work is being tracked in #893 and is in progress (#893, #894) and will be available once VS Code releases the API (unfortunately we're at code freeze, hence this feature will not make it in the current release even if VS Code makes this API public).

  23. brettcannon commented on Mar 19, 2018

    @brettcannon
    Member

    https://marketplace.visualstudio.com/items?itemName=njpwerner.autodocstring provides an extension that will do automatic docstring generation. We are going to advise people to use that extension and if it doesn't work appropriately we can then re-open the discussion.

  24. locked as resolved and limited conversation to collaborators on Jul 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

area-intellisenseLSP-related functionality: auto-complete, docstrings, navigation, refactoring, etc.feature-requestRequest for new features or functionality

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions