j0ono0 / pinout

An open source Python package that generates hardware pinout diagrams as SVG images.
https://pinout.readthedocs.io
MIT License
384 stars 18 forks source link

[Discussion] Decide on coding styles and apply PyCQA + Pytest #11

Open whatnick opened 3 years ago

whatnick commented 3 years ago

To improve consistency and readbility with external contributions let us add

I would work on all these as time allows.

j0ono0 commented 3 years ago

They all sound like things I should read up on! I'm regularly rewriting large chunks of the core code - might be a good time to learn, and implement, testing processes and try out some linting.

j0ono0 commented 3 years ago

@whatnick any recommendations on style/linting to conform to? [EDIT] I'm trying out flake8 ...Now trying out Black. Looks like Black did everything except long docs strings when cross-checked with flake8. Black looks good at first glance, I'll try it out more on my local dev files. Looks like it is the 'cool kid on the block' too and got a mention by Guido van Rossum in a github discussion thread. <+2 appeal>

I'm open to suggestion on what will be appealing for other developers. What's typical implementation? Auto format on git push/pull requests? check and pass/reject on submission?

whatnick commented 3 years ago

Typical PyCQA settings are

j0ono0 commented 3 years ago

Checked out pylint - annoying. pedantic. -but- I can see the benefit and think It'll be worth enforcing style consistency with it. I've only read-up on isort but it also sounds like a good move - if only because I occasionally waste time pondering import sort order!

I'll see if I can get my current dev branch (0.0.9) into a passable format.