From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id Icl5HlZBh2BicgAAWB0awg (envelope-from ) for ; Mon, 26 Apr 2021 18:40:22 -0400 Received: by simark.ca (Postfix, from userid 112) id 6D0E71F11C; Mon, 26 Apr 2021 18:40:22 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-0.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RDNS_DYNAMIC,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id AA84A1E01F for ; Mon, 26 Apr 2021 18:40:21 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 352C03892445; Mon, 26 Apr 2021 22:40:21 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 352C03892445 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1619476821; bh=rTnvYSdKSIEVrKx7eKElGPanQ3r/FpxtebA+uRDE/nI=; h=Date:To:Subject:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=t1eB0TYVktzdVy9tYxGDJqkFhotbvnf3ROJn4FA5wSg/kdBu+BzFMxY+aN9mckFKQ 21PyGxuoDbXl7QpyJmIc9OajoLGWEMoTH+lNw6foDpLQIrkzVO015viaS/cQaRWhGq Od0PzgxhY5cmKTEGSb2bzkgegXk27FT91yzGRVNo= Received: from lndn.lancelotsix.com (vps-42846194.vps.ovh.net [IPv6:2001:41d0:801:2000::2400]) by sourceware.org (Postfix) with ESMTPS id 753633892445 for ; Mon, 26 Apr 2021 22:40:18 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 753633892445 Received: from gwenhwyvar (unknown [IPv6:2a02:390:9086:0:815e:14e8:aa72:a9dd]) by lndn.lancelotsix.com (Postfix) with ESMTPSA id 584DA81826; Mon, 26 Apr 2021 22:40:16 +0000 (UTC) Date: Mon, 26 Apr 2021 23:40:12 +0100 To: Simon Marchi Subject: Re: Proposal: format GDB Python files with black Message-ID: <20210426224012.i5gaiqjbkjsmre4k@gwenhwyvar> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.11 (lndn.lancelotsix.com [0.0.0.0]); Mon, 26 Apr 2021 22:40:16 +0000 (UTC) X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Lancelot SIX via Gdb-patches Reply-To: Lancelot SIX Cc: gdb-patches@sourceware.org Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" Hi I have been using black on a few project and it is overall an enjoyable experience. It is also quite nice to have for new contributors with limited experience with a particular coding style in place. It gets this out of the way. As this has been mentioned earlier in the discussion[1], black output might change slightly between versions. I sometimes had some continuous integration build fail because the version on the development environment and the one running `black --check` differ. The differences are minor but this is worth keeping in mind if “false positive” are an issue, for example if it rejects commits in server-side scripts as mentioned in [2]. That being said, specifying which version to use solves the problem easily. Another option can be to use 'black' to help format the code and 'pycodestyle'[3] to do the automated checks, but I am not sure this is the way you want to go to, introducing more and more tools. I’d also like to point out that by default, 'black' will use 88 char long lines[4], which is not compliant with the PEP8[5], which is, as you pointed out[1], referenced in GDB's wiki[6]. Either the tool's configuration or the standard can be adjusted, depending on the maintainers preferences. For what it is worth, I really think black is a great tool that can simplify development workflow. Lancelot. [1] https://sourceware.org/pipermail/gdb-patches/2021-April/178209.html [2] https://sourceware.org/pipermail/gdb-patches/2021-April/178200.html [3] https://pypi.org/project/pycodestyle/ [4] https://black.readthedocs.io/en/stable/the_black_code_style.html#line-length [5] https://www.python.org/dev/peps/pep-0008/#maximum-line-length [6] https://sourceware.org/gdb/wiki/Internals%20GDB-Python-Coding-Standards