How do I disable “missing docstring” warnings at a file-level in Pylint?

前端 未结 11 681
情书的邮戳
情书的邮戳 2020-12-12 14:18

Pylint throws errors that some of files are missing docstrings. I try and add docstrings to each class, method and function but it seems that Pylint also checks that files s

11条回答
  •  天涯浪人
    2020-12-12 14:58

    With pylint 2.4 and above you can differentiate between the various missing-docstring by using the three following sub-messages:

    • C0114 (missing-module-docstring)
    • C0115 (missing-class-docstring)
    • C0116 (missing-function-docstring)

    So the following .pylintrc file should work:

    [MASTER]
    disable=
        C0114, # missing-module-docstring
    

提交回复
热议问题