Q:

Imports failing in VScode for pylint when importing pygame

When importing pygame pylint is going crazy:
E1101:Module 'pygame' has no 'init' member
E1101:Module 'pygame' has no 'QUIT' member

I have searched the net and I have found this:
"python.linting.pylintArgs": ["--ignored-modules=pygame"]

It solves the problem with pygame, but now pylint is going crazy in other way: crazy_pylint.png. 
Then I have found "python.linting.pylintArgs": ["--ignored-files=pygame"], but what it does is completely disabling pylint for the whole directory I am working in. 
So how do I say pylint that everything is OK with pygame? 

A:

For E1101:
The problem is that most of Pygame is implemented in C directly.  Now, this is all well and dandy in terms of performance, however, pylint (the linter used by VSCode) is unable to scan these C files. 
Unfortunately, these same files define a bunch of useful things, namely QUIT and other constants, such as MOUSEBUTTONDOWN, K_SPACE, etc, as well as functions like init or quit. 
To fix this, first things first, stop ignoring the pygame module by removing all your arguments in "python.linting.pylintArgs".  Trust me, the linter can come in handy. 
Now to fix the problems.  For your constants (anything in caps), manually import them like so:
from pygame.constants import (
    MOUSEBUTTONDOWN, QUIT, MOUSEMOTION, KEYDOWN
)

You can now use these without prepending them with pygame.: 
for event in pygame.event.get():
    if event.type == QUIT:
        pygame.quit()
    if event.type == KEYDOWN: 
        # Code

Next, for your init and other functions errors, you can manually help the linter in resolving these, by way of 2 methods: 

Either add this somewhere in your code: # pylint: disable=no-member.  This will deactivate member validation for the entire file, preventing such errors from being shown. 
Or you can encase the line with the error:
# pylint: disable=no-member

pygame.quit()

# pylint: enable=no-member

This is similar to what the first method does, however it limits the effect to only that line. 
Finally, for all your other warnings, the solution is to fix them.  Pylint is there to show you places in which your code is either pointless, or nonconforming to the Python specs.  A quick glance at your screenshot shows for example that your module doesn't have a docstring, that you have declared unused variables...
Pylint is here to aid you in writing concise, clear, and beautiful code.  You can ignore these warnings or hide them (with # pylint: disable= and these codes) or spend a little time cleaning up everything.  
In the long run, this is the best solution, as it'll make your code more readable and therefore maintainable, and just more pleasing to look at.