On Wed, 4 Nov 2020 09:21:05 +0000 Bruce Richardson <bruce.richard...@intel.com> wrote:
> On Tue, Nov 03, 2020 at 10:53:04PM -0800, Stephen Hemminger wrote: > > Rearrange code to make it pass python lint totally clean! This includes > > add a main function, docstring, and some variable name changes. > > > > Signed-off-by: Stephen Hemminger <step...@networkplumber.org> --- v2 - > > rebase to current main > > > > usertools/cpu_layout.py | 143 ++++++++++++++++++++++++---------------- 1 > > file changed, 85 insertions(+), 58 deletions(-) > > > > Hi Stephen, > > Thanks for looking at this, but I honestly query the value of this scale of > rework, since we take a 58 line linear script and increase it to an 85 line > script with multiple functions being called. Rather than trying for full > lint cleanliness, I think we'd be better to keep it simple and just aim for > pep8/pycodestyle cleanliness. This shows only two small things to fix and > saves massive rework. > > $ pycodestyle cpu_layout.py > cpu_layout.py:18:5: E722 do not use bare 'except' > cpu_layout.py:62:14: E231 missing whitespace after ',' > I was mostly hoping that the python code could be cleaned up so that when the next set of python code comes for some new feature it would be more readable. Could you send an alternative patch that addresses those changes.