I have recently been using PyCharm (Mac Community Edition) to develop a 
re-usable game module, with Python 2.7 with pygame 1.9.2 (I think?).  I started 
using the "inspection" tool (on the right edge of the editor window) that looks 
for potential errors while in the editor, and generates warnings.  Overall, 
this has worked very well, and I've cleaned up a lot of my code.  However, I am 
left with one consistent inspection warning.  

In every line where I use:  pygame.image.load, for example, with lines like 
this:

    surfaceOn = pygame.image.load(on)

I get a warning that says:

   Cannot find reference 'load' in 'image.py'

The longer message says:

   This inspection detects names that should resolve but don't.  Due to dynamic 
dispatch and duck typing, this is possible in a limited but useful number of 
cases.  Top-level items are supported better than instance names.


If I ignore the inspection warning, the code runs fine.  The images that I am 
loading show up and work great.  I'm just curious if anyone knows why this 
inspection warning is being generated.  

Thanks,

Irv




Reply via email to