How do I disable a Pylint warning?

pylint –generate-rcfile shows it like this: [MESSAGES CONTROL] # Enable the message, report, category or checker with the given id(s). You can # either give multiple identifier separated by comma (,) or put this option # multiple time. #enable= # Disable the message, report, category or checker with the given id(s). You # can either … Read more

PyLint “Unable to import” error – how to set PYTHONPATH?

There are two options I’m aware of. One, change the PYTHONPATH environment variable to include the directory above your module. Alternatively, edit ~/.pylintrc to include the directory above your module, like this: [MASTER] init-hook=’import sys; sys.path.append(“/path/to/root”)’ (Or in other version of pylint, the init-hook requires you to change [General] to [MASTER]) Both of these options … Read more

Why does it say that module pygame has no init member?

Summarizing all answers. This is a security measure to not load non-default C extensions. You can white-list specific extension(s). Open user settings and add the following between {}: “python.linting.pylintArgs”: [ “–extension-pkg-whitelist=extensionname” // comma separated ] You can allow to “unsafe load” all extensions. Open user settings and add the following between {}: “python.linting.pylintArgs”: [ “–unsafe-load-any-extension=y” … Read more

Should wildcard import be avoided?

The answer to your question’s title is “yes”: I recommend never using from … import *, and I discussed the reasons in another very recent answer. Briefly, qualified names are good, barenames are very limited, so the “third option” is optimal (as you’ll be using qualified names, not barenames) among those you present. (Advantages of … Read more