pycharm intellisense doesn't recognize pillow moduals variable internal functions

can someone help me?

I have the following code

#########################################

from PIL import Image

img = Image.open('../Images/tiles_main.bmp')
img<-Accesser here can't access internal functions

#########################################

however the intellisense can't access the vars img's internal functions like copy, crop, etc..

it seems that I can run it fine though

 

4 comments
Comment actions Permalink

umm it looks as if this question is being ignored

since I see other people are having the same problem and there has been no replies in that post either

please answer this! I need this problem to be fixed so I can continue learning python.

0
Comment actions Permalink

Hey, you can use type hinting in PyCharm like a workaround:

img = Image.open('../Images/tiles_main.bmp') # type Image.Image
img<-Accesser here now CAN access internal functions

For more info look at https://www.jetbrains.com/help/pycharm/2016.3/type-hinting-in-pycharm.html#d417517e43 

-1
Comment actions Permalink

That isn't a great solution, you need to retype the type hint with every single variable of type Image you use. Very clunky

0

Please sign in to leave a comment.