Answer a question

I'm using the pygame module on VSCode 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?

Thanks!

Answers

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.

Logo

学AI,认准AI Studio!GPU算力,限时免费领,邀请好友解锁更多惊喜福利 >>>

更多推荐