microsoft / pylance-release

Documentation and issues for Pylance
Creative Commons Attribution 4.0 International
1.67k stars 770 forks source link

Docstring templating #5944

Open rchiodo opened 1 month ago

rchiodo commented 1 month ago

In order for people to have consistent output in their docstrings, pylance could offer an automatic template for a docstring whenever the user types ''' or """ in different situations

This would gently push people to use restructured text for their doc strings.

Of course it would be behind a setting.

rchiodo commented 1 month ago

Assigning to Kacie for now. Talk about the idea in triage

dangotbanned commented 2 days ago

I'd appreciate native support that could replace https://marketplace.visualstudio.com/items?itemName=njpwerner.autodocstring as it is very popular, but last updated over 2 years ago and has some issues

Edit: You might also want to consider the user's ruff config (if any), particularly pydocstyle rules