ld-decode icon indicating copy to clipboard operation
ld-decode copied to clipboard

Consider running a formatter and checker on python code

Open oyvindln opened this issue 4 years ago • 2 comments

Right now the code has a mix of spaces and tabs and not any consistent formatting, and when I load core.py in emacs flake8 gives up with too many errors.

I've used black for the vhs code but there are several other alternatives. A syntax checker like flake8 could also help clean up things, get rid of unused variables and maybe even uncover bugs.

Maybe also consider splitting up core.py as it's 3k lines.

oyvindln avatar Jan 08 '21 17:01 oyvindln

Thanks for the pointers... I've run black in the chad-2021.01.01 branch and handled a few flake8 complaints (and will probably gradually handle more)

Yeah, core.py should be split up. As part of the audio rework I'll put that into it's own file, and probably break out the threading bits as well. It's almost 4k lines now though after running through black...

happycube avatar Jan 10 '21 05:01 happycube

Haven't found any bugs yet, but it seriously points out clunky expressions which I'll slowly deal with ;)

happycube avatar Jan 11 '21 17:01 happycube