Hoi, As a (small) voice of support, Black is a great formatter. Happy to support it in vpp's Python codebase! It's also the vppcfg formatter of choice :)
groet, Pim On Mon, May 2, 2022 at 3:56 AM Klement Sekera <klem...@graphiant.com> wrote: > 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 > > > > -- Pim van Pelt <p...@ipng.nl> PBVP1-RIPE - http://www.ipng.nl/
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#21327): https://lists.fd.io/g/vpp-dev/message/21327 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] -=-=-=-=-=-=-=-=-=-=-=-