Pylint W0212 protected-access

pylint doesn’t know of which type other is (how should it, you can compare an instance of A to everything), therefore the warning. I don’t think there is a way around disabling the warning. You can disable the warning for only that one line with appending # pylint: disable=W0212 to that line.

Can Pylint error checking be customized?

You can globally disable warnings of a certain class using pylint –disable=W1234 or by using a special PyLint configuration file pylint –rcfile=/path/to/config.file A sample config file is given below: [MESSAGES CONTROL] # C0111 Missing docstring # I0011 Warning locally suppressed using disable-msg # I0012 Warning locally suppressed using disable-msg # W0704 Except doesn’t do anything … 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