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: 1995
Return-Path:
Delivered-To: ouuuleilei@gmail.com
Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp176427wrs;
Thu, 13 Oct 2022 02:38:18 -0700 (PDT)
X-Google-Smtp-Source:
AMsMyM6U8O6ndFLR+WeYxaLGuHE3xT1uPWrx3G/bE2VF3+eIeGXs+sz5cURYkNrwk/L6hkKgsfhZ
X-Received: by 2002:aa7:c60a:0:b0:458:d707:117 with SMTP id
h10-20020aa7c60a000000b00458d7070117mr32034015edq.258.1665653898128;
Thu, 13 Oct 2022 02:38:18 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1665653898; cv=none;
d=google.com; s=arc-20160816;
b=alsSLjMsG38vUYkX5KZ8gb81yKi2uPq0Sv21rCQgdgTBfbrXhstGKfhwpDNG7BlG/g
qz2mhevuI1hovTtW5ONmshgCvX1c76xb5rWoD9LKndJccW3J5g2qmLPV8Yy91CwCwQlY
R9Owv7e+4AEdk9x0FnQo4DntaOBpL6iDK1W3BJct+0ursGX/6dPute5fHSuAaYctgGEW
5b3Pdo+iLh6Y0K2qToi7QT8oIIkuM3+LpQyzfv6jM9zEBQp40w6uJ/gB+yl3jgkZOlF2
XK1ltASfttQ5Ids8neUJhNN5iJuITzIaVOlE2vJLfWy0DT6c/ScC9JMbWStW7rQhhO16
e3Bw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com;
s=arc-20160816;
h=sender:errors-to:list-subscribe:list-help:list-post:list-archive
:list-unsubscribe:list-id:precedence:content-transfer-encoding
:content-language:to:subject:from:user-agent:mime-version:date
:message-id:dkim-signature:dkim-signature:dmarc-filter:delivered-to;
bh=KKEHhnnGaKyS60rWGbmf+yPqMwS8XxLnFNs3nNBzHP0=;
b=acWXtZ/lXbnLQq3EzRt3SY0zz4REZPbH43QOUPusiZvfpXWWo08+NcBmN8VmTpPOFK
L4AMKyxZnGGCpjr0RAlaenQPhOsvOMGEwiWfzNT8CmNcKm+FtHJwgUMe2dqflQsaM70/
UZxkZF5uch26pid7HdE3XjdhZ8KUZMMs9trJ4FuoCI2jne62yjiQaLWAoaW2dpuvC73U
El7ze+Vo+SWzyzPdX0qJ+lzXpzIPVtptMpNTAAT8wCCjypCmNnEU1wSkp8hMsRk/aNM8
NMShkB23rzvdTwvLG6VVO9cNzwWqcVf+gDyeI7EXxkun3Em8tTJQgnr8nDsCyN7EWUW6
K3kw==
ARC-Authentication-Results: i=1; mx.google.com;
dkim=fail header.i=@suse.cz header.s=susede2_rsa header.b=Gf014oPU;
dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519
header.b=oTkMReSC;
spf=pass (google.com: domain of
gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as
permitted sender)
smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"
Received: from sourceware.org (ip-8-43-85-97.sourceware.org. [8.43.85.97])
by mx.google.com with ESMTPS id
21-20020a170906309500b0076f077cec04si16610062ejv.365.2022.10.13.02.38.17
for
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Thu, 13 Oct 2022 02:38:18 -0700 (PDT)
Received-SPF: pass (google.com: domain of
gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as
permitted sender) client-ip=8.43.85.97;
Authentication-Results: mx.google.com;
dkim=fail header.i=@suse.cz header.s=susede2_rsa header.b=Gf014oPU;
dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519
header.b=oTkMReSC;
spf=pass (google.com: domain of
gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as
permitted sender)
smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"
Received: from server2.sourceware.org (localhost [IPv6:::1])
by sourceware.org (Postfix) with ESMTP id B6390382E29E
for ; Thu, 13 Oct 2022 09:38:13 +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+ouuuleilei=gmail.com@gcc.gnu.org
Sender: "Gcc-patches"
X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?=
X-GMAIL-THRID: =?utf-8?q?1746564701708562660?=
X-GMAIL-MSGID: =?utf-8?q?1746564701708562660?=
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
+
+