pgzero icon indicating copy to clipboard operation
pgzero copied to clipboard

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

Open JeremiahCheatham opened this issue 2 years ago • 2 comments

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.

JeremiahCheatham avatar Dec 10 '21 23:12 JeremiahCheatham

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 avatar Apr 15 '22 09:04 ProfessorCode212

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?

ProfessorCode212 avatar Apr 15 '22 09:04 ProfessorCode212