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

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:

“”" This file is for blah blah blah “”"

or simply turn of this messages in VSCode. To do so - find settings.json and add:

"python.linting.pylintArgs": ["--disable=C0111"],

4 Likes

thank you so much for the help.

Hi,
I’ve stumbled on that before, these two links may help you:

and

both describe expected style of your code, and VSCode checks if you compy that through the chosen “linter”, in your case the linter is “Pylint”
Hope this helps.
cheers
AR

i’m having this same problem

I am a beginner too. I spent a lot of hours figuring this out. Follow my instruction below.

  1. You need to open Command Pallette in order to access setting.json
    View → Command Palette → Open Setting(JSON)

  2. You can copy and paste the code: "python.linting.pylintArgs": ["--disable=C0111"] ,

  3. clos the tab. It will ask you to save. Save.

  4. Go back to the code file you were working on with the error message. You need to save the file to see the change of disabled code.

1 Like

put this at the beginning of all your files to remove common annoying warnings:

# pylint: disable=missing-module-docstring
# pylint: disable=missing-class-docstring
# pylint: disable=missing-function-docstring
# pylint: disable=invalid-name
# pylint: disable=trailing-newlines
# pylint: disable=trailing-whitespace
# pylint: disable=missing-final-newline

Egi

1 Like

While that may work, that is a horrible practice since it clutters your code. It would never be acceptable in professional code.

1 Like

Hi! I have disabled Pylint extension and reloaded it again. It has worked for me and the errors were gone.

Here is my reference:

Thank you @Japhet, this worked. I tried uninstalling/install, no luck but the disable/reload did it.

Hi the file just needs some comments at the top to say what its about for example add
“”“This is to stop [missing-module-docstring] Error”“” putting your own comment.
Hope this helps.

Thank you @Japhet worked perfectly. Greatly appreciate the help!