If pylint
or other linter is giving you this error in a Python file, there's a simple way to get rid of it.
Missing module docstring pylint(missing-module-docstring)
Simply add a description to the top of your Python file.
'''Description of your file.'''
# or
'''
Description of your file.
'''
If you don't want to add a description, you can tell the linter to ignore this error by creating a .pylintrc
file in your directory and adding the following code.
# .pylintrc
[MASTER]
disable=
C0114, # missing-module-docstring
You could ignore other errors the same way. Here's an exhaustive list of Pylint warning and error codes.
missing-module-docstring
missing-class-docstring
missing-function-docstring
Another way to ignore Pylint warnings and errors is to add the following configuration key to your VSCode settings.
# settings.json
"python.linting.pylintArgs": ["--disable=C0114"]