PyCharm usage tips for developing Plone? (fixing global module imports)

@gomez @fredvd Unfortunately, I believe that (from plone import api showing api as unknown) is as close as we can get without omelette. And that is understandable as you see that "plone" in that line is mapped to the first "plone" namespace package PyCharm finds.

I'm sorry for overpromising :frowning: When I found out this approach, my project did not have plone.api yet. Personally I'm still happy how little I need to configure in PyCharm for this.

There is a workaround for plone.api like packages, though.

Instead of

from plone import api

you could write

import plone.api as api

And PyCharm finds it.

1 Like