I’d be happy to have formatting consistency across the project. 

Cheers 
Ole

> On 2 May 2022, at 19:17, Klement Sekera <klem...@graphiant.com> wrote:
> 
>  +Real Ole.
> 
>>> On 2 May 2022, at 19:15, Klement Sekera via lists.fd.io 
>>> <klement=graphiant....@lists.fd.io> wrote:
>>> 
>>> Hi Dave,
>>> 
>>> good catch about requirements.txt. Should be fixed now.
>>> 
>>> I’m not sure how to proceed with rest of code, seems to be mostly Ole’s 
>>> domain. Thoughts, Ole?
>>> 
>>> Thanks,
>>> Klement
>>> 
>>> On 2 May 2022, at 18:50, Dave Wallace <dwallac...@gmail.com> wrote:
>>> 
>>> Hi Klement,
>>> 
>>> I agree that black is a much better PEP8 compliance/formatter for python 
>>> code.  I've been using it on my personal python projects for a while now.
>>> 
>>> I left a minor comment on your gerrit change wrt. installation of pinned 
>>> version as part of the rest of the python virtualenv.  Otherwise it looks 
>>> good to me.
>>> 
>>> What about the rest of the python code in the repo?
>>> 
>>> Thanks,
>>> -daw-
>>> 
>>>> On 5/2/22 6:56 AM, Klement Sekera 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
>>>> 
>>>> 
>>> 
>> 
>> 
> 
> 
> 
> 
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#21328): https://lists.fd.io/g/vpp-dev/message/21328
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