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 BF07F45823; Tue, 20 Aug 2024 17:57:13 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7B040406B7; Tue, 20 Aug 2024 17:57:13 +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 163164025F for ; Tue, 20 Aug 2024 17:57:12 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1724169431; 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=HfxBwDpD0CpxKXD0FpsHYkLkTuydVtKTyPp2UybbuJI=; b=AIHqySS9kbcRBncFMClV0pUr7OFDuhrWYr5s77fWcbU0bB5uajASQboUTLWPeDvYqTXuH4 sSie+c8diAo8XBGGTRGFAEY7VVRcAYnOPWEl2kDXFICwXKJCprvXyHxk2NpEBR5VVGigNV OeLgVa84iTLz2xUh7S5fceVSHFWZ9mY= 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-609-yIWnjXCzOauwuPlgoKXD9g-1; Tue, 20 Aug 2024 11:57:10 -0400 X-MC-Unique: yIWnjXCzOauwuPlgoKXD9g-1 Received: by mail-wm1-f71.google.com with SMTP id 5b1f17b1804b1-42820af1106so44995175e9.2 for ; Tue, 20 Aug 2024 08:57:09 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724169429; x=1724774229; 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=HfxBwDpD0CpxKXD0FpsHYkLkTuydVtKTyPp2UybbuJI=; b=rg+ZH+YLlr/8VY0nUHbt5gIpYqoVpAeCoPez5GSwlDrFpansxXSGqoD1s0PO/dP3s0 YIvZKbEXxKpbp5M9JurGsKkY5qJTXR8llki624+HO2YgWygixKaIENTgCCymqFurgtxw N84SB6lR73MAtYnTo3RFNQ/POOKzJQ8YdOGdY9Bz20zm/hCymSUHe6j51gNYlh5WF+W3 jzrl64DgPqxI1xpgcMecbK6oPsKOuVp007TbI+GzcL0Xilj/dW4Kmrovn5V4Xzns9Kmu 0fBnn6gMGcH2mz3nf/Hjy0dQqH2jSMAIRtSS8/hjrcOdYwbPL8MgCifY+6FqvDAjR9H1 2qiA== X-Forwarded-Encrypted: i=1; AJvYcCWHMZ1b6mOA07Sg2LLdpQpiUZWjJhEK2KDJ6rj2bNUXFJ9hGVjSBogEIYvz78F6KI0blA1ygXbrnY46I9s= X-Gm-Message-State: AOJu0YzF03FkB/dV2Qea1Dgh3V/wLm7xWQPUWeTMDvxn37bTlB8V9mvz Q5teXDA9IMXPEIV66cEjQTEPIb/nJwu1NIiAfFNsbbCfqdXh+TQpIzmjqYrGc6hjHvGTyb2snqK lWtOoX3H/88xDnMeA2CUltwBE5oA0MrJAe03MrCZUYcrRYJc0Jjg= X-Received: by 2002:adf:b652:0:b0:367:9088:fecd with SMTP id ffacd0b85a97d-3719431e602mr9612938f8f.7.1724169428672; Tue, 20 Aug 2024 08:57:08 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGYMeNs3t7QKOeY7TDPGN5dcZfeG3eI15cPNWjkTzW7kKCefud/CqB6C02XFgbZfHqpXnF3yg== X-Received: by 2002:adf:b652:0:b0:367:9088:fecd with SMTP id ffacd0b85a97d-3719431e602mr9612919f8f.7.1724169428130; Tue, 20 Aug 2024 08:57:08 -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 ffacd0b85a97d-3718985a6c4sm13402577f8f.52.2024.08.20.08.57.07 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 20 Aug 2024 08:57:07 -0700 (PDT) Mime-Version: 1.0 Date: Tue, 20 Aug 2024 17:57:07 +0200 Message-Id: Cc: From: "Robin Jarry" To: "Anatoly Burakov" , Subject: Re: [PATCH v3 3/4] usertools/dpdk-hugepages.py: update coding style User-Agent: aerc/0.18.2-53-g11f57b5f3378-dirty References: <1c9f589c434cfb91c53dae7528cfc165c976b0c6.1724168117.git.anatoly.burakov@intel.com> In-Reply-To: <1c9f589c434cfb91c53dae7528cfc165c976b0c6.1724168117.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 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 > --- > > 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=20 for new scripts and/or rewrites. The code looks good to me, but could you pass through one of these tools=20 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.