I recently installed PyCharm. It shows a lot of "Unresolved reference" errors in inconsistent way. E.g. on the attached screenshot, I am using MapCompose function. In two lines of code, PyCharm does not complain about MapCompose being unresolved. But on the third line, it complains. Additionally, it complains on both "MapCom" and "MapCompose". I am new to Python but I think it makes no sense.
By the way, MapCompose is imported and the code executes properly, so in fact it is resolved.
This is only one example. My code is full of such "Unresolved references". Those two first lines on the screenshot were also marked as unresolved before, but I deleted the word "MapCompose" in them and typed it again (using code hinting) and the red marking disappeared. But the third line stays red no matter what.
If I do "Invalidate Caches / Restart" then the "Unresolved" status for the third line disappears and the whole Python file has no errors. But after typing some new lines of code or editing existing lines, the "Unresolved" red markings appear again.
My project interpreter is set to a virtual environment where "scrapy" module is installed together with its dependencies. I have no comparison because this is my first project.