Search code examples
pythonpycharmjetbrains-ide

Can PyCharm suggest available methods?


PyCharm Professional does not suggest methods while typing (for any library).

For example, in the screenshot below, I would expect to see methods I can call on service in the autosuggest popover (like I would in WebStorm or PhPStorm). I only get "not", "par" and "main" every single time.

enter image description here

Everything is enabled in settings in accordance to all the other posts on the topic. See code completion settings below:

enter image description here

Is something off or is this just not a feature like with Javascript or PHP? Below is an example for PhpStorm which shows me all the methods I can call on $response. I want to achieve the same thing in PyCharm.

Is this possible?

enter image description here


Solution

  • Maybe PyCharm can not determine what the return type of build() is. If thats the case, use python type hints.

    from googleapiclient.discovery import Resource
    from googleapiclient.discovery import build
    
    service: Resource = build(...)