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

flake8 complains about no definitions for import Actor, keyboard, keys, sounds, clock, music and screen. #269

Open JeremiahCheatham opened 2 years ago

JeremiahCheatham commented 2 years ago

flake8 and i believe other alternatives will complain that pyzero builtins are not defined.

from pgzero.builtins import Actor, keyboard, keys, sounds, clock, music

The above seems to be the only work around for most of this. However either changes in stable or maybe was different in current but you can not add screen. In the recent past in current i would add screen but switching back to stable it's not working. So flake8 will constantly complain screen is not defined.

ProfessorCode212 commented 2 years ago

I agree that this is an issue for me as well. I tried searching for solutions but I have found none. This is quite problematic because it adds a lot of 'noise' and is somewhat distracting. I am using VS Code and the only workaround I have for this is to completely disable the Python extension. It would be great if this issue could be solved soon.

ProfessorCode212 commented 2 years ago

Okay. I just noticed that a recent commit was made which added instructions for fixing this issue in INSTALLATION.rst. However, would it be possible to generate a .flake8 file on the first run of pgzrun to avoid this problem altogether?