# 集成工具

> For the complete documentation index, see [llms.txt](https://www.jetbrains.com/zh-cn/help/clion/llms.txt).

> **TL;DR**
> `文件 | 设置 | 工具 | Python 集成工具`  适用于 Windows 和 Linux
>
>
>
> `%instance% | 设置 | 工具 | Python 集成工具`  适用于 macOS
>
>
>
> `Ctrl+Alt+S` (Windows), `⌘ Comma` (macOS), `⌘ Comma` (IntelliJ IDEA Classic (macOS)), `⌘ Comma` (macOS System Shortcuts), `Ctrl+Alt+S` (XWin), `Ctrl+Alt+S` (GNOME), `Ctrl+Alt+S` (KDE), `Ctrl+Alt+S` (Emacs), `Ctrl+Alt+S` (Sublime Text), `⌘ Comma` (Sublime Text (macOS)), `⌘ Comma` (Xcode), `Ctrl+Alt+S` (Visual Studio), `⌘ Comma` (Visual Studio (macOS)), `Ctrl+Alt+S` (ReSharper), `⌘ Comma` (ReSharper (macOS)), `Ctrl+Alt+S` (QtCreator), `⌘ Comma` (QtCreator (macOS)), `Ctrl+Alt+S` (NetBeans), `Ctrl+Alt+S` (Eclipse), `⌘ Comma` (Eclipse (macOS)) ![](https://resources.jetbrains.com/help/img/idea/2026.3/app.expui.general.settings.svg)

使用本页配置需求管理文件、默认测试运行程序和文档字符串处理。

|  项  |  描述  |
| --- | --- |
|  默认测试运行器  |  选择每次在测试用例的上下文菜单中选择  `运行`  时，CLion 将建议的测试运行/调试配置。    可能的选项包括：        * 单元测试    * pytest    * Nosetests    * Twisted Trial    |
|  在 Jupyter Notebook 中检测测试  |  如果您希望将 Jupyter Notebook 文件包含在单元测试检测作用域内，请选中此复选框。  |
|  文档字符串格式  |  请选择 CLion 要识别的文档字符串格式。    根据所选的文档字符串格式，CLion 将生成存根文档注释并在 [快速文档](viewing-inline-documentation.html) 中呈现文本：        * 普通 ：在按下 `Enter` (Windows), `⏎` (macOS), `⏎` (IntelliJ IDEA Classic (macOS)), `⏎` (macOS System Shortcuts), `Enter` (XWin), `Enter` (GNOME), `Enter` (KDE), `Enter` (Emacs), `Enter` (Sublime Text), `⏎` (Sublime Text (macOS)), `⏎` (Xcode), `Enter` (Visual Studio), `⏎` (Visual Studio (macOS)), `Enter` (ReSharper), `⏎` (ReSharper (macOS)), `Enter` (QtCreator), `⏎` (QtCreator (macOS)), `Enter` (NetBeans), `Enter` (Eclipse), `⏎` (Eclipse (macOS))或空格后打开引号后，会生成一个空stub；快速文档显示为普通文本。    * reStructuredText ：按下 `Enter` (Windows), `⏎` (macOS), `⏎` (IntelliJ IDEA Classic (macOS)), `⏎` (macOS System Shortcuts), `Enter` (XWin), `Enter` (GNOME), `Enter` (KDE), `Enter` (Emacs), `Enter` (Sublime Text), `⏎` (Sublime Text (macOS)), `⏎` (Xcode), `Enter` (Visual Studio), `⏎` (Visual Studio (macOS)), `Enter` (ReSharper), `⏎` (ReSharper (macOS)), `Enter` (QtCreator), `⏎` (QtCreator (macOS)), `Enter` (NetBeans), `Enter` (Eclipse), `⏎` (Eclipse (macOS)) 或空格后，打开引号后会根据 [reStructuredText](http://docutils.sourceforge.net/rst.html) 格式生成存根文档注释；快速文档由 Docutils 渲染。    * NumPy ：按下 `Enter` (Windows), `⏎` (macOS), `⏎` (IntelliJ IDEA Classic (macOS)), `⏎` (macOS System Shortcuts), `Enter` (XWin), `Enter` (GNOME), `Enter` (KDE), `Enter` (Emacs), `Enter` (Sublime Text), `⏎` (Sublime Text (macOS)), `⏎` (Xcode), `Enter` (Visual Studio), `⏎` (Visual Studio (macOS)), `Enter` (ReSharper), `⏎` (ReSharper (macOS)), `Enter` (QtCreator), `⏎` (QtCreator (macOS)), `Enter` (NetBeans), `Enter` (Eclipse), `⏎` (Eclipse (macOS))或空格后添加引号时，将按照 [NumPy](http://sphinxcontrib-napoleon.readthedocs.org/en/latest/example_numpy.html)格式生成存根文档注释；快速文档由 [Napoleon](https://sphinxcontrib-napoleon.readthedocs.org/en/latest/)和Docutils渲染。    * Google ：按下 `Enter` (Windows), `⏎` (macOS), `⏎` (IntelliJ IDEA Classic (macOS)), `⏎` (macOS System Shortcuts), `Enter` (XWin), `Enter` (GNOME), `Enter` (KDE), `Enter` (Emacs), `Enter` (Sublime Text), `⏎` (Sublime Text (macOS)), `⏎` (Xcode), `Enter` (Visual Studio), `⏎` (Visual Studio (macOS)), `Enter` (ReSharper), `⏎` (ReSharper (macOS)), `Enter` (QtCreator), `⏎` (QtCreator (macOS)), `Enter` (NetBeans), `Enter` (Eclipse), `⏎` (Eclipse (macOS))或空格键后，在开引号之后会生成符合 [Google](http://sphinxcontrib-napoleon.readthedocs.org/en/latest/example_google.html)格式的文档注释存根；快速文档由 [Napoleon](https://sphinxcontrib-napoleon.readthedocs.org/en/latest/)和 Docutils 渲染。      各种类型的文档字符串功能：        * 正确生成 docstrings    * 应用意图操作和快速修复后的更新    * 编码辅助    * 章节标题自动补全     > **Note:** > 文档字符串中提供的信息用于代码洞察。    |
|  分析文档字符串中的 Python 代码  |     如果选中此复选框，CLion 会高亮代码示例并进行语法检查和代码检查。       如果此复选框未选中，docstrings 内的代码片段将不被分析。     |
|  为  `stdlib`  渲染外部文档。  |  启用显示来自 [http://docs.python.org](http://docs.python.org)中  `查看 \| 快速文档` 的标准库函数文档。  |
|  Sphinx 工作目录  |     指定包含  `.rst`  文件和  `conf.py`  配置的目录路径。 CLion 使用它来识别自定义角色，并为 Sphinx 文档提供准确的高亮和渲染。     |
|  将  `.txt`  文件视为 reStructuredText  |  如果选中此复选框，则具有  `.txt`  扩展名的文件将与具有  `.rst`  扩展名的文件以相同方式高亮显示。  |

## See also

### 参考

[智能键](settings-smart-keys.html) [运行/调试配置对话框](run-debug-configurations-dialog.html)

### 外部链接

[Python docstrings](http://www.python.org/dev/peps/pep-0257/) [Sphinx](https://www.sphinx-doc.org/en/master/index.html) [epydoc](http://epydoc.sourceforge.net/) [reStructuredText](http://docutils.sourceforge.net/rst.html) [Google](http://sphinxcontrib-napoleon.readthedocs.org/en/latest/example_google.html) [NumPy](http://sphinxcontrib-napoleon.readthedocs.org/en/latest/example_numpy.html) [Napoleon](https://sphinxcontrib-napoleon.readthedocs.org/en/latest/) [Defining custom roles in Sphinx](http://www.doughellmann.com/articles/how-tos/sphinx-custom-roles/index.html)

