I've copied the following code from a tutorial:
import pygame
import sys
from pygame.locals import *
pygame.init()
DISPLAYSURF = pygame.display.set_mode((400, 300))
pygame.display.set_caption('Hello World!')
while True:
for event in pygame.event.get():
if event.type == QUIT:
pygame.quit()
sys.exit()
pygame.display.update()
This code compiles, but PyCharm insists that QUIT is an "Unresolved reference". Replacing QUIT with pygame.locals.QUIT obvious gets rid of this, but I'm concerned that there's something wrong with the imports. Is it that, or is PyCharm just misbehaving?