PyCharm methods autocompletion.

Where i can find option in which i can turn on autocomplete for methods in Python in PyCharm? Problem is that i need to type parentheses after methods manually.

Best,

Andrey.

6 comments
Comment actions Permalink

Assuming you mean: you would like to type punctuation character (e.g. parenthesis) to cause completion:

Settings > Editor > General > Code Completion > Insert selected variant by typing dot, space, etc.

 

I have switched that on, to make PyCharm like Visual Studio (C#) code completion.

-1
Comment actions Permalink

Hi. Thanks for you suggestion, mate! But no... For example: When i am typing "method_name.title" and hit Enter i will see "method_name.title". But what i want to see is "method_name.title()".

0
Comment actions Permalink

In that case I don't understand what you are seeing.

Firstly, you give example of `method_name.title`.  Is `method_name` genuinely a method, because this makes little sense if it is?

Assuming you mean something more like `class_instance.title`, then in PyCharm I _already_ see that when it offers completions it shows `class_instance.title(self)`, and I get the following `()` (the `self` does not appear) when I click <Enter>.  So I'm not "typing any parentheses manually".

Is there a specific situation or pattern to what you are seeing?

-1
Comment actions Permalink

Did you have any solution?

0
Comment actions Permalink

Bastian 220997 please report the issue to https://youtrack.jetbrains.com/issues/PY and provide a code snippet that demonstrates the problem.

-1
Comment actions Permalink

The question is, when entering examples :

   nameVariable.pack, we would like to get nameVariable.pack() at auto completion and not nameVariable.pack.

The auto completion misses to put the brackets at the end of the methods.

So, in the case Andrei Marchenko asked, nobody has answered the question yet. Thank you, if, which has an idea.

2nd question is that you have if there is also a plugin to fill in the quotes " " automatically example:

nameVariable.pack(side="bottom"), I would like that when I enter nameVariable.pack(side="bo") the first 2 letter example of bottom it allows me to autocomplete.

Translated with www.DeepL.com/Translator (free version)

-------------------

La question est, quand l' on entre exemples :

   nameVariable.pack, on aimerait obtenir nameVariable.pack() a l'auto completion et non nameVariable.pack.

l'auto completion manque de mettre les parenthèses en fin des méthodes.

Donc à la question cas posé Andreï Marchenko personne n'a encore répondu de solution. Merci, si, quelle a une idée.

2 ème question est que vous avez s'il existe aussi un plugin pour remplir dans les guillemets " " automatiquement exemple :

nameVariable.pack(side="bottom"), j'aimerais que quand je rentre nameVariable.pack(side="bo") les 2 premier lettre exemple de bottom ça me permet d'autocomplete.

0

Please sign in to leave a comment.