[PATCH v4 3/4] usertools/dpdk-hugepages.py: update coding style

Burakov, Anatoly anatoly.burakov at intel.com
Wed Aug 21 11:39:12 CEST 2024


On 8/21/2024 11:26 AM, Robin Jarry wrote:
> Anatoly Burakov, Aug 21, 2024 at 11:22:
>> Update coding style:
>>
>> - Make the code PEP-484 compliant
>> - Add more comments, improve readability, use f-strings everywhere
>> - Address all Python static analysis (e.g. mypy, pylint) warnings
>> - Format code with Ruff
>> - Improve error handling
>> - Refactor printing and sysfs/procfs access functions
>> - Sort output by NUMA node
>>
>> Signed-off-by: Anatoly Burakov <anatoly.burakov at intel.com>
>> Acked-by: Stephen Hemminger <stephen at networkplumber.org>
>> ---
>>
>> Notes:
>>     v3 -> v4:
>>       - Format code with Ruff, line width 79 to avoid flake8 warnings
>>         (Flake8 is by default configured with line width 79 on my system)
> 
> Please keep the default ruff/black settings. And when formatting with 
> these tools, flake8 is mostly useless.
> 
> If you want to check your code for defects, you are probably best with 
> `ruff check` which combines the features of multiple python linters and 
> runs much faster.

OK, I'll reformat with default settings then! v5 incoming

> 
> 
>>     v2 -> v3:
>>       - Rewrite of the script as suggested by reviewers
>>     v1 -> v2:
>>       - Added commit that sorted output by NUMA node
> 

-- 
Thanks,
Anatoly



More information about the dev mailing list