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

Robin Jarry rjarry at redhat.com
Tue Aug 20 17:57:07 CEST 2024


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.



More information about the dev mailing list