2024-05-15 03:06:20 发布
网友
我在做一个需要Numpy文档的项目。在我的Java时代,我记得在Eclipse/IDEA中有检查Javadoc遵从性的linter;有没有一个等价的方法来检查Numpy文档风格的遵从性?在
我知道PEP257,但它似乎没有对Numpy文档进行任何具体检查。在
皮林特似乎支持这一点。看看pylint.extensions.docparams。在
总而言之。你可以通过添加
load-plugins=pylint.extensions.docparams
在.pylintrc的主部分中。在
.pylintrc
This checker verifies that all function, method, and constructor docstrings include documentation of theparameters and their typesreturn value and its typeexceptions raised
This checker verifies that all function, method, and constructor docstrings include documentation of the
parameters and their types
return value and its type
exceptions raised
实际上pydocstyle(以前是pep257)recently added support,用于numpydocstring约定。虽然,这并不完美,但我认为这是最接近你想要达到的目标,而且在不久的将来它可能会有所改善。在
皮林特似乎支持这一点。看看pylint.extensions.docparams。在
总而言之。你可以通过添加
在
.pylintrc
的主部分中。在实际上pydocstyle(以前是pep257)recently added support,用于numpydocstring约定。虽然,这并不完美,但我认为这是最接近你想要达到的目标,而且在不久的将来它可能会有所改善。在
^{pr2}$相关问题 更多 >
编程相关推荐