From patchwork Thu Oct 13 09:37:47 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Martin_Li=C5=A1ka?= X-Patchwork-Id: 1689447 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=suse.cz header.i=@suse.cz header.a=rsa-sha256 header.s=susede2_rsa header.b=Gf014oPU; dkim=fail reason="signature verification failed" header.d=suse.cz header.i=@suse.cz header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=oTkMReSC; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Mp4FX2mMkz23k3 for ; Thu, 13 Oct 2022 20:38:06 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id A1B0D384D174 for ; Thu, 13 Oct 2022 09:38:01 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by sourceware.org (Postfix) with ESMTPS id 7A7D3385116B for ; Thu, 13 Oct 2022 09:37:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 7A7D3385116B Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.cz Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 4A2821F385; Thu, 13 Oct 2022 09:37:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1665653868; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KKEHhnnGaKyS60rWGbmf+yPqMwS8XxLnFNs3nNBzHP0=; b=Gf014oPU/Jf0MXV45map4fXtvPMdL6OId7gKCfRp+gVtCqqROnPHXSE1feEkOiILOsAWKX 0C1z/iL1CFBwXnWS65Xlf03q3B+O2tYh82nx0iPY57fey+acjGTzv/mTPFL8Z13md1qSBl ZmN5uUfYz0+nm6F6u9VGnSeRpv267Kc= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1665653868; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KKEHhnnGaKyS60rWGbmf+yPqMwS8XxLnFNs3nNBzHP0=; b=oTkMReSCjDdjQF1GHEpSaZO6W31D/Jl75SoY4I/dxbQ373tBveQ93S+9n1omE07c8dRSRS ylIVFO16s8vFb6BQ== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 17DB8139F3; Thu, 13 Oct 2022 09:37:48 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id yNuXBGzcR2N+FgAAMHmgww (envelope-from ); Thu, 13 Oct 2022 09:37:48 +0000 Message-ID: Date: Thu, 13 Oct 2022 11:37:47 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.3.1 From: =?utf-8?q?Martin_Li=C5=A1ka?= Subject: [DOCS] Python Language Conventions To: gcc-patches@gcc.gnu.org Content-Language: en-US X-Spam-Status: No, score=-12.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org Sender: "Gcc-patches" I think we should add how Python scripts should be formatted. I noticed that while reading the Modula-2 patchset where it follows the C/C++ style when it comes to Python files. Ready to be installed? Thanks, Martin --- htdocs/codingconventions.html | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/htdocs/codingconventions.html b/htdocs/codingconventions.html index e4d30510..180ef35a 100644 --- a/htdocs/codingconventions.html +++ b/htdocs/codingconventions.html @@ -80,6 +80,7 @@ the conventions separately from any other changes to the code.

+
  • Python Language Conventions @@ -1483,6 +1484,19 @@ with a right brace, optional closing comment, and a new line. Definitions within the body of a namespace are not indented.

    +

    Python Language Conventions

    + +

    +Python scripts should follow PEP 8 – Style Guide for Python Code +which can be verified by flake8 tool. +We do also recommend using the following flake8 plug-ins: + +

      +
    • flake8-builtins
    • +
    • flake8-import-order
    • +
    • flake8-quotes
    • +
    +