I continuously get inspection errors when trying to import names directly from the package. These names appear in the package's __main__ module. Needless to say, any autocomplete features are unusable.
An example for this would be the mongoengine package. After installing the package into my active virtual environment (using poetry), I try importing its contents,
Looking at the mongoengine's packge __init__, we can see that it is importing names from its modules, allowing them to be imported at the pacakge level:
Unfortunately, I can't seem to make PyCharm aware of those names, neither did I find any related help online.
Your help would be seriously appreciated.