pythonvisual-studio-codepygamepylintdocstring

How do you fix "Missing module docstringpylint(missing-module-docstring)"


I'm using the pygame module on VS Code and I ran into the issue where the pygame has not init member. I followed the solutions to this link. I edited the user settings and added

"python.linting.pylintArgs": [
    "--extension-pkg-whitelist=pygame",
    "--unsafe-load-any-extension=y"
]

to the end of the json file

The pygame problem was resolved. However, when I use import random. I get this warning:

Missing module docstringpylint(missing-module-docstring)

How do I make it go away? Also, is there a better way to resolve the init problem of pygame?


Solution

  • I just figured out what docstrings are. They just describe the function or class. It's enclosed in three double quotation marks or single quotation marks. This helped me.

    To remove docstring warnings in VSCode, I just added "--disable=C0111" to "python.linting.pylintArgs": [], which was in the User's JSON settings.