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 2C0824582E; Wed, 21 Aug 2024 10:52:34 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B0ACC40395; Wed, 21 Aug 2024 10:52:33 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.19]) by mails.dpdk.org (Postfix) with ESMTP id 5C06D4003C for ; Wed, 21 Aug 2024 10:52:32 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1724230353; x=1755766353; h=message-id:date:subject:to:cc:references:from: in-reply-to:content-transfer-encoding:mime-version; bh=Y0csRPCyPM0eE+jYoZr0MTWAx0/Jdld85GaIKKY2u7w=; b=kDvFjobS4Ozu9NlRryo/2lx5aNso10jBCEWFQCTWWjNuJkx0lgHqGMe7 /7SLKm740Zk8DWDTetLu2Ff36GyNZ3kMabUq5xaYEDbEP1EojXv+BX4v8 axuqocyP78MZg6PyA/Y4Y+iHBdfNiBn33m3YNioL5BQBgE5Ta65w95XFL vmhSGQ8Nl9SM06QaubwcWqs2grf8gbyXX6h5rni2nrCEFYk0eNPZ7Md1H oHPabtJmFznGvM+VO6qQE2gYV5dwC6Ior1rEoj3yvgOYByHiZTsKBqnPZ vtJM0DaOHXzAYJezFGRdLLWjtBTO0zeysnRVo6NDzx31JOHsVEvSlR7Hn w==; X-CSE-ConnectionGUID: 4Pioah3nRfmK1il9TQ8UrA== X-CSE-MsgGUID: toC2vvXCTPupyx36IXbduw== X-IronPort-AV: E=McAfee;i="6700,10204,11170"; a="22189964" X-IronPort-AV: E=Sophos;i="6.10,164,1719903600"; d="scan'208";a="22189964" Received: from fmviesa002.fm.intel.com ([10.60.135.142]) by fmvoesa113.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Aug 2024 01:52:32 -0700 X-CSE-ConnectionGUID: OTSFSIjCT5Sj3LNc8pPfYA== X-CSE-MsgGUID: STyaYMRVQYaBMQ6dJSEIFg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,164,1719903600"; d="scan'208";a="84203804" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by fmviesa002.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 21 Aug 2024 01:52:31 -0700 Received: from orsmsx611.amr.corp.intel.com (10.22.229.24) by ORSMSX603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Wed, 21 Aug 2024 01:52:30 -0700 Received: from orsmsx603.amr.corp.intel.com (10.22.229.16) by ORSMSX611.amr.corp.intel.com (10.22.229.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Wed, 21 Aug 2024 01:52:30 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39 via Frontend Transport; Wed, 21 Aug 2024 01:52:30 -0700 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.173) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Wed, 21 Aug 2024 01:52:30 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=UZSCVTZOQFk1/KqzGEBQBmiIGLaLqWH0IB67AI+6e7dIIZIWVqL20JfoUzwbaPlRUktueHNPhEDwhY5mV5AThY4rs66pNPV0Z3mGlkLdQoEVEugj606PCvFKRjVF0YgKhUzIu7G6GXgRgYCtBmeskdU31zi8WjfW4Zt9E80lZ1pKd1uWt3qfJEczMIvndmS1l6ebGYS7jCoI5J5SUqAA06Fs59Kbd39j9CC2C3UpvrP8SBDt9IRJMvA1/Ms5eWbOrBHRYPE5qMxV9zOdfEZeWTkRY8H5E7XaImy1RkVdTIkCDFt8YBJ7JP2Jtxha1Y7ezaFfsfqvh2jnoBMSp6bB2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=aw+6rsrCcY5x5siZ1IGuoeCHH21iEsoFaKjbuaFM/w4=; b=D6//1SirBiipd37KN9wDTBPbZpm/V9CXochNyNEN3nJj/LpwtPiKC6LaVeYg2Auz4OARssbIsVhtIdGlCYse//KN6DTjfU8ESmHERs/S0V6JrZ20OquuTF24zTqRBMfI8SF8w4rzo8isgtjv2LApYsSgQdlhxhKT0UMRQlBLv334+n13aoQpkf2mkMl+BKFWnu1zUAwHvXAH4VWTRqn8e8qDi7cRUCLxmI8HhmbJ1LNlSpz2zar6KZeVmLsSDidpObK6sESEFUrmW/3q4x/ByH02JsnakrHipZLosPAExxkdYY4nLjdzoR5iaccJuPwlPkUp8vfbKJtwOKemNgpvLQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from DM4PR11MB6502.namprd11.prod.outlook.com (2603:10b6:8:89::7) by DM6PR11MB4628.namprd11.prod.outlook.com (2603:10b6:5:28f::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7897.16; Wed, 21 Aug 2024 08:52:28 +0000 Received: from DM4PR11MB6502.namprd11.prod.outlook.com ([fe80::21e4:2d98:c498:2d7a]) by DM4PR11MB6502.namprd11.prod.outlook.com ([fe80::21e4:2d98:c498:2d7a%4]) with mapi id 15.20.7897.014; Wed, 21 Aug 2024 08:52:28 +0000 Message-ID: Date: Wed, 21 Aug 2024 10:52:23 +0200 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3 3/4] usertools/dpdk-hugepages.py: update coding style To: Robin Jarry , CC: References: <1c9f589c434cfb91c53dae7528cfc165c976b0c6.1724168117.git.anatoly.burakov@intel.com> Content-Language: en-US From: "Burakov, Anatoly" In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: DBBPR09CA0027.eurprd09.prod.outlook.com (2603:10a6:10:d4::15) To DM4PR11MB6502.namprd11.prod.outlook.com (2603:10b6:8:89::7) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM4PR11MB6502:EE_|DM6PR11MB4628:EE_ X-MS-Office365-Filtering-Correlation-Id: 2151b155-45ee-45b4-8734-08dcc1be9624 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|366016|1800799024; X-Microsoft-Antispam-Message-Info: =?utf-8?B?OGJZc1EzWDQyMXo1c1JZQ3JYL0hXU3gwNUtacFRWOEMvWEFsbkpPSTJ3dWti?= =?utf-8?B?WXo0VGN6bXNIZThqSi9UTXpKQTVjSXgrc1VqTzROL09kYlpwWWo0MXRDcDZ2?= =?utf-8?B?b3Myc2l3L3BXUEFBVmN6OWJZSXFUTWo1cGdiUlZyTHA5ZkI5ais2YkJCZDZm?= =?utf-8?B?YVpXei9OSFZiUWJ0aTJ2QkMvc3JuRDJYK1A4eWdTMGJLcDZ5c0pjYjFCV042?= =?utf-8?B?QmZUWHo0b3FpbVo2Z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Wc0UnE1bm9uc2x6RzBOWVE4RzFTTnROSjZCWU10a0N3T0F3OVZ4cjJwWExP?= =?utf-8?B?c1I4Rnp2VURuTVU0Z3hkbkFvOU9jZzhNeEwxdmp6WTdab1FBVVoyWDNlSHlG?= =?utf-8?B?c2hJMFNkU0VhRG1wSmkrd21mVFdLczJYUHlsLzVoUm56cC8yTFcxY0lTeVow?= =?utf-8?B?ZWxadTREWU95aUhJZ1llOVVrRmwyMWhPOVlzZFlsQ0VBaTVxTmkvQ29tcm1m?= =?utf-8?B?ZURyK08vMEJIQ1B1K0JObWpXZnY2T0ZrVTNJQUpIWVVlUjlqd2gwWXRyeHJ2?= =?utf-8?B?bVU0c2cwWVdPd05CcVJrSHUyQ010d1czVU5CVnl1cERLcHRBeEltYjBxSU45?= =?utf-8?B?NlVOM25yb1R3UnpJSGFPNzZ4UStCSklMRkxybGJxWFV5TUZ1a2xCRzJOTVMr?= =?utf-8?B?cjh0RXFFbDlYeGYzVTdqQUN2djdoRy84RGJHNGFqZmYwa1p4S3hHekhpckhO?= =?utf-8?B?OTJTTzBkZWJlWmdaYjhYbzFUc0hnUU9HaUZFL1I5SG5ieDNWb1huVFl4ZWR6?= =?utf-8?B?cDlUNWVRQUo2QWprWGtzYUk3SUd5TUVtdzJIOE15ckt5QzNmZGVsNHJtS2FD?= =?utf-8?B?UE9xS1htSzVQOVlCWkhzeVhjclp3Zk5haEozQkQ0ak91NkVCN1J4cVJKOEFY?= =?utf-8?B?Q0Q5b211bmhid3F1d0huUT09?= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM4PR11MB6502.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(376014)(366016)(1800799024); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?MnVZOUpqRWdtZitoY0tVS3RWbkRyZDFkbUN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ZjE1QXRjUHZkQjVZcEFpU0JLZFZ5K0xNckoxa2VTZWxseGdiVFBoSFB0SGg4?= =?utf-8?B?VDBwVVdnOWQ4TWFVL0JKNGJrOGRlZmdVNzVRN3hPMy9wSE1MSjViSjZlNUFo?= =?utf-8?B?aFNTQ1dBUmNvVDJjMEtLVG40QjBWK3ZuTXpJTktmbFNlYTVoeVJ6K0pMcXhH?= =?utf-8?B?cUd2UWJLZlZueFNmMlBYV09BbnMrSEdMRFhGSGVjNzFVN0pzZ2VMSUc3cThI?= =?utf-8?B?ZEhaaURSMEJqanBXZXU5VXJkcEI0dGcycjg5dFJvNG9ka1h3dURsTVR2aDRk?= =?utf-8?B?ekdMZnVjbUFHbG44Zyt1VHhSM0NnTWUwL1FSbi8rZE0xV3dxOEd4eTFLN3JW?= =?utf-8?B?RVE9PQ==?= X-MS-Exchange-CrossTenant-Network-Message-Id: 2151b155-45ee-45b4-8734-08dcc1be9624 X-MS-Exchange-CrossTenant-AuthSource: DM4PR11MB6502.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Aug 2024 08:52:28.7668 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: ef1CtvDdqapGBJSh4Wik7IMwHKLlPsBep8155aV3TktoJulAIBvnG6g8Ped1xgNbwIy7kKXWTccrFnVnfplNamx0VWIp1EjDLEVoty8UPtQ= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR11MB4628 X-OriginatorOrg: intel.com 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 On 8/20/2024 5:57 PM, Robin Jarry wrote: > 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 > for new scripts and/or rewrites. > > The code looks good to me, but could you pass through one of these tools > 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. > Hi, My IDE is already set up to auto-format with Ruff since our last conversation, so this is already formatted. I ran ruff format command just in case but it produced no changes. So, no v4 necessary unless you think there are any changes to be made about the code :) -- Thanks, Anatoly