PyCharm not finding object references
已回答
PyCharm is giving me a warning that it cannot find some object references.
But, when I run the code in PyCharm, it all works just fine. And, I can bundle the code into an .exe with pyinstaller, which works.
Here is the GitHub Repo for my project: https://github.com/arlinsandbulte/Pro7-Media-Sweeper
Here is a screenshot of the error messages I see:
And here is a zip file of my whole PyCharm Project Directory:
Upload id: 2023_02_06_3p1SdkD2pEk6iajq2ApZDS (file: Pro7 Media Sweeper (PyCharm Project).zip)
Any help or advice you can give is appreciated!
I am only a hobbyist Python coder...
请先登录再写评论。
Hi,
I checked your project, and there is indeed no declaration of Presentation (and others) in those modules.
If it's generated dynamically in runtime (I didn't check that part very carefully, but it seems to be happening via *.proto files), then there is nothing PyCharm can do with its static code analysis to resolve those references.
As a general workaround in such cases, you can create stub files for such modules where you will indicate all of the methods and classes and their types.