[PATCH v3 3/4] usertools/dpdk-hugepages.py: update coding style
Burakov, Anatoly
anatoly.burakov at intel.com
Wed Aug 21 10:52:23 CEST 2024
On 8/20/2024 5:57 PM, Robin Jarry wrote:
> Anatoly Burakov, Aug 20, 2024 at 17:35:
>> Update coding style:
>>
>> - Make the code PEP-484 compliant
>> - Add more comments, improve readability, use f-strings everywhere
>> - Use quotes consistently
>> - Address all Python static analysis (e.g. mypy, pylint) warnings
>> - 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>
>> ---
>>
>> Notes:
>> v1 -> v2:
>> - Added commit that sorted output by NUMA node
>> v2 -> v3:
>> - Rewrite of the script as suggested by reviewers
>
> Instead of debating about coding style. I'd like to enforce black/ruff
> for new scripts and/or rewrites.
>
> The code looks good to me, but could you pass through one of these tools
> and send a v4?
>
> black usertools/dpdk-hugepages.py
>
> or
>
> ruff format usertools/dpdk-hugepages.py
>
> I think they output the exact same code formatting but I could be wrong.
>
Hi,
My IDE is already set up to auto-format with Ruff since our last
conversation, so this is already formatted. I ran ruff format command
just in case but it produced no changes.
So, no v4 necessary unless you think there are any changes to be made
about the code :)
--
Thanks,
Anatoly
More information about the dev
mailing list