lordmauve / pgzero

A zero-boilerplate games programming framework for Python 3, based on Pygame.
https://pygame-zero.readthedocs.io/
GNU Lesser General Public License v3.0
527 stars 191 forks source link

"screen" is not defined VS code pgzrun library #326

Open elis7angelo opened 6 months ago

elis7angelo commented 6 months ago

i wanted to code a game in pgzrun and all is working fine but it shows a warning that screen is not defined and i would like to know why is that because i have everything for it to work and i cant find what is wrong with it.

error

hjlarrea commented 4 months ago

Check this comment. Basically by introducing these two lines you can get rid of the warning:

import pgzero.screen
screen : pgzero.screen.Screen

Intellisense/autocomplete will not work though. Another possibility it is what is described here, but it didn't work for me.