Autocomplete does not always work on Pycharm

1

I'm starting to use Pycharm, creating a test with Pygame.

I realize that some Pygame methods do not appear in Pycharm AutoComplete.

For example, if I want to put a pygame.mask.from_surface() , typing pygame.mas will not do anything. But if I manually complete mask and press . , then the from_surface() auto-completes correctly.

Ex:

import pygame
carro = pygame.image.load("imagens/onix.png").convert_alpha()
carro_mask = pygame.mas # aqui já deveria aparece o autocompletar

This also appears for other situations, such as if I want to use carro.get_rect() , then nothing appears after typing carro.

Here is my current configuration:

How do I fix this?

    
asked by anonymous 14.06.2018 / 03:29

2 answers

0

It was a bug in the current version.

Resolved by downloading the new version at PyCharm Early Access Program .

    
14.06.2018 / 21:37
1

You installed pygame , right? Checked if the python interpreter setting is correct? I mean, are you pointing to the virtualenv or docker you're working on? In the settings of the interprator you can even see the libraries lists in their respective versions.

One more suggestion would be to narrow the scope of imports:

from pygame import image

and etc.

UPDATE

I tried to repeat your steps and I had the same problem you encountered. I did a google search and realized that this is a more recurring problem with pygame than with PyCharm.

Including, this problem already reported to PyCharm in 2014 and the conclusion was that it was a problem with the library, not the IDE.

There are attempts to force the debugger with the PyCharm cache , but it also did not seem to resolve when I applied locally.

It seems to have no solution, I'm afraid.

    
14.06.2018 / 10:02