It is nice for a Python module to have a docstring, explaining what the module does, what it provides, examples of how to use the classes. This is different from the comments that you often see at the beginning of a file giving the copyright and license information, which IMO should not go in the docstring (some even argue that they should disappear altogether, see e.g. Get Rid of Source Code Templates)

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

For previous versions of Pylint, it does not have a separate code for the various place where docstrings can occur, so all you can do is disable C0111. The problem is that if you disable this at module scope, then it will be disabled everywhere in the module (i.e., you won't get any C line for missing function / class / method docstring. Which arguably is not nice.

So I suggest adding that small missing docstring, saying something like:

"""
high level support for doing this and that.
"""

Soon enough, you'll be finding useful things to put in there, such as providing examples of how to use the various classes / functions of the module which do not necessarily belong to the individual docstrings of the classes / functions (such as how these interact, or something like a quick start guide).

Answer from gurney alex on Stack Overflow
🌐
Code with Mosh
forum.codewithmosh.com › python
Hi, I'm a beginner to python. as I'm running my program it works perfectly but I can see a message in problem saying that missing module docstring pylint(missing-module-docstring). can someone help me to fix this bug - Python - Code with Mosh Forum
Hi! Actually its not a big deal. Docstrings are just for documentation (in Your example - for documenting the content of a module or file). You can just add docstring on top of the file: · I am a beginner too. I spent a lot of hours figuring this out. Follow my instruction below · You need ...
Published   November 2, 2021
Discussions

What does missing module docstring mean? I do not want to disable pylint I just want to know
Answer to What does missing module docstring mean? I do not More on chegg.com
🌐 chegg.com
1
June 6, 2023
Missing docstring error when linting ?
Maybe because it’s a comment and not a docstring? More on reddit.com
🌐 r/learnpython
5
2
December 2, 2019
[lint] missing-module-docstring example.py
Pylint missing-module-docstring. This issue is to hold the patch I've made. More on github.com
🌐 github.com
1
October 8, 2023
W0511: Doesn't detect TODO in docstrings
************* Module todo todo.py:1:1: W0511: TODO: Write good doc strings. (fixme) todo.py:1:0: C0114: Missing module docstring (missing-module-docstring) ------------------------------------------------------------------ Your code has been rated at 0.00/10 (previous run: 0.00/10, +0.00) More on github.com
🌐 github.com
5
November 22, 2023
Top answer
1 of 16
217

It is nice for a Python module to have a docstring, explaining what the module does, what it provides, examples of how to use the classes. This is different from the comments that you often see at the beginning of a file giving the copyright and license information, which IMO should not go in the docstring (some even argue that they should disappear altogether, see e.g. Get Rid of Source Code Templates)

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

For previous versions of Pylint, it does not have a separate code for the various place where docstrings can occur, so all you can do is disable C0111. The problem is that if you disable this at module scope, then it will be disabled everywhere in the module (i.e., you won't get any C line for missing function / class / method docstring. Which arguably is not nice.

So I suggest adding that small missing docstring, saying something like:

"""
high level support for doing this and that.
"""

Soon enough, you'll be finding useful things to put in there, such as providing examples of how to use the various classes / functions of the module which do not necessarily belong to the individual docstrings of the classes / functions (such as how these interact, or something like a quick start guide).

2 of 16
117

As mentioned by followben in the comments, a better solution is to just disable the rules that we want to disable rather than using --errors-only. This can be done with --disable=<msg ids>, -d <msg ids>.

The list of message IDs can be found here. For the specific error mentioned in the question, the message ID is C0111.

For using --disable= param in your choise of IDE or Text Editor, you will need to figure out how to do it.

For VS Code, this can be done by adding this in settings.json:

"python.linting.pylintArgs": ["--disable=C0111"]
🌐
Chegg
chegg.com › engineering › computer science › computer science questions and answers › what does missing module docstring mean? i do not want to disable pylint i just want to know
Solved What does missing module docstring mean? I do not | Chegg.com
June 6, 2023 - The given question code was written python language The "missing module docstring" error is a linting warning from Pylint, a popular Python code analy…View the full answer
🌐
Nono Martínez Alonso
nono.ma › missing-module-docstring
Missing module docstring · Nono Martínez Alonso
October 9, 2022 - # .pylintrc [MASTER] disable= C0114, # missing-module-docstring
Find elsewhere
🌐
Pylint
pylint.readthedocs.io › en › latest › user_guide › messages › convention › missing-docstring.html
missing-docstring / C0111 - Pylint 4.1.0-dev0 documentation
deprecated-module / W4901 · old-empty-docstring / W0132 · empty-docstring / C0112 · old-missing-param-doc / W9003 · missing-param-doc / W9015 · old-missing-returns-doc / W9007 · missing-return-doc / W9011 · old-missing-type-doc / W9004 · missing-type-doc / W9016 ·
🌐
Reddit
reddit.com › r/learnpython › missing docstring error when linting ?
r/learnpython on Reddit: Missing docstring error when linting ?
December 2, 2019 -

I have a comment in the first line of my code but pylint is firing me the following error; Missing module docstringpylint(missing-docstring) How do I resolve this error ?

🌐
GitHub
github.com › kyegomez › CT › issues › 5
[lint] missing-module-docstring example.py · Issue #5 · kyegomez/CT
October 8, 2023 - Pylint missing-module-docstring. This issue is to hold the patch I've made.
Author   evelynmitchell
🌐
Python
docs.python.org › 3 › library › dataclasses.html
dataclasses — Data Classes
February 23, 2026 - Source code: Lib/dataclasses.py This module provides a decorator and functions for automatically adding generated special methods such as__init__() and__repr__() to user-defined classes. It was ori...
🌐
Pylint
pylint.pycqa.org › en › v2.13.9 › messages › convention › missing-docstring.html
missing-docstring / C0111 — Pylint 2.13.9 documentation
"missing-docstring has been renamed. The new message can be found at: missing-module-docstring / C0114 · missing-class-docstring / C0115 · missing-function-docstring / C0116 · Introduction · Tutorial · User Guide · How To Guides · Messages · Message categories ·
🌐
GitHub
github.com › orgs › community › discussions › 50660
How do you fix "Missing module docstringpylint(missing-module-docstring)" · community · Discussion #50660
March 21, 2023 - To remove docstring warnings in VSCode, I just added "--disable=C0111" to "python.linting.pylintArgs": [], which was in the User's JSON settings.
🌐
GitHub
github.com › pylint-dev › pylint › issues › 9255
W0511: Doesn't detect TODO in docstrings · Issue #9255 · pylint-dev/pylint
November 22, 2023 - Bug description # TODO: Write good doc strings. def foobar(): """ TODO: Implement """ Configuration No response Command used pylint todo.py Pylint output ************* Module todo todo.py:1:1: W0511: TODO: Write good doc strings. (fixme)...
Author   mueller-ma
🌐
Qodo
qodo.ai
AI Code Review – Qodo: Deploy with confidence
Qodo in not an open source tool, but is free for open source projects. The platform automates 15+ pull request review checks—catching style issues, missing documentation, security vulnerabilities, and architectural inconsistencies automatically. This is especially valuable for open source maintainers: 70% of PRs come from one-off contributors unfamiliar with codebase standards.
🌐
Code with Mosh
forum.codewithmosh.com › python
VsCode Missing module docstring - Python - Code with Mosh Forum
July 29, 2022 - I used before a PyCharm, but want to try same like Mosh doing it in VScode. Trying to set up everything following his steps, but i can’t get rid of “Missing module docstring” error in Problems section. I’ve installed this module, but the problem still present.
🌐
Reddit
reddit.com › r/learnpython › program won't run and shows [pylint] c0111:missing module docstring" in vscode.
r/learnpython on Reddit: Program won't run and shows [pylint] C0111:Missing module docstring" in vscode.
December 5, 2017 -

When I write just a small print statement that says

print("Hi!")

in visual studio code, and execute it using ./program.py it shows syntax error that says

./program.py: line 1: syntax error near unexpected token `"Hi!"'
./program.py: line 1: `print("Hi!")'

and when I hover over the print statement it says

 [pylint] C0111:Missing module docstring

I have installed the recommended python extension from microsoft. Python version is 3.6.3. I can execute python statements in terminal easily but can't seem to execute a .py file. I searched but couldn't find a fix for this. Any help would be appreciated.

🌐
Code with Mosh
forum.codewithmosh.com › python
"Missing module docstring" PyLint error - Python - Code with Mosh Forum
August 7, 2022 - mosh is working on mac and i am having problems with some extension this thing is really getting confusing it was quite easy while using pycham pls help me out i dont want to give up on this course
🌐
Astral
docs.astral.sh › ruff › rules › docstring-missing-exception
docstring-missing-exception (DOC501) | Ruff
Checks for function docstrings that do not document all explicitly raised exceptions.
🌐
Pylint
pylint.readthedocs.io › en › v4.0.4 › user_guide › messages › convention › missing-docstring.html
missing-docstring / C0111 - Pylint 4.0.4 documentation
deprecated-module / W4901 · old-empty-docstring / W0132 · empty-docstring / C0112 · old-missing-param-doc / W9003 · missing-param-doc / W9015 · old-missing-returns-doc / W9007 · missing-return-doc / W9011 · old-missing-type-doc / W9004 · missing-type-doc / W9016 ·
🌐
Pylint
pylint.readthedocs.io › en › v3.1.1 › user_guide › messages › convention › missing-docstring.html
missing-docstring / C0111 - Pylint 3.1.1 documentation
May 13, 2024 - deprecated-module / W4901 · old-empty-docstring / W0132 · Toggle navigation of old-empty-docstring / W0132 · empty-docstring / C0112 · old-missing-param-doc / W9003 · Toggle navigation of old-missing-param-doc / W9003 · missing-param-doc / W9015 · old-missing-returns-doc / W9007 ·