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"],

3 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

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

1 Like