Intro: pygame is a python module used to create games. I've properly installed the module and my PyCharm successfully imports it.
I'll jump straight to an example scenario:
Trying to use the get code completion for the sub-module "image" under pygame works fine:
pygame.image
When I type further and try to get code completion under image, it doesn't work:
pygame.image. # shows a suggestions list, but list doesn't contain any
# function names under the pygame.image sub-module
I've been trying for ages. The python console within PyCharm can do this (it uses IPython, correct me if I'm wrong) but the editor cannot.
PS apologies for not showing screenshots for the above, I don't have enough stackoverflow points to post images
Here's my terrible solution...I basically import the ones I feel I'd need and if I need something like a clock I'll just add it to the top if I'm going to be using it a lot.
It looks bad but autocomplete works.
Here is how you can fix this issue specifically for pygame:
For example, change
to
Restart PyCharm and it should work :)
JetBrains is a generic IDE. The same auto-complete feature for IntelliJ is the same auto-complete they use for PyCharm and all their other environments. Thus auto-completions are derived from your existing code, not from the language's modules. See here for more.