From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-x434.google.com (mail-wr1-x434.google.com [IPv6:2a00:1450:4864:20::434]) by sourceware.org (Postfix) with ESMTPS id DDE173858D39 for ; Tue, 8 Nov 2022 13:22:28 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org DDE173858D39 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wr1-x434.google.com with SMTP id k8so20997438wrh.1 for ; Tue, 08 Nov 2022 05:22:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=WoKeF+LUzGtziNXwl2AWYQMp+wCgSiInONebv+qxWyw=; b=HqcobYIpOGVsusfBO2vcoX5LEqVITJ92LFjGpLGx2Gv3WSxVlwMvbZ3Ie3ZAqjSZS2 Ai7sJaHKd4xgom2enKdhH5lQ4VnZX8C6u6TfV++zSXt/3eWqL5AYFs63P79uA/ke3PnN lVaR8+ZCc/UoVXrzqaCcPaHLI6XaDeHWjwibgCjZErpLZnay20IK5Yym0Wnvn8c/bQAf m2Ctsz480s7T8DujgCgybD8uh+OBfC/uwDVM3avTi//VJF9ylls4EipTKKRupB59XFIy PhJVPU/ZE+xQia5ZI8sq864aov1TYIfyZsAAtjFRcFhXxwcj42GplGhmidU45crN64M3 Q3uQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=WoKeF+LUzGtziNXwl2AWYQMp+wCgSiInONebv+qxWyw=; b=vISQ0tjhHP5zHCys89v/CfiBTtGptFngcM9UW+qYvmOJytKfpyJmptuwRRxDaPEwj0 4pNljsyA6a4FUfXlEIG9t3hA6cLcTjuzWhv/59Mxxki7ouNPP184Gc8dVPbCyZoZXNNV TKlyaQUHlOkTl+w/HWpAuYuautN2wOs5KEXd+NYZtH+pGJAfzmBMeXWZ7d4g5OcwO6om 8IdCTiX2v9m7I1PhBsVBGiZjPpYHRGqCNRmpfkF1RbemvSDMUABpFv8TCRFP468AoFEa +4dqLgftKIzlcXFwh5cDhQqJ8NtIy4+vi8643Yd+EU3hkCbgiLxVzjGzhDERsCVLauXS 51iQ== X-Gm-Message-State: ACrzQf05IoTTty7om4rPxjq8jwr6cPhdi/plHYlfvmU5VYJyzDtx4vcj eMJbjXrA/dg453/pJFIGJZo= X-Google-Smtp-Source: AMsMyM40pyhLDZpD9a5ntY4gic8gL1qahZTXbJIWmW2ZVxqat+iFiuUioNq60OYBGNNFdCk8EWzv4Q== X-Received: by 2002:a05:6000:1052:b0:236:6e8e:8403 with SMTP id c18-20020a056000105200b002366e8e8403mr35357489wrx.178.1667913747546; Tue, 08 Nov 2022 05:22:27 -0800 (PST) Received: from lancelot ([195.147.220.46]) by smtp.gmail.com with ESMTPSA id bh23-20020a05600c3d1700b003a83ca67f73sm11663156wmb.3.2022.11.08.05.22.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Nov 2022 05:22:27 -0800 (PST) Received: from gaius by lancelot with local (Exim 4.94.2) (envelope-from ) id 1osOYa-001Yy2-16; Tue, 08 Nov 2022 13:22:24 +0000 From: Gaius Mulley To: Martin =?utf-8?Q?Li=C5=A1ka?= Cc: gcc-patches@gcc.gnu.org Subject: Re: [PATCH v2 16/19] modula2 front end: bootstrap and documentation tools References: <11f42175-8e23-5da3-6a13-6172039bfca2@suse.cz> <87k052ppvq.fsf@debian> <87r0yesygv.fsf_-_@debian> <50b276a7-3a18-d405-b672-eecb5067f5de@suse.cz> Date: Tue, 08 Nov 2022 13:22:23 +0000 In-Reply-To: <50b276a7-3a18-d405-b672-eecb5067f5de@suse.cz> ("Martin =?utf-8?Q?Li=C5=A1ka=22's?= message of "Mon, 7 Nov 2022 14:47:02 +0100") Message-ID: <87r0yd4m40.fsf@debian> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,KAM_SHORT,RCVD_IN_DNSWL_NONE,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 List-Id: Martin Li=C5=A1ka writes: > 1) I would prefer using ' instead of ": > > $ flake8 ./gcc/m2/tools-src/tidydates.py > ... > ./gcc/m2/tools-src/tidydates.py:124:30: Q000 Double quotes found but sing= le quotes preferred > ./gcc/m2/tools-src/tidydates.py:127:27: Q000 Double quotes found but sing= le quotes preferred > ./gcc/m2/tools-src/tidydates.py:132:27: Q000 Double quotes found but sing= le quotes preferred > ./gcc/m2/tools-src/tidydates.py:133:33: Q000 Double quotes found but sing= le quotes preferred > ./gcc/m2/tools-src/tidydates.py:138:26: Q000 Double quotes found but sing= le quotes preferred > ./gcc/m2/tools-src/tidydates.py:143:28: Q000 Double quotes found but > single quotes preferred ah yes will switch the quotes character. > 2) Python-names would be nicer: > > def writeTemplate(fo, magic, start, end, dates, contribution, summary, > lic): > > def write_template(...) agreed, will change > 3) def hasExt(name, ext) - please use Path from pathlib > > 4) while (str.find(line, "(*") !=3D -1): > > '(*' in line > ? Similarly elsewhere. > > 5) str.find(line, ...) > > Use rather directly: line.find(...) > > 6) please use flake8: > https://gcc.gnu.org/codingconventions.html#python sure will do all above - I used flake8 but maybe the plugins weren't enabled. I'll try flake8 on tumbleweed. > Thanks, > Martin > > P.S. I'm going to merge Sphinx branch this Wednesday, so then we should p= ort your > conversion scripts to emit .rst instead of .texi. should be good - I'll complete the rst output in the scripts, regards, Gaius