Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp982949rdb; Fri, 1 Dec 2023 04:12:14 -0800 (PST) X-Google-Smtp-Source: AGHT+IF4DU7UxAqJhpWLn5KjvsmVTTcvkT/F2w6tdUpm5EpmrovogAvmmmGAQYgwE+/OmzblCC1s X-Received: by 2002:a05:6e02:542:b0:35d:5641:408a with SMTP id i2-20020a056e02054200b0035d5641408amr46652ils.4.1701432733972; Fri, 01 Dec 2023 04:12:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701432733; cv=none; d=google.com; s=arc-20160816; b=PtklPN9LfIaJnfJGGyJu2AmSQJTOHWx813NwnZG5ciPPwJIndzcKSSCipedFDYOMlb M9bN2UJwbQc23z8XOTEU1d93F5jEtYYpcJzJgZBDStbRFjg7a1rboVkI6KtNDhWvOfR7 X4SCKD+7sVU6LN73mZY1w1F5Dlw0yIoIr1544Nf0Sf1zWTqDp72xF3Rduex3Ss3PYAkV BkhQvasqcL04shZ5MUhldALaKsBzSF43Nw/CX6xt9/xQUxyhe3vIBlGT0XjPEuD/cUjs vJ6AqiMMcdxSXcfWdryCcFT5lttbpUakN9buCFNEzC/lOoUy7k3GBH8t/bBIhlstt8cb mh6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:organization:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=2jomQvmcRxaHDUEwLDVAKlRy1+dPcmgpbRvF3kbYXQk=; fh=d+NI+Alvyz+EpPTckWlbb/o5BM56mnNeFk+iNGA5TUo=; b=VU6VfJnOH1TmgCQa/jJpEs7JIvUj/BIfrpPCpi86ISom8gFZi7qZl6q96g9jOLvCnk MRCTSnew9bwv//r+54m5ryRKRGzCQ3fDsmgTzIko1TjO1Uml0E9nB3xKOIh89e/NvfwM TURYJ0zZE21L8tvwJGzo5M4uYcZdNLat0b5Sc9hyY5xBS8SMmoKv9Lc2HzmiDB05elXk dFyO0Z+ZaI+8bh3mCCbxWvjnVl8xC87wVoMEhgFChpr9J3YYiKgN3cKtBBWalukq7jJ7 mTUojBu2SI8emseY74naQLGAbgVl8kLWzTG9iArtFAZkHJRP3nq7j6YIvkZxxzLxBlio wgfg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@avm.de header.s=mail header.b="X/EXRtCS"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=avm.de Return-Path: Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id cn12-20020a056a020a8c00b005be10ed80d8si1772144pgb.87.2023.12.01.04.11.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Dec 2023 04:12:13 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@avm.de header.s=mail header.b="X/EXRtCS"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=avm.de Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id C72B18083A9C; Fri, 1 Dec 2023 04:10:50 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1378732AbjLAMKe (ORCPT + 99 others); Fri, 1 Dec 2023 07:10:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44004 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1378681AbjLAMKc (ORCPT ); Fri, 1 Dec 2023 07:10:32 -0500 Received: from mail.avm.de (mail.avm.de [212.42.244.94]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 15A7CCD for ; Fri, 1 Dec 2023 04:10:37 -0800 (PST) Received: from mail-auth.avm.de (unknown [IPv6:2001:bf0:244:244::71]) by mail.avm.de (Postfix) with ESMTPS; Fri, 1 Dec 2023 13:10:35 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=avm.de; s=mail; t=1701432635; bh=4Rsj9gA7e9Ue6wn3vRDGDWjkoxNcibwIf7ka6ip/lWg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=X/EXRtCSBE0g6zQJ0FaCIQfblrUP72IZ/q1eKVZab5Rhi4D7ztobQHW39vKLlhFzu 0HyU+l4EDbUsOlvPRXU03u9MbZD9rrVazUF9BcxOs+gI1MclsgxMn8zExM7f/nWZK7 MFgTvg2BAOXsuE1Ib3p5dVfRRkpb74KDxfFK1KPc= Received: from buildd.core.avm.de (buildd-sv-01.avm.de [172.16.0.225]) by mail-auth.avm.de (Postfix) with ESMTPA id B5FFF80A37; Fri, 1 Dec 2023 13:10:34 +0100 (CET) Received: by buildd.core.avm.de (Postfix, from userid 1000) id A7869180F88; Fri, 1 Dec 2023 13:10:34 +0100 (CET) Date: Fri, 1 Dec 2023 13:10:34 +0100 From: Nicolas Schier To: Hu Haowen <2023002089@link.tyut.edu.cn> Cc: Miguel Ojeda , gregkh@linuxfoundation.org, akpm@linux-foundation.org, masahiroy@kernel.org, ndesaulniers@google.com, ojeda@kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] scripts/show_delta: reformat code Message-ID: References: <20231130143822.17173-1-2023002089@link.tyut.edu.cn> <9075f00e-f914-4739-aae2-ba4ccfd6236b@link.tyut.edu.cn> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <9075f00e-f914-4739-aae2-ba4ccfd6236b@link.tyut.edu.cn> Organization: AVM GmbH X-purgate-ID: 149429::1701432635-A0E0F9F0-D592868D/0/0 X-purgate-type: clean X-purgate-size: 1412 X-purgate-Ad: Categorized by eleven eXpurgate (R) http://www.eleven.de X-purgate: This mail is considered clean (visit http://www.eleven.de for further information) X-purgate: clean X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Fri, 01 Dec 2023 04:10:51 -0800 (PST) On Fri, Dec 01, 2023 at 12:56:14PM +0800, Hu Haowen wrote: > > On 2023/12/1 01:13, Miguel Ojeda wrote: > > On Thu, Nov 30, 2023 at 3:49 PM Hu Haowen <2023002089@link.tyut.edu.cn> wrote: > > > - if string.find(rest, base_str)==1: > > > + if string.find(rest, base_str) == 1: > > If this is changed, shouldn't be others like: > > > > > if arg=="-b": > > > elif arg=="-h": > > be changed too? > > > Sorry, ignored by accident. I'll make up within the next patch version. > > > > In other words, it seems this was done manually. Should we instead > > introduce/use something like Black or Ruff if we are going to do this > > sort of changes? > > > I'm sorry but I'm not familiar with these two things. Are Black and Ruff > some kind of tools which help identify these code format issues? If so > it is better to introduce them to assist to accomplish the similar > series of work instead of only completing it manually with avoiding > omitted parts simultaneously. yes, both are Python code formatters: Black: Documentation: https://black.readthedocs.io/en/stable/ Repology: https://repology.org/project/black/ Ruff: Documentation: https://docs.astral.sh/ruff/formatter/ Repology: https://repology.org/project/ruff-python-linter/ Kind regards, Nicolas