如何修复原子编辑器中的“flake8 D100 — 缺少文档字符串”错误

How can I fix `flake8 D100 — Missing docstring` error in atom editor

我为 python 编程安装了 atom 并且还安装了 Linter 和 flake8 包,但我在文本编辑器中编写的所有内容都会收到此警告:

D100 — Missing docstring in public module

我已经试过了

 pip uninstall flake8-docstrings
 pip install Flake8-pep257

如何修复此警告?

您可以像任何 Atom 包一样配置 linter-flake8,方法是编辑 Atom -> 首选项 -> 包 -> linter-flake8 中的设置。

对于您不想看到的任何错误,请使用 "ignore error codes"。

从原子包商店安装 "linter-ui-default dependencies".. 它帮助了我..第一次无法安装。我重新启动了 Atom,它要求我安装这个包。单击是它已成功安装。现在我没有收到任何错误。

只不过是你程序顶部的这样一条注释而已。根据 Python 文档,它应该在每个函数和程序之前。这是一个简单的文档字符串代码

""""Return the pathname of the KOS root directory."""