From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 30121A04B1; Wed, 4 Nov 2020 17:22:32 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id DFD1A3772; Wed, 4 Nov 2020 17:22:30 +0100 (CET) Received: from mail-pg1-f194.google.com (mail-pg1-f194.google.com [209.85.215.194]) by dpdk.org (Postfix) with ESMTP id 3E06C34EE for ; Wed, 4 Nov 2020 17:22:30 +0100 (CET) Received: by mail-pg1-f194.google.com with SMTP id o3so16982800pgr.11 for ; Wed, 04 Nov 2020 08:22:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=rmv1DTqC/iA2VoIkIbsp+e3xNE26ADhHcnRsS+6sf6Q=; b=v3NsmlwPyviop1zEw1vHmOAuINRPK7fh6o3qnvBlUM4qinKo2NlxKaqiXNpDkDF2xV NxQSDeEZ/XGrXUI+B1MU5sYG0MQGS/n4OdGIr350Uz0G6eaQedwCQT4vJJKuo9V+iNhO pbEhXwIEPnE1Wcv3hmTpiKcG9rWagXrn3Hxr9U733hJM3+LXHleizzZKclD4uUREpdTT Tzi61owyS0iFdoOoQkiGikSn9ygGTdIPNWipHVwWYnKsBdMa1vCecU5ejeUQ7kZmCrFs 5bsL+CFyjofA+sABjtcLHOvAWRJZpmG6CEHik77kymqFDyWq4FrQQibytpMAM7pHobBy TOtA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=rmv1DTqC/iA2VoIkIbsp+e3xNE26ADhHcnRsS+6sf6Q=; b=ADyoHOGCrjorlLFHi83DuJlNh6LT4ObqOcVvpyJy3d2BBplOks/uLtJWxrU8GyPG/A fa4OibQ+TZWK4qP6OjTQUITDXSqJpAb7OSNaIvM0ryK27Dn+xTBEuXNAnpUQZyLvqjh7 15cmz2D7TUUGrMSmqSrLbVTR10QsBsKujkurvnlYyZ7sH4g2ZsVSWqSTJWf3cpa+jqW9 O7HXXTG1T1iI/FFOc8s62ldB3BZlpoGDGsQ06n6JGbllDvK5pw2QdYwvIAYjI1XLDXBY O+fZFuYPmavGsooPq0AMrcXogkxcbhmu1bveptzJnuOifJb03cI3ZElesj3MFe8pmyzj 22yQ== X-Gm-Message-State: AOAM530w8/NhXUbfFoB1ePqEKqNpft1X+nCg66We5nX1lI6nLWawgEk4 /yOKYQkJPmAnBXkViw7moL1v7dDW+altlF5D X-Google-Smtp-Source: ABdhPJw/P8YQtPedBTpHRgEPLfco10+OMnQ/ZyPHn7JoHYbpHC7vNO3k+KdwT2hMx9a7zijNJ+W7qQ== X-Received: by 2002:a17:90a:b397:: with SMTP id e23mr4834680pjr.96.1604506948370; Wed, 04 Nov 2020 08:22:28 -0800 (PST) Received: from hermes.local (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id q18sm2315723pfs.150.2020.11.04.08.22.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Nov 2020 08:22:28 -0800 (PST) Date: Wed, 4 Nov 2020 08:22:25 -0800 From: Stephen Hemminger To: Bruce Richardson Cc: dev@dpdk.org Message-ID: <20201104082225.3a8210af@hermes.local> In-Reply-To: <20201104092105.GA58@bricha3-MOBL.ger.corp.intel.com> References: <20200906013133.26360-2-stephen@networkplumber.org> <20201104065304.26886-1-stephen@networkplumber.org> <20201104092105.GA58@bricha3-MOBL.ger.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v2] cpu_layout: refactor to meet python standards X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Wed, 4 Nov 2020 09:21:05 +0000 Bruce Richardson 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 --- 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.