[PATCH v4 3/4] usertools/dpdk-hugepages.py: update coding style
Robin Jarry
rjarry at redhat.com
Wed Aug 21 11:26:54 CEST 2024
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.
> v2 -> v3:
> - Rewrite of the script as suggested by reviewers
> v1 -> v2:
> - Added commit that sorted output by NUMA node
More information about the dev
mailing list