Hey vpp-dev,

looking at our current code style and its PEP8 compliance I see a couple of 
issues

1.) it’s not really PEP8 compliant
2.) we have no test-fixstyle

I decided to make it more PEP8 compliant and found out that to just fix W503 to 
W504 (per 
https://peps.python.org/pep-0008/#should-a-line-break-before-or-after-a-binary-operator),
 we would need to do a lot of manual code style changes. Looking at a tool to 
do that I stumbled upon black (https://github.com/psf/black) which aims to be a 
consistent code style fixer/validator producing minimum diffs. It’s already 
used by many small and large projects and similarly small and large 
organisations. It’s also much faster to validate/format than 
pycodestyle/autopep8 - its runtime on all our files is in seconds.

My proposal is to bite the bullet and accept a change in style in exchange for 
a consistent, auto-formatted, (almost entirely) pep8 compliant style.

Here’s the diff:

https://gerrit.fd.io/r/c/vpp/+/36043

Thoughts?

Thanks,
Klement
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#21316): https://lists.fd.io/g/vpp-dev/message/21316
Mute This Topic: https://lists.fd.io/mt/90832348/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to