Burakov, Anatoly, Aug 21, 2024 at 11:16:
> Actually, I take that back - I had a configuration mishap and didn't > notice that I wasn't using Ruff for formatting on the machine I was > creating the commits. > > Still, cpu_layout's formatting is not affected, but hugepage script is. > > However, after formatting with ruff, I can see that 1) most single > quotes became double quotes, 2) some lines I broke up for readability, > are no longer broken up, and 3) some lines I broke up to avoid exceeding > the 80 symbols count, are no longer broken up.

Using these tools allow developers to stop thinking about coding style and focus on more important matters :)

> I'll see if using Black yields different results.

Regarding line length, it seems that it's configurable. Perhaps we could include a Ruff/Black configuration file with DPDK to solve this problem once and for all? Adding --line-length=79 to ruff config addresses the last issue, but it wouldn't be necessary if there was a Ruff configuration file in the repo. I can live with first two things that I highlighted.

Both black and ruff have the same formatting rules and use a default 88 line length limit. Which yields good results in most cases:

https://black.readthedocs.io/en/stable/the_black_code_style/current_style.html#line-length

I would prefer if we kept the default settings without any customization. The DPDK code base is already allowed to go up to 100 columns anyways.

Reply via email to