From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 869B44582F; Wed, 21 Aug 2024 13:43:48 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 31B7440E44; Wed, 21 Aug 2024 13:43:48 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id 4525B4003C for ; Wed, 21 Aug 2024 13:43:46 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1724240625; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=NoxCdLac/UvkrebVn+67xypoCOpSQ2cSpK0DpML2MPA=; b=DkYiXMB5qrfJDpQ3J8rgLXWS0w52etZNNY+7cfR7F5ptZ7UaEEnbExEPp2SdgKyHTY/skw xNTiRcIAmF/qGk3aHLYB4eFY/JlypsePPiD55dQ7eqD3IBLJkq4mYikjvm/uxzsvvp3NLS vBL+izff5x9dpO2WOMyAMZM7qLgUVSA= Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-625-MqMtE7clN4-PaDpk1-xWEA-1; Wed, 21 Aug 2024 07:43:43 -0400 X-MC-Unique: MqMtE7clN4-PaDpk1-xWEA-1 Received: by mail-wm1-f71.google.com with SMTP id 5b1f17b1804b1-4280c0b3017so57000575e9.1 for ; Wed, 21 Aug 2024 04:43:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724240622; x=1724845422; h=in-reply-to:references:user-agent:subject:to:from:cc:message-id :date:content-transfer-encoding:mime-version:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=NoxCdLac/UvkrebVn+67xypoCOpSQ2cSpK0DpML2MPA=; b=XsVQMMrsELy8RTFWxqoGC2tmBDmBfuFLMbQoLF8Y1kZBWdeyX5x0fXpF2C8yhpX5QS m/w8qvuNBx9Ahyx2Fv4ecm9yfcv6Mp5/9UpIPY5d+xl05Jy7YALG/HFafZzkSeNhOkd8 pB1NQ/NxDUEqwtYCQP7XqWNiG+DdFgBTZ8Lb9tXZnrhqad5QKRsz7MjpfPQlupUSUmyv DN/CBfhCX0uPcj28wg+07qNtGogMbVuPGhue9zTCAtUj0Si6ZZS71gBXxsLnYW9blBg4 g14iWIin13Qu2d0C3SE+93/Z9YjQS+93/FcKvXJhrBIhEh4Yw3/eN61DKZ1DorwBKVP+ Y2Kg== X-Forwarded-Encrypted: i=1; AJvYcCUTR3kHZybQlo4Mv3yhbhVU9PYRnqMbco8FnmJ4M7Hxqiz5rERVyzFUAHulDt1wF/Uh6z4=@dpdk.org X-Gm-Message-State: AOJu0YxAdUvevdpSD/YX1Es1rtAMLR+NBwBMGufSAgq4KNUAlEYHm54L KAM1GdhYqON3N2wIO6BN+DDc1NyhQ8ZlljLBYpxYQspD27tQfQRfr+MQ6TzMpHRdiWG1utPDkmc pMI4zhceALrtQd0Zy+C1krYYefyURVFL9hvMxr5DJ X-Received: by 2002:a05:600c:3103:b0:426:6f38:8974 with SMTP id 5b1f17b1804b1-42abd112150mr14897015e9.6.1724240622073; Wed, 21 Aug 2024 04:43:42 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEzGhEsrG0RtSO2bL+BzFz1nwq/KGB5qN62HW/+iWIAnnEvHA8mlDiY6K9wpmnmlwuxbQDfKA== X-Received: by 2002:a05:600c:3103:b0:426:6f38:8974 with SMTP id 5b1f17b1804b1-42abd112150mr14896835e9.6.1724240621523; Wed, 21 Aug 2024 04:43:41 -0700 (PDT) Received: from localhost (2a01cb00025433006239e1f47a0b2371.ipv6.abo.wanadoo.fr. [2a01:cb00:254:3300:6239:e1f4:7a0b:2371]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42abefa224esm22796535e9.32.2024.08.21.04.43.40 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 21 Aug 2024 04:43:41 -0700 (PDT) Mime-Version: 1.0 Date: Wed, 21 Aug 2024 13:43:40 +0200 Message-Id: Cc: , "Stephen Hemminger" From: "Robin Jarry" To: "Anatoly Burakov" , Subject: Re: [PATCH v5 3/4] usertools/dpdk-hugepages.py: update coding style User-Agent: aerc/0.18.2-53-g11f57b5f3378-dirty References: <49550ea29314aead47ae7c14452f7be98a5a1d23.1724233499.git.anatoly.burakov@intel.com> In-Reply-To: <49550ea29314aead47ae7c14452f7be98a5a1d23.1724233499.git.anatoly.burakov@intel.com> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8; format=Flowed X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Anatoly Burakov, Aug 21, 2024 at 11:44: > 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 huge page reservation status output by NUMA node > > Signed-off-by: Anatoly Burakov > Acked-by: Stephen Hemminger > --- > > Notes: > v4 -> v5: > - Format with Ruff on default settings > - Replaced all instances of raw path strings with os.path.join > 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) > v2 -> v3: > - Rewrite of the script as suggested by reviewers > v1 -> v2: > - Added commit that sorted output by NUMA node > > usertools/dpdk-hugepages.py | 518 +++++++++++++++++++++--------------- > 1 file changed, 310 insertions(+), 208 deletions(-) Acked-by: Robin Jarry Thanks!