You can select the docstring and format it using Edit -> Fill paragraph.

Alternatively the only automated tool I can think of (in Pycharm) is the option which automatically wraps the text after the line length reaches certain number of characters; It is available under Code Style settings (Hard wrap at & Wrap on typing). However, this setting is applied on everything (code included), not just docstring.

Answer from mcvincekova on Stack Overflow
🌐
JetBrains
jetbrains.com › help › pycharm › settings-tools-python-integrated-tools.html
Integrated Tools | PyCharm Documentation
January 21, 2026 - Use this page to configure requirements management file, default test runner, and documentation strings treatment · Package requirements file
🌐
JetBrains
jetbrains.com › help › pycharm › creating-documentation-comments.html
Create documentation comments | PyCharm Documentation
January 21, 2026 - In the Docstring format dropdown, select reStructuredText. Then type the opening triple double-quotes and press Enter or Space. PyCharm generates a documentation comment stub in reStructuredText format:
Discussions

python - How can I auto-format a docstring in PyCharm? - Stack Overflow
I frequently have a situation where I'll write a paragraph in a docstring for a function, then come back later and want to add to some part of the middle of the paragraph, and that will make me hav... More on stackoverflow.com
🌐 stackoverflow.com
Change docstring style for a project's entire codebase
You can change the default style that is auto-generated by PyCharm. https://www.jetbrains.com/help/pycharm/settings-tools-python-integrated-tools.html To convert the existing docstrings you will need to use a tool like pyment https://stackoverflow.com/questions/44955366/simple-way-to-convert-python-docstrings-from-restructured-text-to-google-style More on reddit.com
🌐 r/pycharm
4
5
May 17, 2021
What style does PyCharm / IntelliJ use for Python docstrings? - Stack Overflow
1135 What are the most common Python docstring formats? 2 I've been using this docstring syntax for 2 years now, what's it called, who specifies it, and is it "ok" to use it? 16 How to stop PyCharm from populating docstrings? More on stackoverflow.com
🌐 stackoverflow.com
No More Docstring Despair: Highlight Them in VSCode!
This is actually a great idea. Well done. Ideally, this should be built-in in VScode. More on reddit.com
🌐 r/Python
30
103
March 12, 2024
🌐
JetBrains
jetbrains.com › help › pycharm › using-docstrings-to-specify-types.html
Specify types with docstrings | PyCharm Documentation
September 1, 2025 - In the list of intention actions that opens, choose Specify return type in docstring. The reStructuredText is used for all the subsequent examples, but it is possible to use any of the supported formats of the documentation strings, whether it is plain text, Google or NumPy.
🌐
Medium
medium.com › @djnrrd › automatic-documentation-with-pycharm-70d37927df57
Automatic Documentation with PyCharm | by DJ Nrrd | Medium
April 21, 2020 - In the Docstrings section, set the Docstring format to ‘reStructuredText’ and make sure ‘Analyze Python code in doctrings’ is selected. If you type the triple quotes to start your docstring and then press Enter, PyCharm will automatically provide a number of relevant sphinx Info Fields ...
🌐
JetBrains
jetbrains.com › help › pycharm › type-syntax-for-docstrings.html
Legacy type syntax for docstrings | PyCharm Documentation
February 4, 2026 - Consider adding information about the expected parameter type. This information is specified using docstrings. You can use different docstrings depending on the selected docstring format, for example, :type, @type, or Args.
🌐
JetBrains
jetbrains.com › help › pycharm › generating-reference-documentation.html
Generate reference documentation | PyCharm Documentation
August 4, 2025 - For more information, refer to their respective download and installation pages. PyCharm recognizes the docstring format and uses the documentation source directory defined in the Integrated Tools page of the Settings dialog.
Find elsewhere
🌐
JetBrains
jetbrains.com › help › pycharm › enabling-creation-of-documentation-comments.html
Manage documentation comments | PyCharm Documentation
January 21, 2026 - If this checkbox is selected, PyCharm generates a documentation comment stub. To restrict creating documentation comments, press Ctrl+Alt+S to open settings and select Python | Tools | Integrated Tools. In the Docstrings area, select Plain from the Docstring format list.
🌐
Reddit
reddit.com › r/learnpython › how can i configure the docstring format of pycharm rst?
r/learnpython on Reddit: How can I configure the docstring format of pycharm rst?
March 27, 2020 - As per the documentation of pycharm: Note that for reStructuredText it's possible to specify types in two formats: :param param_type param_name: parameter description (type description is on the same line as the parameter description). :type param_name: param_type (type description is on a separate line) I have configure my docstrings to use restructuredtext format but only the second option was being used.
🌐
JetBrains
intellij-support.jetbrains.com › hc › en-us › community › posts › 115000784410-how-to-change-pycharm-default-commenting-style-for-function
how to change pycharm default commenting style for function? – IDEs Support (IntelliJ Platform) | JetBrains
when you type """"" under a function definition, you will see Pycharm automatically create a commenting style for you. ... """ validating the closure data in posteriori sense :param config_dict: :param states: :param closure: :return: """ I think it is ugly and want to change it to the style of Scikit-learn ( a python library). How? ... Hi Pswpeterpab! You can switch docstring style in Settings | Tools | Python Integrated Tools | Docstring format, you are looking for NumPy style I believe.
🌐
Google
google.github.io › styleguide › pyguide.html
styleguide | Style guides for Google-originated open-source projects
A docstring should be organized as a summary line (one physical line not exceeding 80 characters) terminated by a period, question mark, or exclamation point. When writing more (encouraged), this must be followed by a blank line, followed by the rest of the docstring starting at the same cursor ...
🌐
JetBrains
youtrack.jetbrains.com › issue › PY-12327 › Customizable-docstring-generation-templates
Customizable docstring generation templates : PY-12327
{{ (>_<) }} This version of your browser is not supported. Try upgrading to the latest stable version. Something went seriously wrong
🌐
JetBrains
intellij-support.jetbrains.com › hc › zh-cn › community › posts › 360006865800-Auto-template-for-function-class-documentation
Auto template for function / class documentation – IDEs Support (IntelliJ Platform) | JetBrains
December 18, 2019 - Setup: Pycharm 2019.3, Python3 · When creating a new function or class and typing """ + Enter in order to write the documentation but the documentation template is not been created automatically. Do I need to activate it manually? is so how? Cheers. 3 条评论 · 排序方式 日期 投票数 · Sergey Karpov · 创建于 2019年12月19日 09:19 · Hi, Perhaps the docstring format has changed to Plain instead of reStructuredText in Settings/Preferences | Tools | Python Integrated Tools ·
🌐
JetBrains
jetbrains.com.cn › en-us › help › pycharm › restructured-text.html
reStructuredText support | PyCharm Documentation
August 21, 2024 - In addition to the support for reStructuredText Docstring Format (PEP 287), PyCharm provides an editor for restructured text.
🌐
Pydantic
pydantic.com.cn › de › api › config
Konfiguration - Pydantic-Dokumentation
from pydantic import BaseModel, ConfigDict, Field class Model(BaseModel): model_config = ConfigDict(use_attribute_docstrings=True) x: str """ Example of an attribute docstring """ y: int = Field(description="Description in Field") """ Description in Field overrides attribute docstring """ print(Model.model_fields["x"].description) # > Example of an attribute docstring print(Model.model_fields["y"].description) # > Description in Field This requires the source code of the class to be available at runtime.
🌐
JetBrains
intellij-support.jetbrains.com › hc › zh-cn › profiles › 922567264-Pavel-Karateev
Pavel Karateev 的用户个人资料 – IDEs Support (IntelliJ Platform) | JetBrains
Hi Liuyuzhui, docstring format can be changed in Settings | Tools | Python Integrated Tools | Docstring format. ... Thank you, does manual backend setup to TkAgg, Qt4Agg or Qt5Agg fixes the problem? matplotlib.use('Qt5Agg') Could you please ...
🌐
JetBrains
jetbrains.com › help › pycharm › reformat-and-rearrange-code.html
Reformat and rearrange code | PyCharm Documentation
January 6, 2026 - You can reformat a part of code, the whole file, a group of files, a directory, and a module. You can also exclude part of code or some files from the reformatting. PyCharm adheres to PEP 8 rules and requirements for arranging and formatting Python code.